forked from blakemcbride/LISPF4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
func1.l
65 lines (58 loc) · 1.89 KB
/
func1.l
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
(FILEHEADER FUNC1)
(PRINT 'FUNC1-PACKAGE)
(PRINT '(VERSION 2))
(DEFINEQ
(DE
(NLAMBDA L (PUTD (CAR L) (CONS 'LAMBDA (CDR L))) (CAR L)))
(DF
(NLAMBDA L (PUTD (CAR L) (CONS 'NLAMBDA (CDR L))) (CAR L)))
(DM
(NLAMBDA L
<PUTD (CAR L)
(LIST 'NLAMBDA '$MACRO$
(LIST 'EVAL
(LIST (CONS 'LAMBDA
(CONS
(LIST (CADR L))
(CDDR L)))
'$MACRO$>
(CAR L)))
(GETD
(LAMBDA (FN) (AND (NULL LDFLG) ((SUBR . GETD) FN))))
(SAVEDEF
<LAMBDA (A P)
(PROG ((PR (OR P 'EXPR)) (DEF (GETD A)))
(AND DEF (PUTPROP A PR DEF) (RETURN PR>)
(UNSAVEDEF
<LAMBDA (A P)
(PROG ((PR (OR P 'EXPR)) DEF)
(SETQ DEF (GETPROP A PR))
(AND DEF (PUTPROP A 'FNCELL DEF) (RETURN PR>)
(VIRGINFN
(LAMBDA (X) (OR (GETPROP X 'VIRGINFN) ((SUBR . GETD) X))))
)
(PRINT 'FUNC1FNS)
(RPAQQ FUNC1FNS (DE DF DM GETD SAVEDEF UNSAVEDEF VIRGINFN))
(RPAQQ FUNC1COMS FUNC1-PACKAGE)
(RPAQ FUNC1GENNR 2)
(PRINT 'FUNC1VARS)
<RPAQQ FUNC1VARS
((P (RPAQ CURFNS NIL)
(RPAQ CURFILEFNS 'CURFNS)
(PUTD 'PUTD
'(LAMBDA (FN DEF)
(COND ((GETD FN)
(SAVEDEF FN)
(PRINTL-SP FN 'REDEFINED)))
(PUTPROP FN 'FNCELL DEF)
(SET CURFILEFNS
(ADDLIST FN (EVAL CURFILEFNS)))
DEF))
(RPAQ LDFLG>
(RPAQ CURFNS NIL)
(RPAQ CURFILEFNS 'CURFNS)
(PUTD 'PUTD '(LAMBDA (FN DEF) (COND ((GETD FN) (SAVEDEF FN) (PRINTL-SP FN
'REDEFINED))) (PUTPROP FN 'FNCELL DEF) (SET CURFILEFNS (ADDLIST FN (EVAL
CURFILEFNS))) DEF))
(RPAQ LDFLG)
STOP