shen-ruby 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,214 +23,214 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
23
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
24
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
25
25
 
26
- (defun thaw (V1483) (V1483))
26
+ (defun thaw (V17359) (V17359))
27
27
 
28
- (defun eval (V1484) (let Macroexpand (shen.walk (lambda V1477 (macroexpand V1477)) V1484) (if (shen.packaged? Macroexpand) (map (lambda V1478 (shen.eval-without-macros V1478)) (shen.package-contents Macroexpand)) (shen.eval-without-macros Macroexpand))))
28
+ (defun eval (V17361) (let Macroexpand (shen.walk (lambda Y (macroexpand Y)) V17361) (if (shen.packaged? Macroexpand) (map (lambda Z (shen.eval-without-macros Z)) (shen.package-contents Macroexpand)) (shen.eval-without-macros Macroexpand))))
29
29
 
30
- (defun shen.eval-without-macros (V1485) (eval-kl (shen.elim-def (shen.proc-input+ V1485))))
30
+ (defun shen.eval-without-macros (V17363) (eval-kl (shen.elim-def (shen.proc-input+ V17363))))
31
31
 
32
- (defun shen.proc-input+ (V1486) (cond ((and (cons? V1486) (and (= input+ (hd V1486)) (and (cons? (tl V1486)) (and (cons? (tl (tl V1486))) (= () (tl (tl (tl V1486)))))))) (cons input+ (cons (shen.rcons_form (hd (tl V1486))) (tl (tl V1486))))) ((and (cons? V1486) (and (= shen.read+ (hd V1486)) (and (cons? (tl V1486)) (and (cons? (tl (tl V1486))) (= () (tl (tl (tl V1486)))))))) (cons shen.read+ (cons (shen.rcons_form (hd (tl V1486))) (tl (tl V1486))))) ((cons? V1486) (map (lambda V1479 (shen.proc-input+ V1479)) V1486)) (true V1486)))
32
+ (defun shen.proc-input+ (V17365) (cond ((and (cons? V17365) (and (= input+ (hd V17365)) (and (cons? (tl V17365)) (and (cons? (tl (tl V17365))) (= () (tl (tl (tl V17365)))))))) (cons input+ (cons (shen.rcons_form (hd (tl V17365))) (tl (tl V17365))))) ((and (cons? V17365) (and (= shen.read+ (hd V17365)) (and (cons? (tl V17365)) (and (cons? (tl (tl V17365))) (= () (tl (tl (tl V17365)))))))) (cons shen.read+ (cons (shen.rcons_form (hd (tl V17365))) (tl (tl V17365))))) ((cons? V17365) (map (lambda Z (shen.proc-input+ Z)) V17365)) (true V17365)))
33
33
 
34
- (defun shen.elim-def (V1487) (cond ((and (cons? V1487) (and (= define (hd V1487)) (cons? (tl V1487)))) (shen.shen->kl (hd (tl V1487)) (tl (tl V1487)))) ((and (cons? V1487) (and (= defmacro (hd V1487)) (cons? (tl V1487)))) (let Default (cons X (cons -> (cons X ()))) (let Def (shen.elim-def (cons define (cons (hd (tl V1487)) (append (tl (tl V1487)) Default)))) (let MacroAdd (shen.add-macro (hd (tl V1487))) Def)))) ((and (cons? V1487) (and (= defcc (hd V1487)) (cons? (tl V1487)))) (shen.elim-def (shen.yacc V1487))) ((cons? V1487) (map (lambda V1480 (shen.elim-def V1480)) V1487)) (true V1487)))
34
+ (defun shen.elim-def (V17367) (cond ((and (cons? V17367) (and (= define (hd V17367)) (cons? (tl V17367)))) (shen.shen->kl (hd (tl V17367)) (tl (tl V17367)))) ((and (cons? V17367) (and (= defmacro (hd V17367)) (cons? (tl V17367)))) (let Default (cons X (cons -> (cons X ()))) (let Def (shen.elim-def (cons define (cons (hd (tl V17367)) (append (tl (tl V17367)) Default)))) (let MacroAdd (shen.add-macro (hd (tl V17367))) Def)))) ((and (cons? V17367) (and (= defcc (hd V17367)) (cons? (tl V17367)))) (shen.elim-def (shen.yacc V17367))) ((cons? V17367) (map (lambda Z (shen.elim-def Z)) V17367)) (true V17367)))
35
35
 
36
- (defun shen.add-macro (V1488) (let MacroReg (value shen.*macroreg*) (let NewMacroReg (set shen.*macroreg* (adjoin V1488 (value shen.*macroreg*))) (if (= MacroReg NewMacroReg) shen.skip (set *macros* (cons (lambda V1481 (V1488 V1481)) (value *macros*)))))))
36
+ (defun shen.add-macro (V17369) (let MacroReg (value shen.*macroreg*) (let NewMacroReg (set shen.*macroreg* (adjoin V17369 (value shen.*macroreg*))) (if (= MacroReg NewMacroReg) shen.skip (set *macros* (cons (function V17369) (value *macros*)))))))
37
37
 
38
- (defun shen.packaged? (V1495) (cond ((and (cons? V1495) (and (= package (hd V1495)) (and (cons? (tl V1495)) (cons? (tl (tl V1495)))))) true) (true false)))
38
+ (defun shen.packaged? (V17377) (cond ((and (cons? V17377) (and (= package (hd V17377)) (and (cons? (tl V17377)) (cons? (tl (tl V17377)))))) true) (true false)))
39
39
 
40
- (defun external (V1496) (trap-error (get V1496 shen.external-symbols (value *property-vector*)) (lambda E (simple-error (cn "package " (shen.app V1496 " has not been used.
40
+ (defun external (V17379) (trap-error (get V17379 shen.external-symbols (value *property-vector*)) (lambda E (simple-error (cn "package " (shen.app V17379 " has not been used.
41
41
  " shen.a))))))
42
42
 
43
- (defun shen.package-contents (V1499) (cond ((and (cons? V1499) (and (= package (hd V1499)) (and (cons? (tl V1499)) (and (= null (hd (tl V1499))) (cons? (tl (tl V1499))))))) (tl (tl (tl V1499)))) ((and (cons? V1499) (and (= package (hd V1499)) (and (cons? (tl V1499)) (cons? (tl (tl V1499)))))) (shen.packageh (hd (tl V1499)) (hd (tl (tl V1499))) (tl (tl (tl V1499))))) (true (shen.f_error shen.package-contents))))
43
+ (defun shen.package-contents (V17383) (cond ((and (cons? V17383) (and (= package (hd V17383)) (and (cons? (tl V17383)) (and (= null (hd (tl V17383))) (cons? (tl (tl V17383))))))) (tl (tl (tl V17383)))) ((and (cons? V17383) (and (= package (hd V17383)) (and (cons? (tl V17383)) (cons? (tl (tl V17383)))))) (shen.packageh (hd (tl V17383)) (hd (tl (tl V17383))) (tl (tl (tl V17383))))) (true (shen.f_error shen.package-contents))))
44
44
 
45
- (defun shen.walk (V1500 V1501) (cond ((cons? V1501) (V1500 (map (lambda Z (shen.walk V1500 Z)) V1501))) (true (V1500 V1501))))
45
+ (defun shen.walk (V17386 V17387) (cond ((cons? V17387) (V17386 (map (lambda Z (shen.walk V17386 Z)) V17387))) (true (V17386 V17387))))
46
46
 
47
- (defun compile (V1502 V1503 V1504) (let O (V1502 (cons V1503 (cons () ()))) (if (or (= (fail) O) (not (empty? (hd O)))) (V1504 O) (shen.hdtl O))))
47
+ (defun compile (V17391 V17392 V17393) (let O (V17391 (cons V17392 (cons () ()))) (if (or (= (fail) O) (not (empty? (hd O)))) (V17393 O) (shen.hdtl O))))
48
48
 
49
- (defun fail-if (V1505 V1506) (if (V1505 V1506) (fail) V1506))
49
+ (defun fail-if (V17396 V17397) (if (V17396 V17397) (fail) V17397))
50
50
 
51
- (defun @s (V1507 V1508) (cn V1507 V1508))
51
+ (defun @s (V17400 V17401) (cn V17400 V17401))
52
52
 
53
53
  (defun tc? () (value shen.*tc*))
54
54
 
55
- (defun ps (V1509) (trap-error (get V1509 shen.source (value *property-vector*)) (lambda E (simple-error (shen.app V1509 " not found.
55
+ (defun ps (V17403) (trap-error (get V17403 shen.source (value *property-vector*)) (lambda E (simple-error (shen.app V17403 " not found.
56
56
  " shen.a)))))
57
57
 
58
58
  (defun stinput () (value *stinput*))
59
59
 
60
- (defun shen.+vector? (V1510) (and (absvector? V1510) (> (<-address V1510 0) 0)))
60
+ (defun shen.+vector? (V17405) (and (absvector? V17405) (> (<-address V17405 0) 0)))
61
61
 
62
- (defun vector (V1511) (let Vector (absvector (+ V1511 1)) (let ZeroStamp (address-> Vector 0 V1511) (let Standard (if (= V1511 0) ZeroStamp (shen.fillvector ZeroStamp 1 V1511 (fail))) Standard))))
62
+ (defun vector (V17407) (let Vector (absvector (+ V17407 1)) (let ZeroStamp (address-> Vector 0 V17407) (let Standard (if (= V17407 0) ZeroStamp (shen.fillvector ZeroStamp 1 V17407 (fail))) Standard))))
63
63
 
64
- (defun shen.fillvector (V1513 V1514 V1515 V1516) (cond ((= V1515 V1514) (address-> V1513 V1515 V1516)) (true (shen.fillvector (address-> V1513 V1514 V1516) (+ 1 V1514) V1515 V1516))))
64
+ (defun shen.fillvector (V17413 V17414 V17415 V17416) (cond ((= V17415 V17414) (address-> V17413 V17415 V17416)) (true (shen.fillvector (address-> V17413 V17414 V17416) (+ 1 V17414) V17415 V17416))))
65
65
 
66
- (defun vector? (V1517) (and (absvector? V1517) (trap-error (>= (<-address V1517 0) 0) (lambda E false))))
66
+ (defun vector? (V17418) (and (absvector? V17418) (trap-error (>= (<-address V17418 0) 0) (lambda E false))))
67
67
 
68
- (defun vector-> (V1518 V1519 V1520) (if (= V1519 0) (simple-error "cannot access 0th element of a vector
69
- ") (address-> V1518 V1519 V1520)))
68
+ (defun vector-> (V17422 V17423 V17424) (if (= V17423 0) (simple-error "cannot access 0th element of a vector
69
+ ") (address-> V17422 V17423 V17424)))
70
70
 
71
- (defun <-vector (V1521 V1522) (if (= V1522 0) (simple-error "cannot access 0th element of a vector
72
- ") (let VectorElement (<-address V1521 V1522) (if (= VectorElement (fail)) (simple-error "vector element not found
71
+ (defun <-vector (V17427 V17428) (if (= V17428 0) (simple-error "cannot access 0th element of a vector
72
+ ") (let VectorElement (<-address V17427 V17428) (if (= VectorElement (fail)) (simple-error "vector element not found
73
73
  ") VectorElement))))
74
74
 
75
- (defun shen.posint? (V1523) (and (integer? V1523) (>= V1523 0)))
75
+ (defun shen.posint? (V17430) (and (integer? V17430) (>= V17430 0)))
76
76
 
77
- (defun limit (V1524) (<-address V1524 0))
77
+ (defun limit (V17432) (<-address V17432 0))
78
78
 
79
- (defun symbol? (V1525) (cond ((or (boolean? V1525) (or (number? V1525) (string? V1525))) false) (true (trap-error (let String (str V1525) (shen.analyse-symbol? String)) (lambda E false)))))
79
+ (defun symbol? (V17434) (cond ((or (boolean? V17434) (or (number? V17434) (string? V17434))) false) (true (trap-error (let String (str V17434) (shen.analyse-symbol? String)) (lambda E false)))))
80
80
 
81
- (defun shen.analyse-symbol? (V1526) (cond ((shen.+string? V1526) (and (shen.alpha? (pos V1526 0)) (shen.alphanums? (tlstr V1526)))) (true (shen.f_error shen.analyse-symbol?))))
81
+ (defun shen.analyse-symbol? (V17436) (cond ((shen.+string? V17436) (and (shen.alpha? (pos V17436 0)) (shen.alphanums? (tlstr V17436)))) (true (shen.f_error shen.analyse-symbol?))))
82
82
 
83
- (defun shen.alpha? (V1527) (element? V1527 (cons "A" (cons "B" (cons "C" (cons "D" (cons "E" (cons "F" (cons "G" (cons "H" (cons "I" (cons "J" (cons "K" (cons "L" (cons "M" (cons "N" (cons "O" (cons "P" (cons "Q" (cons "R" (cons "S" (cons "T" (cons "U" (cons "V" (cons "W" (cons "X" (cons "Y" (cons "Z" (cons "a" (cons "b" (cons "c" (cons "d" (cons "e" (cons "f" (cons "g" (cons "h" (cons "i" (cons "j" (cons "k" (cons "l" (cons "m" (cons "n" (cons "o" (cons "p" (cons "q" (cons "r" (cons "s" (cons "t" (cons "u" (cons "v" (cons "w" (cons "x" (cons "y" (cons "z" (cons "=" (cons "*" (cons "/" (cons "+" (cons "-" (cons "_" (cons "?" (cons "$" (cons "!" (cons "@" (cons "~" (cons ">" (cons "<" (cons "&" (cons "%" (cons "{" (cons "}" (cons ":" (cons ";" (cons "`" (cons "#" (cons "'" (cons "." ())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
83
+ (defun shen.alpha? (V17438) (element? V17438 (cons "A" (cons "B" (cons "C" (cons "D" (cons "E" (cons "F" (cons "G" (cons "H" (cons "I" (cons "J" (cons "K" (cons "L" (cons "M" (cons "N" (cons "O" (cons "P" (cons "Q" (cons "R" (cons "S" (cons "T" (cons "U" (cons "V" (cons "W" (cons "X" (cons "Y" (cons "Z" (cons "a" (cons "b" (cons "c" (cons "d" (cons "e" (cons "f" (cons "g" (cons "h" (cons "i" (cons "j" (cons "k" (cons "l" (cons "m" (cons "n" (cons "o" (cons "p" (cons "q" (cons "r" (cons "s" (cons "t" (cons "u" (cons "v" (cons "w" (cons "x" (cons "y" (cons "z" (cons "=" (cons "*" (cons "/" (cons "+" (cons "-" (cons "_" (cons "?" (cons "$" (cons "!" (cons "@" (cons "~" (cons ">" (cons "<" (cons "&" (cons "%" (cons "{" (cons "}" (cons ":" (cons ";" (cons "`" (cons "#" (cons "'" (cons "." ())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
84
84
 
85
- (defun shen.alphanums? (V1528) (cond ((= "" V1528) true) ((shen.+string? V1528) (and (shen.alphanum? (pos V1528 0)) (shen.alphanums? (tlstr V1528)))) (true (shen.f_error shen.alphanums?))))
85
+ (defun shen.alphanums? (V17440) (cond ((= "" V17440) true) ((shen.+string? V17440) (and (shen.alphanum? (pos V17440 0)) (shen.alphanums? (tlstr V17440)))) (true (shen.f_error shen.alphanums?))))
86
86
 
87
- (defun shen.alphanum? (V1529) (or (shen.alpha? V1529) (shen.digit? V1529)))
87
+ (defun shen.alphanum? (V17442) (or (shen.alpha? V17442) (shen.digit? V17442)))
88
88
 
89
- (defun shen.digit? (V1530) (element? V1530 (cons "1" (cons "2" (cons "3" (cons "4" (cons "5" (cons "6" (cons "7" (cons "8" (cons "9" (cons "0" ()))))))))))))
89
+ (defun shen.digit? (V17444) (element? V17444 (cons "1" (cons "2" (cons "3" (cons "4" (cons "5" (cons "6" (cons "7" (cons "8" (cons "9" (cons "0" ()))))))))))))
90
90
 
91
- (defun variable? (V1531) (cond ((or (boolean? V1531) (or (number? V1531) (string? V1531))) false) (true (trap-error (let String (str V1531) (shen.analyse-variable? String)) (lambda E false)))))
91
+ (defun variable? (V17446) (cond ((or (boolean? V17446) (or (number? V17446) (string? V17446))) false) (true (trap-error (let String (str V17446) (shen.analyse-variable? String)) (lambda E false)))))
92
92
 
93
- (defun shen.analyse-variable? (V1532) (cond ((shen.+string? V1532) (and (shen.uppercase? (pos V1532 0)) (shen.alphanums? (tlstr V1532)))) (true (shen.f_error shen.analyse-variable?))))
93
+ (defun shen.analyse-variable? (V17448) (cond ((shen.+string? V17448) (and (shen.uppercase? (pos V17448 0)) (shen.alphanums? (tlstr V17448)))) (true (shen.f_error shen.analyse-variable?))))
94
94
 
95
- (defun shen.uppercase? (V1533) (element? V1533 (cons "A" (cons "B" (cons "C" (cons "D" (cons "E" (cons "F" (cons "G" (cons "H" (cons "I" (cons "J" (cons "K" (cons "L" (cons "M" (cons "N" (cons "O" (cons "P" (cons "Q" (cons "R" (cons "S" (cons "T" (cons "U" (cons "V" (cons "W" (cons "X" (cons "Y" (cons "Z" ()))))))))))))))))))))))))))))
95
+ (defun shen.uppercase? (V17450) (element? V17450 (cons "A" (cons "B" (cons "C" (cons "D" (cons "E" (cons "F" (cons "G" (cons "H" (cons "I" (cons "J" (cons "K" (cons "L" (cons "M" (cons "N" (cons "O" (cons "P" (cons "Q" (cons "R" (cons "S" (cons "T" (cons "U" (cons "V" (cons "W" (cons "X" (cons "Y" (cons "Z" ()))))))))))))))))))))))))))))
96
96
 
97
- (defun gensym (V1534) (concat V1534 (set shen.*gensym* (+ 1 (value shen.*gensym*)))))
97
+ (defun gensym (V17452) (concat V17452 (set shen.*gensym* (+ 1 (value shen.*gensym*)))))
98
98
 
99
- (defun concat (V1535 V1536) (intern (cn (str V1535) (str V1536))))
99
+ (defun concat (V17455 V17456) (intern (cn (str V17455) (str V17456))))
100
100
 
101
- (defun @p (V1537 V1538) (let Vector (absvector 3) (let Tag (address-> Vector 0 shen.tuple) (let Fst (address-> Vector 1 V1537) (let Snd (address-> Vector 2 V1538) Vector)))))
101
+ (defun @p (V17459 V17460) (let Vector (absvector 3) (let Tag (address-> Vector 0 shen.tuple) (let Fst (address-> Vector 1 V17459) (let Snd (address-> Vector 2 V17460) Vector)))))
102
102
 
103
- (defun fst (V1539) (<-address V1539 1))
103
+ (defun fst (V17462) (<-address V17462 1))
104
104
 
105
- (defun snd (V1540) (<-address V1540 2))
105
+ (defun snd (V17464) (<-address V17464 2))
106
106
 
107
- (defun tuple? (V1541) (trap-error (and (absvector? V1541) (= shen.tuple (<-address V1541 0))) (lambda E false)))
107
+ (defun tuple? (V17466) (trap-error (and (absvector? V17466) (= shen.tuple (<-address V17466 0))) (lambda E false)))
108
108
 
109
- (defun append (V1542 V1543) (cond ((= () V1542) V1543) ((cons? V1542) (cons (hd V1542) (append (tl V1542) V1543))) (true (shen.f_error append))))
109
+ (defun append (V17469 V17470) (cond ((= () V17469) V17470) ((cons? V17469) (cons (hd V17469) (append (tl V17469) V17470))) (true (shen.f_error append))))
110
110
 
111
- (defun @v (V1544 V1545) (let Limit (limit V1545) (let NewVector (vector (+ Limit 1)) (let X+NewVector (vector-> NewVector 1 V1544) (if (= Limit 0) X+NewVector (shen.@v-help V1545 1 Limit X+NewVector))))))
111
+ (defun @v (V17473 V17474) (let Limit (limit V17474) (let NewVector (vector (+ Limit 1)) (let X+NewVector (vector-> NewVector 1 V17473) (if (= Limit 0) X+NewVector (shen.@v-help V17474 1 Limit X+NewVector))))))
112
112
 
113
- (defun shen.@v-help (V1547 V1548 V1549 V1550) (cond ((= V1549 V1548) (shen.copyfromvector V1547 V1550 V1549 (+ V1549 1))) (true (shen.@v-help V1547 (+ V1548 1) V1549 (shen.copyfromvector V1547 V1550 V1548 (+ V1548 1))))))
113
+ (defun shen.@v-help (V17480 V17481 V17482 V17483) (cond ((= V17482 V17481) (shen.copyfromvector V17480 V17483 V17482 (+ V17482 1))) (true (shen.@v-help V17480 (+ V17481 1) V17482 (shen.copyfromvector V17480 V17483 V17481 (+ V17481 1))))))
114
114
 
115
- (defun shen.copyfromvector (V1551 V1552 V1553 V1554) (trap-error (vector-> V1552 V1554 (<-vector V1551 V1553)) (lambda E V1552)))
115
+ (defun shen.copyfromvector (V17488 V17489 V17490 V17491) (trap-error (vector-> V17489 V17491 (<-vector V17488 V17490)) (lambda E V17489)))
116
116
 
117
- (defun hdv (V1555) (trap-error (<-vector V1555 1) (lambda E (simple-error (cn "hdv needs a non-empty vector as an argument; not " (shen.app V1555 "
117
+ (defun hdv (V17493) (trap-error (<-vector V17493 1) (lambda E (simple-error (cn "hdv needs a non-empty vector as an argument; not " (shen.app V17493 "
118
118
  " shen.s))))))
119
119
 
120
- (defun tlv (V1556) (let Limit (limit V1556) (if (= Limit 0) (simple-error "cannot take the tail of the empty vector
121
- ") (if (= Limit 1) (vector 0) (let NewVector (vector (- Limit 1)) (shen.tlv-help V1556 2 Limit (vector (- Limit 1))))))))
120
+ (defun tlv (V17495) (let Limit (limit V17495) (if (= Limit 0) (simple-error "cannot take the tail of the empty vector
121
+ ") (if (= Limit 1) (vector 0) (let NewVector (vector (- Limit 1)) (shen.tlv-help V17495 2 Limit (vector (- Limit 1))))))))
122
122
 
123
- (defun shen.tlv-help (V1558 V1559 V1560 V1561) (cond ((= V1560 V1559) (shen.copyfromvector V1558 V1561 V1560 (- V1560 1))) (true (shen.tlv-help V1558 (+ V1559 1) V1560 (shen.copyfromvector V1558 V1561 V1559 (- V1559 1))))))
123
+ (defun shen.tlv-help (V17501 V17502 V17503 V17504) (cond ((= V17503 V17502) (shen.copyfromvector V17501 V17504 V17503 (- V17503 1))) (true (shen.tlv-help V17501 (+ V17502 1) V17503 (shen.copyfromvector V17501 V17504 V17502 (- V17502 1))))))
124
124
 
125
- (defun assoc (V1571 V1572) (cond ((= () V1572) ()) ((and (cons? V1572) (and (cons? (hd V1572)) (= (hd (hd V1572)) V1571))) (hd V1572)) ((cons? V1572) (assoc V1571 (tl V1572))) (true (shen.f_error assoc))))
125
+ (defun assoc (V17516 V17517) (cond ((= () V17517) ()) ((and (cons? V17517) (and (cons? (hd V17517)) (= (hd (hd V17517)) V17516))) (hd V17517)) ((cons? V17517) (assoc V17516 (tl V17517))) (true (shen.f_error assoc))))
126
126
 
127
- (defun boolean? (V1577) (cond ((= true V1577) true) ((= false V1577) true) (true false)))
127
+ (defun boolean? (V17523) (cond ((= true V17523) true) ((= false V17523) true) (true false)))
128
128
 
129
- (defun nl (V1578) (cond ((= 0 V1578) 0) (true (do (shen.prhush "
130
- " (stoutput)) (nl (- V1578 1))))))
129
+ (defun nl (V17525) (cond ((= 0 V17525) 0) (true (do (shen.prhush "
130
+ " (stoutput)) (nl (- V17525 1))))))
131
131
 
132
- (defun difference (V1581 V1582) (cond ((= () V1581) ()) ((cons? V1581) (if (element? (hd V1581) V1582) (difference (tl V1581) V1582) (cons (hd V1581) (difference (tl V1581) V1582)))) (true (shen.f_error difference))))
132
+ (defun difference (V17530 V17531) (cond ((= () V17530) ()) ((cons? V17530) (if (element? (hd V17530) V17531) (difference (tl V17530) V17531) (cons (hd V17530) (difference (tl V17530) V17531)))) (true (shen.f_error difference))))
133
133
 
134
- (defun do (V1583 V1584) V1584)
134
+ (defun do (V17534 V17535) V17535)
135
135
 
136
- (defun element? (V1594 V1595) (cond ((= () V1595) false) ((and (cons? V1595) (= (hd V1595) V1594)) true) ((cons? V1595) (element? V1594 (tl V1595))) (true (shen.f_error element?))))
136
+ (defun element? (V17547 V17548) (cond ((= () V17548) false) ((and (cons? V17548) (= (hd V17548) V17547)) true) ((cons? V17548) (element? V17547 (tl V17548))) (true (shen.f_error element?))))
137
137
 
138
- (defun empty? (V1600) (cond ((= () V1600) true) (true false)))
138
+ (defun empty? (V17554) (cond ((= () V17554) true) (true false)))
139
139
 
140
- (defun fix (V1601 V1602) (shen.fix-help V1601 V1602 (V1601 V1602)))
140
+ (defun fix (V17557 V17558) (shen.fix-help V17557 V17558 (V17557 V17558)))
141
141
 
142
- (defun shen.fix-help (V1610 V1611 V1612) (cond ((= V1612 V1611) V1612) (true (shen.fix-help V1610 V1612 (V1610 V1612)))))
142
+ (defun shen.fix-help (V17569 V17570 V17571) (cond ((= V17571 V17570) V17571) (true (shen.fix-help V17569 V17571 (V17569 V17571)))))
143
143
 
144
- (defun put (V1613 V1614 V1615 V1616) (let N (hash V1613 (limit V1616)) (let Entry (trap-error (<-vector V1616 N) (lambda E ())) (let Change (vector-> V1616 N (shen.change-pointer-value V1613 V1614 V1615 Entry)) V1615))))
144
+ (defun put (V17576 V17577 V17578 V17579) (let N (hash V17576 (limit V17579)) (let Entry (trap-error (<-vector V17579 N) (lambda E ())) (let Change (vector-> V17579 N (shen.change-pointer-value V17576 V17577 V17578 Entry)) V17578))))
145
145
 
146
- (defun unput (V1617 V1618 V1619) (let N (hash V1617 (limit V1619)) (let Entry (trap-error (<-vector V1619 N) (lambda E ())) (let Change (vector-> V1619 N (shen.remove-pointer V1617 V1618 Entry)) V1617))))
146
+ (defun unput (V17583 V17584 V17585) (let N (hash V17583 (limit V17585)) (let Entry (trap-error (<-vector V17585 N) (lambda E ())) (let Change (vector-> V17585 N (shen.remove-pointer V17583 V17584 Entry)) V17583))))
147
147
 
148
- (defun shen.remove-pointer (V1624 V1625 V1626) (cond ((= () V1626) ()) ((and (cons? V1626) (and (cons? (hd V1626)) (and (cons? (hd (hd V1626))) (and (cons? (tl (hd (hd V1626)))) (and (= () (tl (tl (hd (hd V1626))))) (and (= (hd (tl (hd (hd V1626)))) V1625) (= (hd (hd (hd V1626))) V1624))))))) (tl V1626)) ((cons? V1626) (cons (hd V1626) (shen.remove-pointer V1624 V1625 (tl V1626)))) (true (shen.f_error shen.remove-pointer))))
148
+ (defun shen.remove-pointer (V17593 V17594 V17595) (cond ((= () V17595) ()) ((and (cons? V17595) (and (cons? (hd V17595)) (and (cons? (hd (hd V17595))) (and (cons? (tl (hd (hd V17595)))) (and (= () (tl (tl (hd (hd V17595))))) (and (= (hd (tl (hd (hd V17595)))) V17594) (= (hd (hd (hd V17595))) V17593))))))) (tl V17595)) ((cons? V17595) (cons (hd V17595) (shen.remove-pointer V17593 V17594 (tl V17595)))) (true (shen.f_error shen.remove-pointer))))
149
149
 
150
- (defun shen.change-pointer-value (V1631 V1632 V1633 V1634) (cond ((= () V1634) (cons (cons (cons V1631 (cons V1632 ())) V1633) ())) ((and (cons? V1634) (and (cons? (hd V1634)) (and (cons? (hd (hd V1634))) (and (cons? (tl (hd (hd V1634)))) (and (= () (tl (tl (hd (hd V1634))))) (and (= (hd (tl (hd (hd V1634)))) V1632) (= (hd (hd (hd V1634))) V1631))))))) (cons (cons (hd (hd V1634)) V1633) (tl V1634))) ((cons? V1634) (cons (hd V1634) (shen.change-pointer-value V1631 V1632 V1633 (tl V1634)))) (true (shen.f_error shen.change-pointer-value))))
150
+ (defun shen.change-pointer-value (V17604 V17605 V17606 V17607) (cond ((= () V17607) (cons (cons (cons V17604 (cons V17605 ())) V17606) ())) ((and (cons? V17607) (and (cons? (hd V17607)) (and (cons? (hd (hd V17607))) (and (cons? (tl (hd (hd V17607)))) (and (= () (tl (tl (hd (hd V17607))))) (and (= (hd (tl (hd (hd V17607)))) V17605) (= (hd (hd (hd V17607))) V17604))))))) (cons (cons (hd (hd V17607)) V17606) (tl V17607))) ((cons? V17607) (cons (hd V17607) (shen.change-pointer-value V17604 V17605 V17606 (tl V17607)))) (true (shen.f_error shen.change-pointer-value))))
151
151
 
152
- (defun get (V1635 V1636 V1637) (let N (hash V1635 (limit V1637)) (let Entry (trap-error (<-vector V1637 N) (lambda E (simple-error "pointer not found
153
- "))) (let Result (assoc (cons V1635 (cons V1636 ())) Entry) (if (empty? Result) (simple-error "value not found
152
+ (defun get (V17611 V17612 V17613) (let N (hash V17611 (limit V17613)) (let Entry (trap-error (<-vector V17613 N) (lambda E (simple-error "pointer not found
153
+ "))) (let Result (assoc (cons V17611 (cons V17612 ())) Entry) (if (empty? Result) (simple-error "value not found
154
154
  ") (tl Result))))))
155
155
 
156
- (defun hash (V1638 V1639) (let Hash (shen.mod (sum (map (lambda V1482 (string->n V1482)) (explode V1638))) V1639) (if (= 0 Hash) 1 Hash)))
156
+ (defun hash (V17616 V17617) (let Hash (shen.mod (sum (map (lambda X (string->n X)) (explode V17616))) V17617) (if (= 0 Hash) 1 Hash)))
157
157
 
158
- (defun shen.mod (V1640 V1641) (shen.modh V1640 (shen.multiples V1640 (cons V1641 ()))))
158
+ (defun shen.mod (V17620 V17621) (shen.modh V17620 (shen.multiples V17620 (cons V17621 ()))))
159
159
 
160
- (defun shen.multiples (V1642 V1643) (cond ((and (cons? V1643) (> (hd V1643) V1642)) (tl V1643)) ((cons? V1643) (shen.multiples V1642 (cons (* 2 (hd V1643)) V1643))) (true (shen.f_error shen.multiples))))
160
+ (defun shen.multiples (V17624 V17625) (cond ((and (cons? V17625) (> (hd V17625) V17624)) (tl V17625)) ((cons? V17625) (shen.multiples V17624 (cons (* 2 (hd V17625)) V17625))) (true (shen.f_error shen.multiples))))
161
161
 
162
- (defun shen.modh (V1646 V1647) (cond ((= 0 V1646) 0) ((= () V1647) V1646) ((and (cons? V1647) (> (hd V1647) V1646)) (if (empty? (tl V1647)) V1646 (shen.modh V1646 (tl V1647)))) ((cons? V1647) (shen.modh (- V1646 (hd V1647)) V1647)) (true (shen.f_error shen.modh))))
162
+ (defun shen.modh (V17630 V17631) (cond ((= 0 V17630) 0) ((= () V17631) V17630) ((and (cons? V17631) (> (hd V17631) V17630)) (if (empty? (tl V17631)) V17630 (shen.modh V17630 (tl V17631)))) ((cons? V17631) (shen.modh (- V17630 (hd V17631)) V17631)) (true (shen.f_error shen.modh))))
163
163
 
164
- (defun sum (V1648) (cond ((= () V1648) 0) ((cons? V1648) (+ (hd V1648) (sum (tl V1648)))) (true (shen.f_error sum))))
164
+ (defun sum (V17633) (cond ((= () V17633) 0) ((cons? V17633) (+ (hd V17633) (sum (tl V17633)))) (true (shen.f_error sum))))
165
165
 
166
- (defun head (V1655) (cond ((cons? V1655) (hd V1655)) (true (simple-error "head expects a non-empty list"))))
166
+ (defun head (V17641) (cond ((cons? V17641) (hd V17641)) (true (simple-error "head expects a non-empty list"))))
167
167
 
168
- (defun tail (V1662) (cond ((cons? V1662) (tl V1662)) (true (simple-error "tail expects a non-empty list"))))
168
+ (defun tail (V17649) (cond ((cons? V17649) (tl V17649)) (true (simple-error "tail expects a non-empty list"))))
169
169
 
170
- (defun hdstr (V1663) (pos V1663 0))
170
+ (defun hdstr (V17651) (pos V17651 0))
171
171
 
172
- (defun intersection (V1666 V1667) (cond ((= () V1666) ()) ((cons? V1666) (if (element? (hd V1666) V1667) (cons (hd V1666) (intersection (tl V1666) V1667)) (intersection (tl V1666) V1667))) (true (shen.f_error intersection))))
172
+ (defun intersection (V17656 V17657) (cond ((= () V17656) ()) ((cons? V17656) (if (element? (hd V17656) V17657) (cons (hd V17656) (intersection (tl V17656) V17657)) (intersection (tl V17656) V17657))) (true (shen.f_error intersection))))
173
173
 
174
- (defun reverse (V1668) (shen.reverse_help V1668 ()))
174
+ (defun reverse (V17659) (shen.reverse_help V17659 ()))
175
175
 
176
- (defun shen.reverse_help (V1669 V1670) (cond ((= () V1669) V1670) ((cons? V1669) (shen.reverse_help (tl V1669) (cons (hd V1669) V1670))) (true (shen.f_error shen.reverse_help))))
176
+ (defun shen.reverse_help (V17662 V17663) (cond ((= () V17662) V17663) ((cons? V17662) (shen.reverse_help (tl V17662) (cons (hd V17662) V17663))) (true (shen.f_error shen.reverse_help))))
177
177
 
178
- (defun union (V1671 V1672) (cond ((= () V1671) V1672) ((cons? V1671) (if (element? (hd V1671) V1672) (union (tl V1671) V1672) (cons (hd V1671) (union (tl V1671) V1672)))) (true (shen.f_error union))))
178
+ (defun union (V17666 V17667) (cond ((= () V17666) V17667) ((cons? V17666) (if (element? (hd V17666) V17667) (union (tl V17666) V17667) (cons (hd V17666) (union (tl V17666) V17667)))) (true (shen.f_error union))))
179
179
 
180
- (defun y-or-n? (V1673) (let Message (shen.prhush (shen.proc-nl V1673) (stoutput)) (let Y-or-N (shen.prhush " (y/n) " (stoutput)) (let Input (shen.app (read (stinput)) "" shen.s) (if (= "y" Input) true (if (= "n" Input) false (do (shen.prhush "please answer y or n
181
- " (stoutput)) (y-or-n? V1673))))))))
180
+ (defun y-or-n? (V17669) (let Message (shen.prhush (shen.proc-nl V17669) (stoutput)) (let Y-or-N (shen.prhush " (y/n) " (stoutput)) (let Input (shen.app (read (stinput)) "" shen.s) (if (= "y" Input) true (if (= "n" Input) false (do (shen.prhush "please answer y or n
181
+ " (stoutput)) (y-or-n? V17669))))))))
182
182
 
183
- (defun not (V1674) (if V1674 false true))
183
+ (defun not (V17671) (if V17671 false true))
184
184
 
185
- (defun subst (V1684 V1685 V1686) (cond ((= V1686 V1685) V1684) ((cons? V1686) (map (lambda W (subst V1684 V1685 W)) V1686)) (true V1686)))
185
+ (defun subst (V17684 V17685 V17686) (cond ((= V17686 V17685) V17684) ((cons? V17686) (map (lambda W (subst V17684 V17685 W)) V17686)) (true V17686)))
186
186
 
187
- (defun explode (V1687) (shen.explode-h (shen.app V1687 "" shen.a)))
187
+ (defun explode (V17688) (shen.explode-h (shen.app V17688 "" shen.a)))
188
188
 
189
- (defun shen.explode-h (V1688) (cond ((= "" V1688) ()) ((shen.+string? V1688) (cons (pos V1688 0) (shen.explode-h (tlstr V1688)))) (true (shen.f_error shen.explode-h))))
189
+ (defun shen.explode-h (V17690) (cond ((= "" V17690) ()) ((shen.+string? V17690) (cons (pos V17690 0) (shen.explode-h (tlstr V17690)))) (true (shen.f_error shen.explode-h))))
190
190
 
191
- (defun cd (V1689) (set *home-directory* (if (= V1689 "") "" (shen.app V1689 "/" shen.a))))
191
+ (defun cd (V17692) (set *home-directory* (if (= V17692 "") "" (shen.app V17692 "/" shen.a))))
192
192
 
193
- (defun map (V1690 V1691) (shen.map-h V1690 V1691 ()))
193
+ (defun map (V17695 V17696) (shen.map-h V17695 V17696 ()))
194
194
 
195
- (defun shen.map-h (V1694 V1695 V1696) (cond ((= () V1695) (reverse V1696)) ((cons? V1695) (shen.map-h V1694 (tl V1695) (cons (V1694 (hd V1695)) V1696))) (true (shen.f_error shen.map-h))))
195
+ (defun shen.map-h (V17702 V17703 V17704) (cond ((= () V17703) (reverse V17704)) ((cons? V17703) (shen.map-h V17702 (tl V17703) (cons (V17702 (hd V17703)) V17704))) (true (shen.f_error shen.map-h))))
196
196
 
197
- (defun length (V1697) (shen.length-h V1697 0))
197
+ (defun length (V17706) (shen.length-h V17706 0))
198
198
 
199
- (defun shen.length-h (V1698 V1699) (cond ((= () V1698) V1699) (true (shen.length-h (tl V1698) (+ V1699 1)))))
199
+ (defun shen.length-h (V17709 V17710) (cond ((= () V17709) V17710) (true (shen.length-h (tl V17709) (+ V17710 1)))))
200
200
 
201
- (defun occurrences (V1709 V1710) (cond ((= V1710 V1709) 1) ((cons? V1710) (+ (occurrences V1709 (hd V1710)) (occurrences V1709 (tl V1710)))) (true 0)))
201
+ (defun occurrences (V17722 V17723) (cond ((= V17723 V17722) 1) ((cons? V17723) (+ (occurrences V17722 (hd V17723)) (occurrences V17722 (tl V17723)))) (true 0)))
202
202
 
203
- (defun nth (V1717 V1718) (cond ((and (= 1 V1717) (cons? V1718)) (hd V1718)) ((cons? V1718) (nth (- V1717 1) (tl V1718))) (true (shen.f_error nth))))
203
+ (defun nth (V17732 V17733) (cond ((and (= 1 V17732) (cons? V17733)) (hd V17733)) ((cons? V17733) (nth (- V17732 1) (tl V17733))) (true (shen.f_error nth))))
204
204
 
205
- (defun integer? (V1719) (and (number? V1719) (let Abs (shen.abs V1719) (shen.integer-test? Abs (shen.magless Abs 1)))))
205
+ (defun integer? (V17735) (and (number? V17735) (let Abs (shen.abs V17735) (shen.integer-test? Abs (shen.magless Abs 1)))))
206
206
 
207
- (defun shen.abs (V1720) (if (> V1720 0) V1720 (- 0 V1720)))
207
+ (defun shen.abs (V17737) (if (> V17737 0) V17737 (- 0 V17737)))
208
208
 
209
- (defun shen.magless (V1721 V1722) (let Nx2 (* V1722 2) (if (> Nx2 V1721) V1722 (shen.magless V1721 Nx2))))
209
+ (defun shen.magless (V17740 V17741) (let Nx2 (* V17741 2) (if (> Nx2 V17740) V17741 (shen.magless V17740 Nx2))))
210
210
 
211
- (defun shen.integer-test? (V1726 V1727) (cond ((= 0 V1726) true) ((> 1 V1726) false) (true (let Abs-N (- V1726 V1727) (if (> 0 Abs-N) (integer? V1726) (shen.integer-test? Abs-N V1727))))))
211
+ (defun shen.integer-test? (V17747 V17748) (cond ((= 0 V17747) true) ((> 1 V17747) false) (true (let Abs-N (- V17747 V17748) (if (> 0 Abs-N) (integer? V17747) (shen.integer-test? Abs-N V17748))))))
212
212
 
213
- (defun mapcan (V1730 V1731) (cond ((= () V1731) ()) ((cons? V1731) (append (V1730 (hd V1731)) (mapcan V1730 (tl V1731)))) (true (shen.f_error mapcan))))
213
+ (defun mapcan (V17753 V17754) (cond ((= () V17754) ()) ((cons? V17754) (append (V17753 (hd V17754)) (mapcan V17753 (tl V17754)))) (true (shen.f_error mapcan))))
214
214
 
215
- (defun == (V1741 V1742) (cond ((= V1742 V1741) true) (true false)))
215
+ (defun == (V17766 V17767) (cond ((= V17767 V17766) true) (true false)))
216
216
 
217
217
  (defun abort () (simple-error ""))
218
218
 
219
- (defun bound? (V1743) (and (symbol? V1743) (let Val (trap-error (value V1743) (lambda E shen.this-symbol-is-unbound)) (if (= Val shen.this-symbol-is-unbound) false true))))
219
+ (defun bound? (V17769) (and (symbol? V17769) (let Val (trap-error (value V17769) (lambda E shen.this-symbol-is-unbound)) (if (= Val shen.this-symbol-is-unbound) false true))))
220
220
 
221
- (defun shen.string->bytes (V1744) (cond ((= "" V1744) ()) (true (cons (string->n (pos V1744 0)) (shen.string->bytes (tlstr V1744))))))
221
+ (defun shen.string->bytes (V17771) (cond ((= "" V17771) ()) (true (cons (string->n (pos V17771 0)) (shen.string->bytes (tlstr V17771))))))
222
222
 
223
- (defun maxinferences (V1745) (set shen.*maxinferences* V1745))
223
+ (defun maxinferences (V17773) (set shen.*maxinferences* V17773))
224
224
 
225
225
  (defun inferences () (value shen.*infs*))
226
226
 
227
- (defun protect (V1746) V1746)
227
+ (defun protect (V17775) V17775)
228
228
 
229
229
  (defun stoutput () (value *stoutput*))
230
230
 
231
- (defun string->symbol (V1747) (let Symbol (intern V1747) (if (symbol? Symbol) Symbol (simple-error (cn "cannot intern " (shen.app V1747 " to a symbol" shen.s))))))
231
+ (defun string->symbol (V17777) (let Symbol (intern V17777) (if (symbol? Symbol) Symbol (simple-error (cn "cannot intern " (shen.app V17777 " to a symbol" shen.s))))))
232
232
 
233
- (defun optimise (V1752) (cond ((= + V1752) (set shen.*optimise* true)) ((= - V1752) (set shen.*optimise* false)) (true (simple-error "optimise expects a + or a -.
233
+ (defun optimise (V17783) (cond ((= + V17783) (set shen.*optimise* true)) ((= - V17783) (set shen.*optimise* false)) (true (simple-error "optimise expects a + or a -.
234
234
  "))))
235
235
 
236
236
  (defun os () (value *os*))
@@ -247,7 +247,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
247
247
 
248
248
  (defun release () (value *release*))
249
249
 
250
- (defun package? (V1753) (trap-error (do (external V1753) true) (lambda E false)))
250
+ (defun package? (V17785) (trap-error (do (external V17785) true) (lambda E false)))
251
+
252
+ (defun function (V17787) (shen.lookup-func V17787 (value shen.*symbol-table*)))
253
+
254
+ (defun shen.lookup-func (V17797 V17798) (cond ((= () V17798) (simple-error (shen.app V17797 " has no lambda expansion
255
+ " shen.a))) ((and (cons? V17798) (and (cons? (hd V17798)) (= (hd (hd V17798)) V17797))) (tl (hd V17798))) ((cons? V17798) (shen.lookup-func V17797 (tl V17798))) (true (shen.f_error shen.lookup-func))))
251
256
 
252
257
 
253
258