fez-lisp 1.1.28 → 1.1.29
Sign up to get free protection for your applications and to get access to all the features.
- package/.clj-kondo/.cache/v1/lock +0 -0
- package/.lsp/.cache/db.transit.json +1 -0
- package/README.md +8 -8
- package/lib/baked/std.js +1 -1
- package/package.json +1 -1
- package/src/compiler.js +4 -4
- package/src/interpreter.js +12 -93
- package/src/keywords.js +1 -4
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
["^ ","~:classpath",["~#set",[]],"~:project-hash","","~:project-root","/Users/anthony/projects/personal/fez","~:kondo-config-hash","bda025eb1f6784bca737743f67546eb707569d9461b178b11732b8dd63dfc0a0","~:dependency-scheme","jar","~:analysis",null,"~:analysis-checksums",["^ "],"~:project-analysis-type","~:project-and-full-dependencies","~:version",12,"~:stubs-generation-namespaces",["^1",[]]]
|
package/README.md
CHANGED
@@ -101,9 +101,9 @@
|
|
101
101
|
(not (= (array:get sorted (- index 1)) (array:get sorted index)))))))
|
102
102
|
(array:map car))))
|
103
103
|
; tests
|
104
|
-
(
|
105
|
-
(
|
106
|
-
(
|
104
|
+
(and
|
105
|
+
(array:equal? (unique (array 1)) (array 1))
|
106
|
+
(array:equal? (unique (array 1 2 2 4 5 9 5 12 14 1)) (array 1 2 4 5 9 12 14)))
|
107
107
|
```
|
108
108
|
|
109
109
|
Installation:
|
@@ -174,10 +174,10 @@ Many logical operators
|
|
174
174
|
(unless (and (not (= b -1)) (not (> a b))) char:a
|
175
175
|
(unless (or (not (> b 2)) (not (< a 4))) char:b char:c))))
|
176
176
|
|
177
|
-
(
|
178
|
-
(
|
179
|
-
(
|
180
|
-
(
|
177
|
+
(and
|
178
|
+
(= (logic-a 0 -1) (logic-b 0 -1))
|
179
|
+
(= (logic-a 1 3) (logic-b 1 3))
|
180
|
+
(= (logic-a 1 2) (logic-b 1 2)))
|
181
181
|
```
|
182
182
|
|
183
183
|
Tail Call Optimization:
|
@@ -246,6 +246,6 @@ console.log(fez(tree(`(+ (|> 1 (+ 2) (* 3) (- 1)) (- (* (+ 1 2) 3) 1))`)))
|
|
246
246
|
(/) (+) (*) (-) (=) (<) (>) (>=) (<=) (&) (~) (|) (^) (<<) (>>) (>>>)
|
247
247
|
(|>) (mod) (let) (if) (unless) (not) (and) (or) (cond) (atom?) (lambda)
|
248
248
|
(car) (cdr) (cons) (length) (do) (array) (set!) (get)
|
249
|
-
(apply)
|
249
|
+
(apply) (log!) (log-string!) (log-char!) (clear!)
|
250
250
|
(void) (fez-manual)
|
251
251
|
```
|
package/lib/baked/std.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export default [[[0,"let"],[1,"char:A"],[2,65]],[[0,"let"],[1,"char:B"],[2,66]],[[0,"let"],[1,"char:C"],[2,67]],[[0,"let"],[1,"char:D"],[2,68]],[[0,"let"],[1,"char:E"],[2,69]],[[0,"let"],[1,"char:F"],[2,70]],[[0,"let"],[1,"char:G"],[2,71]],[[0,"let"],[1,"char:H"],[2,72]],[[0,"let"],[1,"char:I"],[2,73]],[[0,"let"],[1,"char:J"],[2,74]],[[0,"let"],[1,"char:K"],[2,75]],[[0,"let"],[1,"char:L"],[2,76]],[[0,"let"],[1,"char:M"],[2,77]],[[0,"let"],[1,"char:N"],[2,78]],[[0,"let"],[1,"char:O"],[2,79]],[[0,"let"],[1,"char:P"],[2,80]],[[0,"let"],[1,"char:Q"],[2,81]],[[0,"let"],[1,"char:R"],[2,82]],[[0,"let"],[1,"char:S"],[2,83]],[[0,"let"],[1,"char:T"],[2,84]],[[0,"let"],[1,"char:U"],[2,85]],[[0,"let"],[1,"char:V"],[2,86]],[[0,"let"],[1,"char:W"],[2,87]],[[0,"let"],[1,"char:X"],[2,88]],[[0,"let"],[1,"char:Y"],[2,89]],[[0,"let"],[1,"char:Z"],[2,90]],[[0,"let"],[1,"char:a"],[2,97]],[[0,"let"],[1,"char:b"],[2,98]],[[0,"let"],[1,"char:c"],[2,99]],[[0,"let"],[1,"char:d"],[2,100]],[[0,"let"],[1,"char:e"],[2,101]],[[0,"let"],[1,"char:f"],[2,102]],[[0,"let"],[1,"char:g"],[2,103]],[[0,"let"],[1,"char:h"],[2,104]],[[0,"let"],[1,"char:i"],[2,105]],[[0,"let"],[1,"char:j"],[2,106]],[[0,"let"],[1,"char:k"],[2,107]],[[0,"let"],[1,"char:l"],[2,108]],[[0,"let"],[1,"char:m"],[2,109]],[[0,"let"],[1,"char:n"],[2,110]],[[0,"let"],[1,"char:o"],[2,111]],[[0,"let"],[1,"char:p"],[2,112]],[[0,"let"],[1,"char:q"],[2,113]],[[0,"let"],[1,"char:r"],[2,114]],[[0,"let"],[1,"char:s"],[2,115]],[[0,"let"],[1,"char:t"],[2,116]],[[0,"let"],[1,"char:u"],[2,117]],[[0,"let"],[1,"char:v"],[2,118]],[[0,"let"],[1,"char:w"],[2,119]],[[0,"let"],[1,"char:x"],[2,120]],[[0,"let"],[1,"char:y"],[2,121]],[[0,"let"],[1,"char:z"],[2,122]],[[0,"let"],[1,"char:0"],[2,48]],[[0,"let"],[1,"char:1"],[2,49]],[[0,"let"],[1,"char:2"],[2,50]],[[0,"let"],[1,"char:3"],[2,51]],[[0,"let"],[1,"char:4"],[2,52]],[[0,"let"],[1,"char:5"],[2,53]],[[0,"let"],[1,"char:6"],[2,54]],[[0,"let"],[1,"char:7"],[2,55]],[[0,"let"],[1,"char:8"],[2,56]],[[0,"let"],[1,"char:9"],[2,57]],[[0,"let"],[1,"char:empty"],[2,0]],[[0,"let"],[1,"char:double-quote"],[2,34]],[[0,"let"],[1,"char:new-line"],[2,10]],[[0,"let"],[1,"char:space"],[2,32]],[[0,"let"],[1,"char:comma"],[2,44]],[[0,"let"],[1,"char:dot"],[2,46]],[[0,"let"],[1,"char:semi-colon"],[2,59]],[[0,"let"],[1,"char:colon"],[2,58]],[[0,"let"],[1,"char:dash"],[2,45]],[[0,"let"],[1,"char:left-brace"],[2,40]],[[0,"let"],[1,"char:right-brace"],[2,41]],[[0,"let"],[1,"char:hash"],[2,35]],[[0,"let"],[1,"math:e"],[2,2.718281828459045]],[[0,"let"],[1,"math:pi"],[2,3.141592653589793]],[[0,"let"],[1,"math:min-safe-integer"],[2,-9007199254740991]],[[0,"let"],[1,"math:max-safe-integer"],[2,9007199254740991]],[[0,"let"],[1,"math:range"],[[0,"lambda"],[1,"start"],[1,"end"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<="],[1,"count"],[1,"end"]],[[0,"rec:iterate"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[1,"count"]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"rec:iterate"],[],[1,"start"]]]]],[[0,"let"],[1,"math:sequence"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"end"],[[0,"length"],[1,"arr"]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"out"]],[1,"end"]],[[0,"rec:iterate"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[1,"count"]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"rec:iterate"],[],[2,0]]]]],[[0,"let"],[1,"math:sequence-n"],[[0,"lambda"],[1,"n"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"out"]],[1,"n"]],[[0,"rec:iterate"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[1,"count"]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"rec:iterate"],[],[2,0]]]]],[[0,"let"],[1,"math:between?"],[[0,"lambda"],[1,"v"],[1,"min"],[1,"max"],[[0,"and"],[[0,">"],[1,"v"],[1,"min"]],[[0,"<"],[1,"v"],[1,"max"]]]]],[[0,"let"],[1,"math:overlap?"],[[0,"lambda"],[1,"v"],[1,"min"],[1,"max"],[[0,"and"],[[0,">="],[1,"v"],[1,"min"]],[[0,"<="],[1,"v"],[1,"max"]]]]],[[0,"let"],[1,"math:permutations"],[[0,"lambda"],[1,"xs"],[[0,"if"],[[0,"length"],[1,"xs"]],[[0,"array:flat-one"],[[0,"array:enumerated-map"],[1,"xs"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"array:map"],[[0,"math:permutations"],[[0,"array:enumerated-exclude"],[1,"xs"],[[0,"lambda"],[1,"."],[1,"j"],[[0,"="],[1,"i"],[1,"j"]]]]],[[0,"lambda"],[1,"vs"],[[0,"cons"],[[0,"array"],[1,"x"]],[1,"vs"]]]]]]],[[0,"array"],[]]]]],[[0,"let"],[1,"math:greater?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:lesser?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"<"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:lesser-or-equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"<="],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:greater-or-equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">="],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"="],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:addition"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"+"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:multiplication"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"*"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:division"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"/"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:subtraction"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"-"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:summation"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"+"],[1,"a"],[1,"b"]]],[[0,"+"]]]]],[[0,"let"],[1,"math:product"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"*"],[1,"a"],[1,"b"]]],[[0,"*"]]]]],[[0,"let"],[1,"math:maximum"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]],[[0,"car"],[1,"arr"]]]]],[[0,"let"],[1,"math:minimum"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"<"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]],[[0,"car"],[1,"arr"]]]]],[[0,"let"],[1,"math:max"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:min"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"<"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:increment"],[[0,"lambda"],[1,"i"],[[0,"+"],[1,"i"],[2,1]]]],[[0,"let"],[1,"math:floor"],[[0,"lambda"],[1,"n"],[[0,"|"],[1,"n"],[2,0]]]],[[0,"let"],[1,"math:round"],[[0,"lambda"],[1,"n"],[[0,"|"],[[0,"+"],[1,"n"],[2,0.5]],[2,0]]]],[[0,"let"],[1,"math:set-bit"],[[0,"lambda"],[1,"n"],[1,"bit"],[[0,"|"],[1,"n"],[[0,"<<"],[2,1],[1,"bit"]]]]],[[0,"let"],[1,"math:clear-bit"],[[0,"lambda"],[1,"n"],[1,"bit"],[[0,"&"],[1,"n"],[[0,"~"],[[0,"<<"],[2,1],[1,"bit"]]]]]],[[0,"let"],[1,"math:power-of-two-bits"],[[0,"lambda"],[1,"n"],[[0,"<<"],[2,2],[[0,"-"],[1,"n"],[2,1]]]]],[[0,"let"],[1,"math:odd-bit?"],[[0,"lambda"],[1,"n"],[[0,"="],[[0,"&"],[1,"n"],[2,1]],[2,1]]]],[[0,"let"],[1,"math:average-bit"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">>"],[[0,"+"],[1,"a"],[1,"b"]],[2,1]]]],[[0,"let"],[1,"math:toggle-bit"],[[0,"lambda"],[1,"n"],[1,"a"],[1,"b"],[[0,"^"],[1,"a"],[1,"b"],[1,"n"]]]],[[0,"let"],[1,"math:same-sign-bit?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">="],[[0,"^"],[1,"a"],[1,"b"]],[2,0]]]],[[0,"let"],[1,"math:max-bit"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"-"],[1,"a"],[[0,"&"],[[0,"-"],[1,"a"],[1,"b"]],[[0,">>"],[[0,"-"],[1,"a"],[1,"b"]],[2,31]]]]]],[[0,"let"],[1,"math:min-bit"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"-"],[1,"a"],[[0,"&"],[[0,"-"],[1,"a"],[1,"b"]],[[0,">>"],[[0,"-"],[1,"b"],[1,"a"]],[2,31]]]]]],[[0,"let"],[1,"math:modulo-bit"],[[0,"lambda"],[1,"numerator"],[1,"divisor"],[[0,"&"],[1,"numerator"],[[0,"-"],[1,"divisor"],[2,1]]]]],[[0,"let"],[1,"math:n-one-bit?"],[[0,"lambda"],[1,"N"],[1,"nth"],[[0,"not"],[[0,"not"],[[0,"&"],[1,"N"],[[0,"<<"],[2,1],[1,"nth"]]]]]]],[[0,"let"],[1,"math:count-leading-zero-bits32"],[[0,"lambda"],[1,"x"],[[0,"if"],[[0,">="],[1,"x"],[2,0]],[[0,"-"],[2,32],[[0,"length"],[[0,"from:number->bit"],[1,"x"]]]]]]],[[0,"let"],[1,"math:bit-count32"],[[0,"lambda"],[1,"n0"],[[0,"do"],[[0,"let"],[1,"n1"],[[0,"-"],[1,"n0"],[[0,"&"],[[0,">>"],[1,"n0"],[2,1]],[2,1431655765]]]],[[0,"let"],[1,"n2"],[[0,"+"],[[0,"&"],[1,"n1"],[2,858993459]],[[0,"&"],[[0,">>"],[1,"n1"],[2,2]],[2,858993459]]]],[[0,">>"],[[0,"*"],[[0,"&"],[[0,"+"],[1,"n2"],[[0,">>"],[1,"n2"],[2,4]]],[2,252645135]],[2,16843009]],[2,24]]]]],[[0,"let"],[1,"math:bit-count"],[[0,"lambda"],[1,"n"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"n"],[1,"bits"],[[0,"if"],[[0,"="],[1,"n"],[2,0]],[1,"bits"],[[0,"rec:iter"],[[0,"/"],[1,"n"],[2,4294967296]],[[0,"+"],[1,"bits"],[[0,"math:bit-count32"],[[0,"|"],[1,"n"],[2,0]]]]]]]],[[0,"rec:iter"],[1,"n"],[2,0]]]]],[[0,"let"],[1,"math:square"],[[0,"lambda"],[1,"x"],[[0,"*"],[1,"x"],[1,"x"]]]],[[0,"let"],[1,"math:power"],[[0,"lambda"],[1,"base"],[1,"exp"],[[0,"if"],[[0,"<"],[1,"exp"],[2,0]],[[0,"if"],[[0,"="],[1,"base"],[2,0]],[],[[0,"/"],[[0,"*"],[1,"base"],[[0,"math:power"],[1,"base"],[[0,"-"],[[0,"*"],[1,"exp"],[2,-1]],[2,1]]]]]],[[0,"cond"],[[0,"="],[1,"exp"],[2,0]],[2,1],[[0,"="],[1,"exp"],[2,1]],[1,"base"],[[0,"*"]],[[0,"*"],[1,"base"],[[0,"math:power"],[1,"base"],[[0,"-"],[1,"exp"],[2,1]]]]]]]],[[0,"let"],[1,"math:greatest-common-divisor"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"rec:gcd"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"="],[1,"b"],[2,0]],[1,"a"],[[0,"rec:gcd"],[1,"b"],[[0,"mod"],[1,"a"],[1,"b"]]]]]],[[0,"rec:gcd"],[1,"a"],[1,"b"]]]]],[[0,"let"],[1,"math:least-common-divisor"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"*"],[1,"a"],[1,"b"],[[0,"/"],[[0,"math:greatest-common-divisor"],[1,"a"],[1,"b"]]]]]],[[0,"let"],[1,"math:sqrt"],[[0,"lambda"],[1,"x"],[[0,"do"],[[0,"let"],[1,"is-good-enough"],[[0,"lambda"],[1,"g"],[1,"x"],[[0,"<"],[[0,"math:abs"],[[0,"-"],[[0,"math:square"],[1,"g"]],[1,"x"]]],[2,0.01]]]],[[0,"let"],[1,"improve-guess"],[[0,"lambda"],[1,"g"],[1,"x"],[[0,"math:average"],[1,"g"],[[0,"*"],[1,"x"],[[0,"/"],[1,"g"]]]]]],[[0,"let"],[1,"rec:sqrt-rec:iter"],[[0,"lambda"],[1,"g"],[1,"x"],[[0,"if"],[[0,"is-good-enough"],[1,"g"],[1,"x"]],[1,"g"],[[0,"rec:sqrt-rec:iter"],[[0,"improve-guess"],[1,"g"],[1,"x"]],[1,"x"]]]]],[[0,"rec:sqrt-rec:iter"],[2,1],[1,"x"]]]]],[[0,"let"],[1,"math:circumference"],[[0,"lambda"],[1,"radius"],[[0,"*"],[1,"math:pi"],[[0,"*"],[1,"radius"],[2,2]]]]],[[0,"let"],[1,"math:hypotenuse"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"math:sqrt"],[[0,"+"],[[0,"*"],[1,"a"],[1,"a"]],[[0,"*"],[1,"b"],[1,"b"]]]]]],[[0,"let"],[1,"math:abs"],[[0,"lambda"],[1,"n"],[[0,"-"],[[0,"^"],[1,"n"],[[0,">>"],[1,"n"],[2,31]]],[[0,">>"],[1,"n"],[2,31]]]]],[[0,"let"],[1,"math:nth-digit"],[[0,"lambda"],[1,"digit"],[1,"n"],[[0,"|"],[[0,"mod"],[[0,"/"],[1,"digit"],[[0,"math:power"],[2,10],[[0,"-"],[1,"n"],[2,1]]]],[2,10]],[2,0.5]]]],[[0,"let"],[1,"math:normalize"],[[0,"lambda"],[1,"value"],[1,"math:min"],[1,"math:max"],[[0,"*"],[[0,"-"],[1,"value"],[1,"math:min"]],[[0,"/"],[[0,"-"],[1,"math:max"],[1,"math:min"]]]]]],[[0,"let"],[1,"math:linear-interpolation"],[[0,"lambda"],[1,"a"],[1,"b"],[1,"n"],[[0,"+"],[[0,"*"],[[0,"-"],[2,1],[1,"n"]],[1,"a"]],[[0,"*"],[1,"n"],[1,"b"]]]]],[[0,"let"],[1,"math:gauss-sum"],[[0,"lambda"],[1,"n"],[[0,"*"],[1,"n"],[[0,"+"],[1,"n"],[2,1]],[2,0.5]]]],[[0,"let"],[1,"math:gauss-sum-sequance"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"*"],[[0,"+"],[1,"a"],[1,"b"]],[[0,"+"],[[0,"-"],[1,"b"],[1,"a"]],[2,1]],[2,0.5]]]],[[0,"let"],[1,"math:clamp"],[[0,"lambda"],[1,"x"],[1,"limit"],[[0,"if"],[[0,">"],[1,"x"],[1,"limit"]],[1,"limit"],[1,"x"]]]],[[0,"let"],[1,"math:clamp-range"],[[0,"lambda"],[1,"x"],[1,"start"],[1,"end"],[[0,"cond"],[[0,">"],[1,"x"],[1,"end"]],[1,"end"],[[0,"<"],[1,"x"],[1,"start"]],[1,"start"],[[0,"*"]],[1,"x"]]]],[[0,"let"],[1,"math:odd?"],[[0,"lambda"],[1,"x"],[[0,"="],[[0,"mod"],[1,"x"],[2,2]],[2,1]]]],[[0,"let"],[1,"math:even?"],[[0,"lambda"],[1,"x"],[[0,"="],[[0,"mod"],[1,"x"],[2,2]],[2,0]]]],[[0,"let"],[1,"math:enumerated-odd?"],[[0,"lambda"],[1,"."],[1,"i"],[[0,"="],[[0,"mod"],[1,"i"],[2,2]],[2,1]]]],[[0,"let"],[1,"math:enumerated-even?"],[[0,"lambda"],[1,"."],[1,"i"],[[0,"="],[[0,"mod"],[1,"i"],[2,2]],[2,0]]]],[[0,"let"],[1,"math:sign"],[[0,"lambda"],[1,"n"],[[0,"if"],[[0,"<"],[1,"n"],[2,0]],[2,-1],[2,1]]]],[[0,"let"],[1,"math:radians"],[[0,"lambda"],[1,"deg"],[[0,"*"],[1,"deg"],[1,"math:pi"],[[0,"/"],[2,180]]]]],[[0,"let"],[1,"math:average"],[[0,"lambda"],[1,"x"],[1,"y"],[[0,"*"],[[0,"+"],[1,"x"],[1,"y"]],[2,0.5]]]],[[0,"let"],[1,"math:euclidean-mod"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"mod"],[[0,"+"],[[0,"mod"],[1,"a"],[1,"b"]],[1,"b"]],[1,"b"]]]],[[0,"let"],[1,"math:euclidean-distance"],[[0,"lambda"],[1,"x1"],[1,"y1"],[1,"x2"],[1,"y2"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"-"],[1,"x1"],[1,"x2"]]],[[0,"let"],[1,"b"],[[0,"-"],[1,"y1"],[1,"y2"]]],[[0,"math:sqrt"],[[0,"+"],[[0,"*"],[1,"a"],[1,"a"]],[[0,"*"],[1,"b"],[1,"b"]]]]]]],[[0,"let"],[1,"math:manhattan-distance"],[[0,"lambda"],[1,"x1"],[1,"y1"],[1,"x2"],[1,"y2"],[[0,"+"],[[0,"math:abs"],[[0,"-"],[1,"x2"],[1,"x1"]]],[[0,"math:abs"],[[0,"-"],[1,"y2"],[1,"y1"]]]]]],[[0,"let"],[1,"math:positive?"],[[0,"lambda"],[1,"num"],[[0,">"],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:negative?"],[[0,"lambda"],[1,"num"],[[0,"<"],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:zero?"],[[0,"lambda"],[1,"num"],[[0,"="],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:negative-one?"],[[0,"lambda"],[1,"num"],[[0,"="],[1,"num"],[2,-1]]]],[[0,"let"],[1,"math:divisible?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"="],[[0,"mod"],[1,"a"],[1,"b"]],[2,0]]]],[[0,"let"],[1,"math:factorial"],[[0,"lambda"],[1,"n"],[[0,"if"],[[0,"<="],[1,"n"],[2,0]],[2,1],[[0,"*"],[1,"n"],[[0,"math:factorial"],[[0,"-"],[1,"n"],[2,1]]]]]]],[[0,"let"],[1,"math:sine"],[[0,"lambda"],[1,"rad"],[1,"terms"],[[0,"do"],[[0,"let"],[1,"sine"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"rec:inc"],[[0,"lambda"],[1,"i"],[[0,"do"],[[0,"var:set!"],[1,"sine"],[[0,"+"],[[0,"var:get"],[1,"sine"]],[[0,"*"],[[0,"/"],[[0,"math:factorial"],[[0,"+"],[[0,"*"],[2,2],[1,"i"]],[2,1]]]],[[0,"math:power"],[2,-1],[1,"i"]],[[0,"math:power"],[1,"rad"],[[0,"+"],[[0,"*"],[2,2],[1,"i"]],[2,1]]]]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"terms"]],[[0,"rec:inc"],[[0,"+"],[1,"i"],[2,1]]],[[0,"var:get"],[1,"sine"]]]]]],[[0,"rec:inc"],[2,0]]]]],[[0,"let"],[1,"math:cosine"],[[0,"lambda"],[1,"rad"],[1,"terms"],[[0,"do"],[[0,"let"],[1,"cosine"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"rec:inc"],[[0,"lambda"],[1,"i"],[[0,"do"],[[0,"var:set!"],[1,"cosine"],[[0,"+"],[[0,"var:get"],[1,"cosine"]],[[0,"*"],[[0,"/"],[[0,"math:factorial"],[[0,"*"],[2,2],[1,"i"]]]],[[0,"math:power"],[2,-1],[1,"i"]],[[0,"math:power"],[1,"rad"],[[0,"*"],[2,2],[1,"i"]]]]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"terms"]],[[0,"rec:inc"],[[0,"+"],[1,"i"],[2,1]]],[[0,"var:get"],[1,"cosine"]]]]]],[[0,"rec:inc"],[2,0]]]]],[[0,"let"],[1,"math:prime-factors"],[[0,"lambda"],[1,"N"],[[0,"do"],[[0,"let"],[1,"a"],[]],[[0,"let"],[1,"n"],[[0,"var:def"],[1,"N"]]],[[0,"let"],[1,"f"],[[0,"var:def"],[2,2]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[[0,"if"],[[0,">"],[[0,"var:get"],[1,"n"]],[2,1]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"mod"],[[0,"var:get"],[1,"n"]],[[0,"var:get"],[1,"f"]]],[2,0]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[[0,"var:get"],[1,"f"]]],[[0,"var:set!"],[1,"n"],[[0,"*"],[[0,"var:get"],[1,"n"]],[[0,"/"],[[0,"var:get"],[1,"f"]]]]]]]],[[0,"var:set!"],[1,"f"],[[0,"+"],[[0,"var:get"],[1,"f"]],[2,1]]]],[[0,"rec:iterate"]]]]],[1,"a"]]]],[[0,"rec:iterate"]]]]],[[0,"let"],[1,"math:prime?"],[[0,"lambda"],[1,"n"],[[0,"cond"],[[0,"="],[1,"n"],[2,1]],[2,0],[[0,"<"],[1,"n"],[2,0]],[2,0],[[0,"*"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"i"],[1,"end"],[[0,"do"],[[0,"let"],[1,"prime?"],[[0,"not"],[[0,"="],[[0,"mod"],[1,"n"],[1,"i"]],[2,0]]]],[[0,"if"],[[0,"and"],[[0,"<="],[1,"i"],[1,"end"]],[1,"prime?"]],[[0,"rec:iter"],[[0,"+"],[1,"i"],[2,1]],[1,"end"]],[1,"prime?"]]]]],[[0,"or"],[[0,"="],[1,"n"],[2,2]],[[0,"rec:iter"],[2,2],[[0,"math:sqrt"],[1,"n"]]]]]]]]]],[[0,"let"],[1,"math:number-of-digits"],[[0,"lambda"],[1,"n"],[[0,"cond"],[[0,"="],[1,"n"],[2,0]],[2,1],[[0,"<"],[1,"n"],[2,0]],[[0,"length"],[[0,"from:number->digits"],[[0,"|"],[[0,"*"],[1,"n"],[2,-1]],[2,0]]]],[[0,"*"]],[[0,"length"],[[0,"from:number->digits"],[[0,"|"],[1,"n"],[2,0]]]]]]],[[0,"let"],[1,"math:largest-power"],[[0,"lambda"],[1,"N"],[[0,"do"],[[0,"let"],[1,"N1"],[[0,"|"],[1,"N"],[[0,">>"],[1,"N"],[2,1]]]],[[0,"let"],[1,"N2"],[[0,"|"],[1,"N1"],[[0,">>"],[1,"N1"],[2,2]]]],[[0,"let"],[1,"N3"],[[0,"|"],[1,"N2"],[[0,">>"],[1,"N2"],[2,4]]]],[[0,"let"],[1,"N4"],[[0,"|"],[1,"N3"],[[0,">>"],[1,"N3"],[2,8]]]],[[0,">>"],[[0,"+"],[1,"N4"],[2,1]],[2,1]]]]],[[0,"let"],[1,"math:cartesian-product"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:fold"],[1,"a"],[[0,"lambda"],[1,"p"],[1,"x"],[[0,"array:merge!"],[1,"p"],[[0,"array:map"],[1,"b"],[[0,"lambda"],[1,"y"],[[0,"array"],[1,"x"],[1,"y"]]]]]],[]]]],[[0,"let"],[1,"math:enumeration"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"I"],[[0,"var:def"],[2,-1]]],[[0,"let"],[1,"rec:inc"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"i"],[[0,"+"],[[0,"var:get"],[1,"I"]],[2,1]]],[[0,"var:set!"],[1,"I"],[1,"i"]],[1,"i"]]]]]]],[[0,"let"],[1,"math:palindrome?"],[[0,"lambda"],[1,"arr"],[[0,"array:every?"],[[0,"array:map"],[[0,"array:zip"],[1,"arr"],[[0,"array:reverse"],[1,"arr"]]],[1,"tuple:subtract"]],[1,"math:zero?"]]]],[[0,"let"],[1,"math:max-sub-array-sum"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"get-sum"],[[0,"lambda"],[1,"arr"],[[0,"get"],[1,"arr"],[2,0]]]],[[0,"let"],[1,"set-sum!"],[[0,"lambda"],[1,"arr"],[1,"value"],[[0,"set!"],[1,"arr"],[2,0],[1,"value"]]]],[[0,"let"],[1,"get-max"],[[0,"lambda"],[1,"arr"],[[0,"get"],[1,"arr"],[2,1]]]],[[0,"let"],[1,"set-max!"],[[0,"lambda"],[1,"arr"],[1,"value"],[[0,"set!"],[1,"arr"],[2,1],[1,"value"]]]],[[0,"car"],[[0,"cdr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"set-sum!"],[1,"a"],[[0,"+"],[[0,"get-sum"],[1,"a"]],[1,"b"]]],[[0,"if"],[[0,"<"],[[0,"get-max"],[1,"a"]],[[0,"get-sum"],[1,"a"]]],[[0,"set-max!"],[1,"a"],[[0,"get-sum"],[1,"a"]]]],[[0,"if"],[[0,"<"],[[0,"get-sum"],[1,"a"]],[2,0]],[[0,"set-sum!"],[1,"a"],[2,0]]],[1,"a"]]],[[0,"array"],[2,0],[1,"math:min-safe-integer"]]]]]]]],[[0,"let"],[1,"array:for"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"out"],[[0,"if"],[[0,"length"],[1,"out"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"callback"],[[0,"car"],[1,"out"]]],[[0,"rec:iter"],[[0,"cdr"],[1,"out"]]]]]]]]],[[0,"rec:iter"],[1,"arr"]],[1,"arr"]]]],[[0,"let"],[1,"array:fill"],[[0,"lambda"],[1,"n"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"="],[1,"i"],[2,0]],[1,"arr"],[[0,"rec:iter"],[[0,"cons"],[1,"arr"],[[0,"array"],[[0,"callback"]]]],[[0,"-"],[1,"i"],[2,1]]]]]],[[0,"rec:iter"],[],[1,"n"]]]]],[[0,"let"],[1,"array:of"],[[0,"lambda"],[1,"n"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"="],[1,"i"],[1,"n"]],[1,"arr"],[[0,"rec:iter"],[[0,"cons"],[1,"arr"],[[0,"array"],[[0,"callback"],[1,"i"]]]],[[0,"+"],[1,"i"],[2,1]]]]]],[[0,"rec:iter"],[],[2,0]]]]],[[0,"let"],[1,"array:map"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"callback"],[[0,"car"],[1,"arr"]]]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:select"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:exclude"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"if"],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]]]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:fold"],[[0,"lambda"],[1,"arr"],[1,"callback"],[1,"initial"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"callback"],[1,"out"],[[0,"car"],[1,"arr"]]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[1,"initial"]]]]],[[0,"let"],[1,"array:every?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"callback"],[[0,"car"],[1,"arr"]]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]]],[[0,"not"],[[0,"length"],[1,"arr"]]]]]],[[0,"rec:iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:some?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]]]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]]],[[0,"not"],[[0,"not"],[[0,"length"],[1,"arr"]]]]]]],[[0,"rec:iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:find"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"car"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]]]],[]]]],[[0,"rec:iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:has?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[2,1],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]]]]]]],[[0,"rec:iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:reverse"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"array:merge!"],[[0,"array"],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:append!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"set!"],[1,"q"],[[0,"length"],[1,"q"]],[1,"item"]]]],[[0,"let"],[1,"array:tail!"],[[0,"lambda"],[1,"q"],[[0,"set!"],[1,"q"],[2,-1]]]],[[0,"let"],[1,"array:push!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"do"],[[0,"set!"],[1,"q"],[[0,"length"],[1,"q"]],[1,"item"]],[1,"item"]]]],[[0,"let"],[1,"array:pop!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"l"],[[0,"get"],[1,"q"],[2,-1]]],[[0,"set!"],[1,"q"],[2,-1]],[1,"l"]]]],[[0,"let"],[1,"array:unique"],[[0,"lambda"],[1,"arr"],[[0,"array:map"],[[0,"array:select"],[[0,"array:zip"],[[0,"let"],[1,"sorted"],[[0,"array:sort"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">"],[1,"a"],[1,"b"]]]]],[[0,"math:sequence"],[1,"sorted"]]],[[0,"lambda"],[1,"x"],[[0,"do"],[[0,"let"],[1,"index"],[[0,"car"],[[0,"cdr"],[1,"x"]]]],[[0,"or"],[[0,"not"],[1,"x"]],[[0,"not"],[[0,"="],[[0,"get"],[1,"sorted"],[[0,"-"],[1,"index"],[2,1]]],[[0,"get"],[1,"sorted"],[1,"index"]]]]]]]],[1,"car"]]]],[[0,"let"],[1,"array:for-range"],[[0,"lambda"],[1,"start"],[1,"end"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"end"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"callback"],[1,"i"]],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]]]]]]]]],[[0,"rec:iterate"],[1,"start"]]]]],[[0,"let"],[1,"array:traverse"],[[0,"lambda"],[1,"x"],[1,"callback"],[[0,"if"],[[0,"atom?"],[1,"x"]],[[0,"callback"],[1,"x"]],[[0,"rec:iterate"],[1,"x"],[[0,"lambda"],[1,"y"],[[0,"array:traverse"],[1,"y"],[1,"callback"]]]]]]],[[0,"let"],[1,"array:iterate"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"array:for-range"],[2,0],[[0,"length"],[1,"arr"]],[1,"callback"]],[1,"arr"]]]],[[0,"let"],[1,"array:empty?"],[[0,"lambda"],[1,"arr"],[[0,"not"],[[0,"length"],[1,"arr"]]]]],[[0,"let"],[1,"array:not-empty?"],[[0,"lambda"],[1,"arr"],[[0,"="],[[0,"not"],[[0,"length"],[1,"arr"]]],[2,0]]]],[[0,"let"],[1,"array:count-of"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"length"],[[0,"array:select"],[1,"arr"],[1,"callback"]]]]],[[0,"let"],[1,"array:empty!"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"arr"],[2,-1]],[[0,"rec:iterate"]]]]],[1,"arr"]]]],[[0,"rec:iterate"]]]]],[[0,"let"],[1,"array:in-bounds?"],[[0,"lambda"],[1,"arr"],[1,"index"],[[0,"and"],[[0,"<"],[1,"index"],[[0,"length"],[1,"arr"]]],[[0,">="],[1,"index"],[2,0]]]]],[[0,"let"],[1,"array:slice"],[[0,"lambda"],[1,"arr"],[1,"start"],[1,"end"],[[0,"do"],[[0,"let"],[1,"bounds"],[[0,"-"],[1,"end"],[1,"start"]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[1,"out"],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"get"],[1,"arr"],[[0,"+"],[1,"start"],[1,"i"]]]]],[1,"out"]]]],[[0,"rec:iterate"],[2,0],[]]]]],[[0,"let"],[1,"array:binary-search"],[[0,"lambda"],[1,"arr"],[1,"target"],[[0,"do"],[[0,"let"],[1,"rec:search"],[[0,"lambda"],[1,"arr"],[1,"target"],[1,"start"],[1,"end"],[[0,"do"],[[0,"if"],[[0,"<="],[1,"start"],[1,"end"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"index"],[[0,"math:floor"],[[0,"*"],[[0,"+"],[1,"start"],[1,"end"]],[2,0.5]]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"arr"],[1,"index"]]],[[0,"if"],[[0,"="],[1,"target"],[1,"current"]],[1,"target"],[[0,"if"],[[0,">"],[1,"current"],[1,"target"]],[[0,"rec:search"],[1,"arr"],[1,"target"],[1,"start"],[[0,"-"],[1,"index"],[2,1]]],[[0,"rec:search"],[1,"arr"],[1,"target"],[[0,"+"],[1,"index"],[2,1]],[1,"end"]]]]]]]]]]],[[0,"rec:search"],[1,"arr"],[1,"target"],[2,0],[[0,"length"],[1,"arr"]]]]]],[[0,"let"],[1,"array:zip"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"a"],[1,"b"],[1,"output"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"a"]],[[0,"cdr"],[1,"b"]],[[0,"set!"],[1,"output"],[[0,"length"],[1,"output"]],[[0,"array"],[[0,"car"],[1,"a"]],[[0,"car"],[1,"b"]]]]],[1,"output"]]]],[[0,"rec:iterate"],[1,"A"],[1,"B"],[]]]]],[[0,"let"],[1,"array:equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"or"],[[0,"and"],[[0,"atom?"],[1,"a"]],[[0,"atom?"],[1,"b"]],[[0,"="],[1,"a"],[1,"b"]]],[[0,"and"],[[0,"array?"],[1,"a"]],[[0,"="],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"not"],[[0,"array:some?"],[[0,"math:sequence"],[1,"a"]],[[0,"lambda"],[1,"i"],[[0,"not"],[[0,"array:equal?"],[[0,"get"],[1,"a"],[1,"i"]],[[0,"get"],[1,"b"],[1,"i"]]]]]]]]]]],[[0,"let"],[1,"array:join"],[[0,"lambda"],[1,"arr"],[1,"delim"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[1,"delim"],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:chars"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:lines"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:new-line"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:commas"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:comma"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:spaces"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:space"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:dots"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:dot"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:colons"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:colon"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:semi-colons"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:semi-colon"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:dashes"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:dash"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:flat-one"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:merge!"],[1,"a"],[[0,"if"],[[0,"array?"],[1,"b"]],[1,"b"],[[0,"array"],[1,"b"]]]]],[]]]],[[0,"let"],[1,"array:flat"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"flatten"],[[0,"lambda"],[1,"item"],[[0,"if"],[[0,"array?"],[1,"item"]],[[0,"array:fold"],[1,"item"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:merge!"],[1,"a"],[[0,"flatten"],[1,"b"]]]],[]],[[0,"array"],[1,"item"]]]]],[[0,"flatten"],[1,"arr"]]]]],[[0,"let"],[1,"array:sort"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"if"],[[0,"<="],[[0,"length"],[1,"arr"]],[2,1]],[1,"arr"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"pivot"],[[0,"car"],[1,"arr"]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[1,"bounds"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"current"],[[0,"get"],[1,"arr"],[1,"i"]]],[[0,"let"],[1,"predicate"],[[0,"callback"],[1,"current"],[1,"pivot"]]],[[0,"let"],[1,"left"],[[0,"if"],[[0,"="],[1,"predicate"],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"current"]]],[1,"a"]]],[[0,"let"],[1,"right"],[[0,"if"],[[0,"="],[1,"predicate"],[2,1]],[[0,"cons"],[1,"b"],[[0,"array"],[1,"current"]]],[1,"b"]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"],[1,"left"],[1,"right"]],[[0,"array"],[1,"left"],[1,"right"]]]]]],[[0,"let"],[1,"sorted"],[[0,"rec:iterate"],[2,1],[[0,"-"],[[0,"length"],[1,"arr"]],[2,1]],[],[]]],[[0,"let"],[1,"left"],[[0,"car"],[1,"sorted"]]],[[0,"let"],[1,"right"],[[0,"car"],[[0,"cdr"],[1,"sorted"]]]],[[0,"cons"],[[0,"array:sort"],[1,"left"],[1,"callback"]],[[0,"array"],[1,"pivot"]],[[0,"array:sort"],[1,"right"],[1,"callback"]]]]]]]]]],[[0,"let"],[1,"array:sorted-ascending?"],[[0,"lambda"],[1,"arr"],[[0,"array:enumerated-every?"],[1,"arr"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"or"],[[0,"="],[1,"i"],[2,0]],[[0,">="],[1,"x"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]]]]]]],[[0,"let"],[1,"array:sorted-descending?"],[[0,"lambda"],[1,"arr"],[[0,"array:enumerated-every?"],[1,"arr"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"or"],[[0,"="],[1,"i"],[2,0]],[[0,"<="],[1,"x"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]]]]]]],[[0,"let"],[1,"array:sorted-by?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"array:enumerated-every?"],[1,"arr"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"or"],[[0,"="],[1,"i"],[2,0]],[[0,"callback"],[1,"x"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]]]]]]],[[0,"let"],[1,"array:set"],[[0,"lambda"],[1,"arr"],[1,"index"],[1,"item"],[[0,"set!"],[[0,"array:shallow-copy"],[1,"arr"]],[1,"index"],[1,"item"]]]],[[0,"let"],[1,"array:adjacent-difference"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"length"],[1,"arr"]]],[[0,"if"],[[0,"="],[1,"len"],[2,1]],[1,"arr"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"array"],[[0,"car"],[1,"arr"]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[1,"result"],[[0,"if"],[[0,"<"],[1,"i"],[1,"len"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]],[[0,"set!"],[1,"result"],[1,"i"],[[0,"callback"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]],[[0,"get"],[1,"arr"],[1,"i"]]]]]]]],[1,"result"]]]],[[0,"rec:iterate"],[2,1],[1,"arr"]]]]]]]]],[[0,"let"],[1,"array:adjacent-find"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"length"],[1,"arr"]]],[[0,"if"],[[0,"not"],[[0,"="],[1,"len"],[2,1]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"len"]],[[0,"if"],[[0,"callback"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"arr"],[1,"i"]]]],[1,"prev"],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]]]],[]]]],[[0,"rec:iterate"],[2,1]]]]]]]]],[[0,"let"],[1,"array:adjacent"],[[0,"lambda"],[1,"arr"],[1,"directions"],[1,"y"],[1,"x"],[1,"callback"],[[0,"array:for"],[1,"directions"],[[0,"lambda"],[1,"dir"],[[0,"do"],[[0,"let"],[1,"dy"],[[0,"+"],[[0,"car"],[1,"dir"]],[1,"y"]]],[[0,"let"],[1,"dx"],[[0,"+"],[[0,"car"],[[0,"cdr"],[1,"dir"]]],[1,"x"]]],[[0,"if"],[[0,"and"],[[0,"array:in-bounds?"],[1,"arr"],[1,"dy"]],[[0,"array:in-bounds?"],[[0,"get"],[1,"arr"],[1,"dy"]],[1,"dx"]]],[[0,"callback"],[[0,"get"],[[0,"get"],[1,"arr"],[1,"dy"]],[1,"dx"]],[1,"dir"]]]]]]]],[[0,"let"],[1,"array:partition"],[[0,"lambda"],[1,"arr"],[1,"n"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"x"],[[0,"car"],[1,"b"]]],[[0,"let"],[1,"i"],[[0,"car"],[[0,"cdr"],[1,"b"]]]],[[0,"if"],[[0,"mod"],[1,"i"],[1,"n"]],[[0,"array:push!"],[[0,"get"],[1,"a"],[2,-1]],[1,"x"]],[[0,"array:push!"],[1,"a"],[[0,"array"],[1,"x"]]]],[1,"a"]]],[]]]],[[0,"let"],[1,"from:digit->char"],[[0,"lambda"],[1,"d"],[[0,"cond"],[[0,"="],[1,"d"],[2,0]],[1,"char:0"],[[0,"="],[1,"d"],[2,1]],[1,"char:1"],[[0,"="],[1,"d"],[2,2]],[1,"char:2"],[[0,"="],[1,"d"],[2,3]],[1,"char:3"],[[0,"="],[1,"d"],[2,4]],[1,"char:4"],[[0,"="],[1,"d"],[2,5]],[1,"char:5"],[[0,"="],[1,"d"],[2,6]],[1,"char:6"],[[0,"="],[1,"d"],[2,7]],[1,"char:7"],[[0,"="],[1,"d"],[2,8]],[1,"char:8"],[[0,"="],[1,"d"],[2,9]],[1,"char:9"],[[0,"*"]],[]]]],[[0,"let"],[1,"from:char->digit"],[[0,"lambda"],[1,"c"],[[0,"cond"],[[0,"="],[1,"c"],[1,"char:0"]],[2,0],[[0,"="],[1,"c"],[1,"char:1"]],[2,1],[[0,"="],[1,"c"],[1,"char:2"]],[2,2],[[0,"="],[1,"c"],[1,"char:3"]],[2,3],[[0,"="],[1,"c"],[1,"char:4"]],[2,4],[[0,"="],[1,"c"],[1,"char:5"]],[2,5],[[0,"="],[1,"c"],[1,"char:6"]],[2,6],[[0,"="],[1,"c"],[1,"char:7"]],[2,7],[[0,"="],[1,"c"],[1,"char:8"]],[2,8],[[0,"="],[1,"c"],[1,"char:9"]],[2,9],[[0,"*"]],[]]]],[[0,"let"],[1,"from:chars->digits"],[[0,"lambda"],[1,"chars"],[[0,"array:map"],[1,"chars"],[[0,"lambda"],[1,"ch"],[[0,"from:char->digit"],[1,"ch"]]]]]],[[0,"let"],[1,"from:digits->chars"],[[0,"lambda"],[1,"numbers"],[[0,"array:map"],[1,"numbers"],[[0,"lambda"],[1,"digit"],[[0,"from:digit->char"],[1,"digit"]]]]]],[[0,"let"],[1,"from:digits->number"],[[0,"lambda"],[1,"digits"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"rem"],[1,"num"],[1,"base"],[[0,"if"],[[0,"length"],[1,"rem"]],[[0,"rec:iter"],[[0,"cdr"],[1,"rem"]],[[0,"+"],[1,"num"],[[0,"*"],[1,"base"],[[0,"car"],[1,"rem"]]]],[[0,"*"],[1,"base"],[2,0.1]]],[1,"num"]]]],[[0,"rec:iter"],[1,"digits"],[2,0],[[0,"*"],[[0,"math:power"],[2,10],[[0,"length"],[1,"digits"]]],[2,0.1]]]]]],[[0,"let"],[1,"from:negative-or-positive-digits->chars"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:map"],[1,"arr"],[[0,"lambda"],[1,"x"],[[0,"if"],[[0,"math:negative?"],[1,"x"]],[[0,"array"],[2,0],[[0,"*"],[1,"x"],[2,-1]]],[[0,"array"],[2,1],[1,"x"]]]]],[[0,"lambda"],[1,"a"],[1,"x"],[[0,"if"],[[0,"car"],[1,"x"]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[[0,"from:digit->char"],[[0,"car"],[[0,"cdr"],[1,"x"]]]]],[[0,"set!"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"char:dash"]],[[0,"length"],[1,"a"]],[[0,"from:digit->char"],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]]],[]]]],[[0,"let"],[1,"from:number->digits"],[[0,"lambda"],[1,"num"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"num"],[1,"res"],[[0,"cond"],[[0,">="],[1,"num"],[2,1]],[[0,"rec:iter"],[[0,"/"],[1,"num"],[2,10]],[[0,"set!"],[1,"res"],[[0,"length"],[1,"res"]],[[0,"|"],[[0,"mod"],[1,"num"],[2,10]],[2,0]]]],[[0,"="],[1,"num"],[2,0]],[[0,"array"],[2,0]],[[0,"*"]],[1,"res"]]]],[[0,"array:reverse"],[[0,"rec:iter"],[1,"num"],[]]]]]],[[0,"let"],[1,"from:number->bits"],[[0,"lambda"],[1,"num"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"num"],[1,"res"],[[0,"cond"],[[0,">="],[1,"num"],[2,1]],[[0,"rec:iter"],[[0,"/"],[1,"num"],[2,2]],[[0,"set!"],[1,"res"],[[0,"length"],[1,"res"]],[[0,"|"],[[0,"mod"],[1,"num"],[2,2]],[2,0]]]],[[0,"="],[1,"num"],[2,0]],[[0,"array"],[2,0]],[[0,"*"]],[1,"res"]]]],[[0,"array:reverse"],[[0,"rec:iter"],[1,"num"],[]]]]]],[[0,"let"],[1,"from:numbers->chars"],[[0,"lambda"],[1,"x"],[[0,"array:map"],[1,"x"],[[0,"lambda"],[1,"x"],[[0,"from:digits->chars"],[[0,"from:number->digits"],[1,"x"]]]]]]],[[0,"let"],[1,"from:chars->numbers"],[[0,"lambda"],[1,"arr"],[[0,"array:map"],[[0,"array:select"],[[0,"array:map"],[[0,"array:map"],[1,"arr"],[1,"from:chars->digits"]],[1,"array:flat-one"]],[1,"length"]],[1,"from:digits->number"]]]],[[0,"let"],[1,"from:string->date"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"string:dashes"],[1,"str"]],[[0,"lambda"],[1,"d"],[[0,"from:digits->number"],[[0,"from:chars->digits"],[1,"d"]]]]]]],[[0,"let"],[1,"from:any->boolean"],[[0,"lambda"],[1,"val"],[[0,"not"],[[0,"not"],[1,"val"]]]]],[[0,"let"],[1,"from:array->set"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"s"],[[0,"array"],[],[],[],[]]],[[0,"array:for"],[1,"arr"],[[0,"lambda"],[1,"x"],[[0,"set:add!"],[1,"s"],[1,"x"]]]],[1,"s"]]]],[[0,"let"],[1,"from:array->table"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"s"],[[0,"array"],[],[],[],[]]],[[0,"array:for"],[1,"arr"],[[0,"lambda"],[1,"x"],[[0,"map:set!"],[1,"s"],[1,"x"],[2,0]]]],[1,"s"]]]],[[0,"let"],[1,"from:set->array"],[[0,"lambda"],[1,"set"],[[0,"array:select"],[[0,"array:flat-one"],[1,"set"]],[1,"length"]]]],[[0,"let"],[1,"from:map->array"],[[0,"lambda"],[1,"set"],[[0,"array:select"],[[0,"array:flat-one"],[1,"set"]],[1,"length"]]]],[[0,"let"],[1,"from:set->numbers"],[[0,"lambda"],[1,"set"],[[0,"array:map"],[[0,"from:set->array"],[1,"set"]],[[0,"lambda"],[1,"x"],[[0,"from:digits->number"],[[0,"from:chars->digits"],[1,"x"]]]]]]],[[0,"let"],[1,"from:array->brray"],[[0,"lambda"],[1,"initial"],[[0,"do"],[[0,"let"],[1,"q"],[[0,"new:brray"]]],[[0,"let"],[1,"half"],[[0,"math:floor"],[[0,"*"],[[0,"length"],[1,"initial"]],[2,0.5]]]],[[0,"let"],[1,"rec:left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[[0,"get"],[1,"initial"],[1,"index"]]],[[0,"if"],[[0,">"],[1,"index"],[2,0]],[[0,"rec:left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"rec:left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let"],[1,"rec:right"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[[0,"get"],[1,"initial"],[1,"index"]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:right"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:right"],[1,"half"],[[0,"-"],[[0,"length"],[1,"initial"]],[2,1]]],[1,"q"]]]],[[0,"let"],[1,"from:brray->array"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"out"],[]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"brray:get"],[1,"q"],[1,"index"]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:iter"],[2,0],[[0,"-"],[[0,"brray:length"],[1,"q"]],[2,1]]],[1,"out"]]]],[[0,"let"],[1,"array:shallow-copy"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"b"]]],[]]]],[[0,"let"],[1,"array:deep-copy"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[[0,"if"],[[0,"array?"],[1,"b"]],[[0,"array:deep-copy"],[1,"b"]],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:merge!"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"array:for"],[1,"b"],[[0,"lambda"],[1,"x"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"x"]]]],[1,"a"]]]],[[0,"let"],[1,"array:merge"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"out"],[]],[[0,"array:for"],[1,"b"],[[0,"lambda"],[1,"x"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[1,"x"]]]],[1,"out"]]]],[[0,"let"],[1,"array:swap-remove!"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"do"],[[0,"set!"],[1,"arr"],[1,"i"],[[0,"get"],[1,"arr"],[[0,"-"],[[0,"length"],[1,"arr"]],[2,1]]]],[[0,"set!"],[1,"arr"],[2,-1]]]]],[[0,"let"],[1,"array:swap!"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"j"],[[0,"do"],[[0,"let"],[1,"temp"],[[0,"get"],[1,"arr"],[1,"i"]]],[[0,"set!"],[1,"arr"],[1,"i"],[[0,"get"],[1,"arr"],[1,"j"]]],[[0,"set!"],[1,"arr"],[1,"j"],[1,"temp"]]]]],[[0,"let"],[1,"array:index-of"],[[0,"lambda"],[1,"arr"],[1,"item"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"="],[[0,"car"],[1,"arr"]],[1,"item"]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerate"],[[0,"lambda"],[1,"arr"],[[0,"array:zip"],[[0,"math:sequence"],[1,"arr"]],[1,"arr"]]]],[[0,"let"],[1,"array:enumerated-map"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-select"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-exclude"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"if"],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-fold"],[[0,"lambda"],[1,"arr"],[1,"callback"],[1,"initial"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"callback"],[1,"out"],[[0,"car"],[1,"arr"]],[1,"i"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[2,0],[1,"initial"]]]]],[[0,"let"],[1,"array:enumerated-find"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]],[[0,"car"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-find-index"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-every?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]],[[0,"not"],[[0,"length"],[1,"arr"]]]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-some?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]],[[0,"not"],[[0,"not"],[[0,"length"],[1,"arr"]]]]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:find-index"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:remove"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"x"],[[0,"do"],[[0,"if"],[[0,"="],[1,"x"],[1,"i"]],[1,"a"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"x"]]]]],[]]]],[[0,"let"],[1,"array:pad-right"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"cons"],[1,"b"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[1,"length"]]],[[0,"cons"],[1,"a"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"b"]],[[0,"length"],[1,"a"]]],[1,"length"]]]]]],[[0,"let"],[1,"array:pad-left"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"cons"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[1,"length"]],[1,"b"]],[[0,"cons"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"b"]],[[0,"length"],[1,"a"]]],[1,"length"]],[1,"a"]]]]],[[0,"let"],[1,"array:pad-right!"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"array:merge!"],[1,"b"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[1,"length"]]],[[0,"array:merge!"],[1,"a"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"b"]],[[0,"length"],[1,"a"]]],[1,"length"]]]]]],[[0,"let"],[1,"array:pad-left!"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"array:merge!"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[1,"length"]],[1,"b"]],[[0,"array:merge!"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"b"]],[[0,"length"],[1,"a"]]],[1,"length"]],[1,"a"]]]]],[[0,"let"],[1,"array:rotate-right"],[[0,"lambda"],[1,"arr"],[1,"n"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"set!"],[1,"a"],[[0,"mod"],[[0,"+"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[1,"n"]],[[0,"length"],[1,"arr"]]],[[0,"car"],[1,"b"]]]],[[0,"array"],[[0,"length"],[1,"arr"]],[1,"length"]]]]],[[0,"let"],[1,"array:rotate-left"],[[0,"lambda"],[1,"arr"],[1,"n"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"set!"],[1,"a"],[[0,"mod"],[[0,"+"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[[0,"-"],[[0,"length"],[1,"arr"]],[1,"n"]]],[[0,"length"],[1,"arr"]]],[[0,"car"],[1,"b"]]]],[[0,"array"],[[0,"length"],[1,"arr"]],[1,"length"]]]]],[[0,"let"],[1,"array:first"],[[0,"lambda"],[1,"arr"],[[0,"get"],[1,"arr"],[2,0]]]],[[0,"let"],[1,"array:last"],[[0,"lambda"],[1,"arr"],[[0,"get"],[1,"arr"],[2,-1]]]],[[0,"let"],[1,"string:character-occurances"],[[0,"lambda"],[1,"str"],[1,"letter"],[[0,"do"],[[0,"let"],[1,"arr"],[1,"str"]],[[0,"let"],[1,"bitmask"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"zero"],[1,"char:a"]],[[0,"let"],[1,"count"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"at-least-one?"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[1,"bounds"],[[0,"do"],[[0,"let"],[1,"ch"],[[0,"get"],[1,"arr"],[1,"i"]]],[[0,"let"],[1,"code"],[[0,"-"],[1,"ch"],[1,"zero"]]],[[0,"let"],[1,"mask"],[[0,"<<"],[2,1],[1,"code"]]],[[0,"if"],[[0,"and"],[[0,"if"],[[0,"="],[1,"ch"],[1,"letter"]],[[0,"var:set!"],[1,"at-least-one?"],[2,1]]],[[0,"not"],[[0,"="],[[0,"&"],[[0,"var:get"],[1,"bitmask"]],[1,"mask"]],[2,0]]]],[[0,"var:set!"],[1,"count"],[[0,"+"],[[0,"var:get"],[1,"count"]],[2,1]]],[[0,"var:set!"],[1,"bitmask"],[[0,"|"],[[0,"var:get"],[1,"bitmask"]],[1,"mask"]]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[[0,"+"],[[0,"var:get"],[1,"count"]],[[0,"var:get"],[1,"at-least-one?"]]]]]]],[[0,"rec:iterate"],[2,0],[[0,"-"],[[0,"length"],[1,"arr"]],[2,1]]]]]],[[0,"let"],[1,"string:slice-from"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"index"],[[0,"string:match"],[1,"a"],[1,"b"]]],[[0,"array:slice"],[1,"a"],[1,"index"],[[0,"+"],[1,"index"],[[0,"-"],[[0,"length"],[1,"a"]],[1,"index"]]]]]]],[[0,"let"],[1,"string:slice-after"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"index"],[[0,"string:match"],[1,"a"],[1,"b"]]],[[0,"array:slice"],[1,"a"],[[0,"+"],[1,"index"],[[0,"length"],[1,"b"]]],[[0,"+"],[1,"index"],[[0,"-"],[[0,"length"],[1,"a"]],[1,"index"]]]]]]],[[0,"let"],[1,"string:slice-to"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"array:reverse"],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"array:reverse"],[1,"B"]]],[[0,"let"],[1,"index"],[[0,"string:match"],[1,"a"],[1,"b"]]],[[0,"array:reverse"],[[0,"array:slice"],[1,"a"],[1,"index"],[[0,"+"],[1,"index"],[[0,"-"],[[0,"length"],[1,"a"]],[1,"index"]]]]]]]],[[0,"let"],[1,"string:slice-before"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"array:reverse"],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"array:reverse"],[1,"B"]]],[[0,"let"],[1,"index"],[[0,"string:match"],[1,"a"],[1,"b"]]],[[0,"array:reverse"],[[0,"array:slice"],[1,"a"],[[0,"+"],[1,"index"],[[0,"length"],[1,"b"]]],[[0,"+"],[1,"index"],[[0,"-"],[[0,"length"],[1,"a"]],[1,"index"]]]]]]]],[[0,"let"],[1,"string:split"],[[0,"lambda"],[1,"str"],[1,"delim"],[[0,"do"],[[0,"let"],[1,"locals"],[]],[[0,"set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[1,"delim"]],[[0,"set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[1,"str"]],[[0,"set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[[0,"length"],[1,"delim"]]],[[0,"set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"result"],[1,"i"],[1,"bounds"],[[0,"if"],[[0,"<"],[[0,"if"],[[0,"array:every?"],[[0,"array:zip"],[[0,"get"],[1,"locals"],[2,0]],[[0,"math:sequence"],[1,"locals"]]],[[0,"lambda"],[1,"item"],[[0,"do"],[[0,"let"],[1,"y"],[[0,"car"],[1,"item"]]],[[0,"let"],[1,"j"],[[0,"car"],[[0,"cdr"],[1,"item"]]]],[[0,"or"],[[0,"<="],[[0,"length"],[[0,"get"],[1,"locals"],[2,1]]],[[0,"+"],[1,"i"],[1,"j"]]],[[0,"="],[[0,"get"],[[0,"get"],[1,"locals"],[2,1]],[[0,"+"],[1,"i"],[1,"j"]]],[1,"y"]]]]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"result"],[[0,"length"],[1,"result"]],[[0,"get"],[1,"locals"],[2,3]]],[[0,"set!"],[1,"locals"],[2,3],[]],[[0,"+"],[1,"i"],[[0,"get"],[1,"locals"],[2,2]],[2,-1]]]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"locals"],[2,3],[[0,"cons"],[[0,"get"],[1,"locals"],[2,3]],[[0,"array"],[[0,"get"],[[0,"get"],[1,"locals"],[2,1]],[1,"i"]]]]],[1,"i"]]]]],[1,"bounds"]],[[0,"rec:iterate"],[1,"result"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[1,"result"]]]],[[0,"set!"],[[0,"let"],[1,"iteration-result"],[[0,"rec:iterate"],[],[2,0],[[0,"-"],[[0,"length"],[[0,"get"],[1,"locals"],[2,1]]],[2,1]]]],[[0,"length"],[1,"iteration-result"]],[[0,"get"],[1,"locals"],[2,3]]]]]],[[0,"let"],[1,"string:index-of-char"],[[0,"lambda"],[1,"str"],[1,"character"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"string:equal?"],[[0,"car"],[1,"arr"]],[1,"character"]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[[0,"array:shallow-copy"],[1,"str"],[1,"array"]],[2,0]]]]],[[0,"let"],[1,"string:match"],[[0,"lambda"],[1,"str"],[1,"word"],[[0,"cond"],[[0,"<"],[[0,"length"],[1,"str"]],[[0,"length"],[1,"word"]]],[2,-1],[[0,"string:equal?"],[1,"str"],[1,"word"]],[2,0],[[0,"*"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,">="],[[0,"length"],[1,"arr"]],[[0,"length"],[1,"word"]]]],[[0,"if"],[[0,"string:equal?"],[[0,"array:join"],[[0,"array"],[[0,"array:slice"],[1,"str"],[1,"i"],[[0,"+"],[1,"i"],[[0,"length"],[1,"word"]]]]],[[0,"array"],[1,"char:empty"]]],[1,"word"]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[1,"str"],[2,0]]]]]]]],[[0,"let"],[1,"string:has?"],[[0,"lambda"],[1,"str"],[1,"word"],[[0,"cond"],[[0,"<"],[[0,"length"],[1,"str"]],[[0,"length"],[1,"word"]]],[2,0],[[0,"string:equal?"],[1,"str"],[1,"word"]],[2,1],[[0,"*"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,">="],[[0,"length"],[1,"arr"]],[[0,"length"],[1,"word"]]]],[[0,"if"],[[0,"string:equal?"],[[0,"array:join"],[[0,"array"],[[0,"array:slice"],[1,"str"],[1,"i"],[[0,"+"],[1,"i"],[[0,"length"],[1,"word"]]]]],[[0,"array"],[1,"char:empty"]]],[1,"word"]],[2,1],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]]]]],[[0,"rec:iterate"],[1,"str"],[2,0]]]]]]]],[[0,"let"],[1,"string:greater?"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"if"],[[0,"not"],[[0,"string:equal?"],[1,"A"],[1,"B"]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"A"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"B"]],[[0,"length"],[1,"A"]]],[1,"length"]]],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"B"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[1,"length"]]],[1,"B"]]],[[0,"array:fold"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"acc"],[1,"pair"],[[0,"if"],[[0,">"],[[0,"car"],[1,"pair"]],[[0,"car"],[[0,"cdr"],[1,"pair"]]]],[2,0],[1,"acc"]]],[2,1]]]]]]]],[[0,"let"],[1,"string:greater-or-equal?"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"or"],[[0,"string:equal?"],[1,"A"],[1,"B"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"A"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"B"]],[[0,"length"],[1,"A"]]],[1,"length"]]],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"B"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[1,"length"]]],[1,"B"]]],[[0,"array:fold"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"acc"],[1,"pair"],[[0,"if"],[[0,">"],[[0,"car"],[1,"pair"]],[[0,"car"],[[0,"cdr"],[1,"pair"]]]],[2,0],[1,"acc"]]],[2,1]]]]]]]],[[0,"let"],[1,"string:lesser?"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"if"],[[0,"not"],[[0,"string:equal?"],[1,"A"],[1,"B"]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"A"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"B"]],[[0,"length"],[1,"A"]]],[1,"length"]]],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"B"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[1,"length"]]],[1,"B"]]],[[0,"array:fold"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"acc"],[1,"pair"],[[0,"if"],[[0,"<"],[[0,"car"],[1,"pair"]],[[0,"car"],[[0,"cdr"],[1,"pair"]]]],[2,0],[1,"acc"]]],[2,1]]]]]]]],[[0,"let"],[1,"string:lesser-or-equal?"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"or"],[[0,"string:equal?"],[1,"A"],[1,"B"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"A"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"B"]],[[0,"length"],[1,"A"]]],[1,"length"]]],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"B"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[1,"length"]]],[1,"B"]]],[[0,"array:fold"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"acc"],[1,"pair"],[[0,"if"],[[0,"<"],[[0,"car"],[1,"pair"]],[[0,"car"],[[0,"cdr"],[1,"pair"]]]],[2,0],[1,"acc"]]],[2,1]]]]]]]],[[0,"let"],[1,"string:equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"="],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"array:every?"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"x"],[[0,"="],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]]]]]]]],[[0,"let"],[1,"string:min"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"string:lesser?"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"string:max"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"string:lesser?"],[1,"a"],[1,"b"]],[1,"b"],[1,"a"]]]],[[0,"let"],[1,"string:trim-left"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"tr"],[[0,"array"],[2,1]]],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"and"],[[0,"car"],[1,"tr"]],[[0,"="],[1,"b"],[1,"char:space"]]],[1,"a"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"if"],[[0,"car"],[1,"tr"]],[[0,"set!"],[1,"tr"],[2,0],[2,0]]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"b"]]]]]]]],[]]]]],[[0,"let"],[1,"string:trim-right"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"tr"],[[0,"array"],[2,1]]],[[0,"array:fold"],[[0,"array:reverse"],[1,"str"]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"and"],[[0,"car"],[1,"tr"]],[[0,"="],[1,"b"],[1,"char:space"]]],[1,"a"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"if"],[[0,"car"],[1,"tr"]],[[0,"set!"],[1,"tr"],[2,0],[2,0]]],[[0,"cons"],[[0,"array"],[1,"b"]],[1,"a"]]]]]]],[]]]]],[[0,"let"],[1,"string:trim"],[[0,"lambda"],[1,"str"],[[0,"string:trim-right"],[[0,"string:trim-left"],[1,"str"]]]]],[[0,"let"],[1,"string:lines"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:new-line"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:chars"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[1,"str"],[[0,"lambda"],[1,"x"],[[0,"array"],[1,"x"]]]]]],[[0,"let"],[1,"string:words"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:space"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:commas"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:comma"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:dots"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:dot"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:colons"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:colon"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:semi-colons"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:semi-colon"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:dashes"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:dash"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:separator"],[[0,"lambda"],[1,"str"],[1,"separator"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[1,"separator"]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:append"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"cons"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"string:prepend"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"cons"],[1,"b"],[1,"a"]]]],[[0,"let"],[1,"string:pad-left"],[[0,"lambda"],[1,"str"],[1,"N"],[1,"ch"],[[0,"do"],[[0,"let"],[1,"n"],[[0,"-"],[1,"N"],[[0,"length"],[1,"str"]]]],[[0,"let"],[1,"rec:pad"],[[0,"lambda"],[1,"i"],[1,"str"],[[0,"if"],[[0,"<"],[1,"i"],[1,"n"]],[[0,"rec:pad"],[[0,"+"],[1,"i"],[2,1]],[[0,"cons"],[1,"ch"],[1,"str"]]],[1,"str"]]]],[[0,"rec:pad"],[2,0],[1,"str"]]]]],[[0,"let"],[1,"string:pad-right"],[[0,"lambda"],[1,"str"],[1,"N"],[1,"ch"],[[0,"do"],[[0,"let"],[1,"n"],[[0,"-"],[1,"N"],[[0,"length"],[1,"str"]]]],[[0,"let"],[1,"rec:pad"],[[0,"lambda"],[1,"i"],[1,"str"],[[0,"if"],[[0,"<"],[1,"i"],[1,"n"]],[[0,"rec:pad"],[[0,"+"],[1,"i"],[2,1]],[[0,"cons"],[1,"str"],[1,"ch"]]],[1,"str"]]]],[[0,"rec:pad"],[2,0],[1,"str"]]]]],[[0,"let"],[1,"string:upper"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"arr"],[]],[[0,"let"],[1,"n"],[[0,"length"],[1,"str"]]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"n"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"current-char"],[[0,"get"],[1,"str"],[1,"i"]]],[[0,"set!"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,">="],[1,"current-char"],[2,97]],[[0,"<="],[1,"current-char"],[2,122]]],[[0,"-"],[1,"current-char"],[2,32]],[1,"current-char"]]],[[0,"rec:iter"],[[0,"+"],[1,"i"],[2,1]]]]]],[1,"arr"]]]],[[0,"rec:iter"],[2,0]]]]],[[0,"let"],[1,"string:lower"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"arr"],[]],[[0,"let"],[1,"n"],[[0,"length"],[1,"str"]]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"n"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"current-char"],[[0,"get"],[1,"str"],[1,"i"]]],[[0,"set!"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,">="],[1,"current-char"],[2,65]],[[0,"<="],[1,"current-char"],[2,90]]],[[0,"+"],[1,"current-char"],[2,32]],[1,"current-char"]]],[[0,"rec:iter"],[[0,"+"],[1,"i"],[2,1]]]]]],[1,"arr"]]]],[[0,"rec:iter"],[2,0]]]]],[[0,"let"],[1,"char?"],[[0,"lambda"],[1,"cc"],[[0,"and"],[[0,"atom?"],[1,"cc"]],[[0,">="],[1,"cc"],[2,0]],[[0,"<"],[1,"cc"],[2,65535]]]]],[[0,"let"],[1,"new:set4"],[[0,"lambda"],[[0,"array"],[],[],[],[]]]],[[0,"let"],[1,"new:array"],[[0,"lambda"],[1,"items"],[[0,"array:shallow-copy"],[1,"items"]]]],[[0,"let"],[1,"new:list"],[[0,"lambda"],[1,"value"],[[0,"array"],[],[1,"value"],[]]]],[[0,"let"],[1,"new:set-n"],[[0,"lambda"],[1,"n"],[[0,"array:map"],[[0,"array"],[1,"n"],[1,"length"]],[[0,"lambda"],[1,"."],[]]]]],[[0,"let"],[1,"new:date"],[[0,"lambda"],[1,"year"],[1,"month"],[1,"day"],[[0,"array"],[1,"year"],[1,"month"],[1,"day"]]]],[[0,"let"],[1,"new:binary-tree"],[[0,"lambda"],[1,"value"],[[0,"do"],[[0,"let"],[1,"arr"],[]],[[0,"set!"],[1,"arr"],[2,0],[1,"value"]],[[0,"set!"],[1,"arr"],[2,1],[]],[[0,"set!"],[1,"arr"],[2,2],[]],[1,"arr"]]]],[[0,"let"],[1,"binary-tree:left"],[[0,"lambda"],[1,"node"],[[0,"get"],[1,"node"],[2,1]]]],[[0,"let"],[1,"binary-tree:right"],[[0,"lambda"],[1,"node"],[[0,"get"],[1,"node"],[2,2]]]],[[0,"let"],[1,"binary-tree:left!"],[[0,"lambda"],[1,"tree"],[1,"node"],[[0,"set!"],[1,"tree"],[2,1],[1,"node"]]]],[[0,"let"],[1,"binary-tree:right!"],[[0,"lambda"],[1,"tree"],[1,"node"],[[0,"set!"],[1,"tree"],[2,2],[1,"node"]]]],[[0,"let"],[1,"binary-tree:value"],[[0,"lambda"],[1,"node"],[[0,"car"],[1,"node"]]]],[[0,"let"],[1,"set:index"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"prime-num"],[2,31]],[[0,"let"],[1,"total"],[[0,"array"],[2,0]]],[[0,"let"],[1,"rec:find-hash-index"],[[0,"lambda"],[1,"i"],[1,"bounds"],[[0,"do"],[[0,"let"],[1,"letter"],[[0,"get"],[1,"key"],[1,"i"]]],[[0,"let"],[1,"value"],[[0,"-"],[1,"letter"],[2,96]]],[[0,"set!"],[1,"total"],[2,0],[[0,"math:euclidean-mod"],[[0,"+"],[[0,"*"],[[0,"car"],[1,"total"]],[1,"prime-num"]],[1,"value"]],[[0,"length"],[1,"table"]]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"rec:find-hash-index"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[[0,"car"],[1,"total"]]]]]],[[0,"rec:find-hash-index"],[2,0],[[0,"if"],[[0,"<"],[[0,"-"],[[0,"length"],[1,"key"]],[2,1]],[2,100]],[[0,"-"],[[0,"length"],[1,"key"]],[2,1]],[2,100]]]]]],[[0,"let"],[1,"set:add!"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"not"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]]],[[0,"set!"],[1,"table"],[1,"idx"],[[0,"array"]]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"len"],[[0,"length"],[1,"current"]]],[[0,"let"],[1,"index"],[[0,"if"],[1,"len"],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"x"],[1,"key"]]]],[2,-1]]],[[0,"let"],[1,"entry"],[1,"key"]],[[0,"if"],[[0,"="],[1,"index"],[2,-1]],[[0,"set!"],[1,"current"],[[0,"length"],[1,"current"]],[1,"entry"]],[[0,"set!"],[1,"current"],[1,"index"],[1,"entry"]]],[1,"table"]]]],[[0,"let"],[1,"set:remove!"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"not"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]]],[[0,"set!"],[1,"table"],[1,"idx"],[[0,"Array"]]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"len"],[[0,"length"],[1,"current"]]],[[0,"let"],[1,"index"],[[0,"if"],[1,"len"],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"x"],[1,"key"]]]],[2,-1]]],[[0,"let"],[1,"entry"],[1,"key"]],[[0,"if"],[[0,"not"],[[0,"="],[1,"index"],[2,-1]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"current"],[1,"index"],[[0,"get"],[1,"current"],[2,-1]]],[[0,"set!"],[1,"current"],[2,-1]]]]]],[1,"table"]]]],[[0,"let"],[1,"set:has?"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"and"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"and"],[[0,"length"],[1,"current"]],[[0,">="],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"x"],[1,"key"]]]],[2,0]]]]]]],[[0,"let"],[1,"set:intersection"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:fold"],[[0,"from:set->array"],[1,"b"]],[[0,"lambda"],[1,"out"],[1,"element"],[[0,"do"],[[0,"if"],[[0,"set:has?"],[1,"a"],[1,"element"]],[[0,"set:add!"],[1,"out"],[1,"element"]]],[1,"out"]]],[[0,"array"],[],[],[],[],[]]]]],[[0,"let"],[1,"set:difference"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:fold"],[[0,"from:set->array"],[1,"a"]],[[0,"lambda"],[1,"out"],[1,"element"],[[0,"do"],[[0,"if"],[[0,"not"],[[0,"set:has?"],[1,"b"],[1,"element"]]],[[0,"set:add!"],[1,"out"],[1,"element"]]],[1,"out"]]],[[0,"array"],[],[],[],[],[]]]]],[[0,"let"],[1,"set:xor"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"out"],[[0,"array"],[],[],[],[],[]]],[[0,"array:for"],[[0,"from:set->array"],[1,"a"]],[[0,"lambda"],[1,"element"],[[0,"if"],[[0,"not"],[[0,"set:has?"],[1,"b"],[1,"element"]]],[[0,"set:add!"],[1,"out"],[1,"element"]]]]],[[0,"array:for"],[[0,"from:set->array"],[1,"b"]],[[0,"lambda"],[1,"element"],[[0,"if"],[[0,"not"],[[0,"set:has?"],[1,"a"],[1,"element"]]],[[0,"set:add!"],[1,"out"],[1,"element"]]]]],[1,"out"]]]],[[0,"let"],[1,"set:union"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"out"],[[0,"array"],[],[],[],[],[]]],[[0,"array:for"],[[0,"from:set->array"],[1,"a"]],[[0,"lambda"],[1,"element"],[[0,"set:add!"],[1,"out"],[1,"element"]]]],[[0,"array:for"],[[0,"from:set->array"],[1,"b"]],[[0,"lambda"],[1,"element"],[[0,"set:add!"],[1,"out"],[1,"element"]]]],[1,"out"]]]],[[0,"let"],[1,"set:empty!"],[[0,"lambda"],[1,"table"],[[0,"array:map"],[1,"table"],[1,"empty!"]]]],[[0,"let"],[1,"map:empty!"],[[0,"lambda"],[1,"table"],[[0,"array:map"],[1,"table"],[1,"empty!"]]]],[[0,"let"],[1,"map:set!"],[[0,"lambda"],[1,"table"],[1,"key"],[1,"value"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"not"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]]],[[0,"set!"],[1,"table"],[1,"idx"],[]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"len"],[[0,"length"],[1,"current"]]],[[0,"let"],[1,"index"],[[0,"if"],[1,"len"],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"car"],[1,"x"]],[1,"key"]]]],[2,-1]]],[[0,"let"],[1,"entry"],[[0,"array"],[1,"key"],[1,"value"]]],[[0,"if"],[[0,"="],[1,"index"],[2,-1]],[[0,"set!"],[1,"current"],[[0,"length"],[1,"current"]],[1,"entry"]],[[0,"set!"],[1,"current"],[1,"index"],[1,"entry"]]],[1,"table"]]]],[[0,"let"],[1,"map:remove!"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"not"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]]],[[0,"set!"],[1,"table"],[1,"idx"],[]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"len"],[[0,"length"],[1,"current"]]],[[0,"let"],[1,"index"],[[0,"if"],[1,"len"],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"car"],[1,"x"]],[1,"key"]]]],[2,-1]]],[[0,"if"],[[0,"not"],[[0,"="],[1,"index"],[2,-1]]],[[0,"and"],[[0,"set!"],[1,"current"],[1,"index"],[[0,"get"],[1,"current"],[2,-1]]],[[0,"set!"],[1,"current"],[2,-1]]]],[1,"table"]]]],[[0,"let"],[1,"map:get"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"found"],[[0,"array:find"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"key"],[[0,"get"],[1,"x"],[2,0]]]]]],[[0,"if"],[[0,"length"],[1,"found"]],[[0,"get"],[1,"found"],[2,1]]]]]]]]]],[[0,"let"],[1,"map:has?"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"and"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"and"],[[0,"length"],[1,"current"]],[[0,">="],[[0,"array:find-index"],[[0,"car"],[1,"current"]],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"x"],[1,"key"]]]],[2,0]]]]]]],[[0,"let"],[1,"list:prev!"],[[0,"lambda"],[1,"list"],[1,"node"],[[0,"set!"],[1,"list"],[2,0],[[0,"set!"],[1,"node"],[2,2],[1,"list"]]]]],[[0,"let"],[1,"list:next!"],[[0,"lambda"],[1,"list"],[1,"node"],[[0,"set!"],[1,"list"],[2,2],[[0,"set!"],[1,"node"],[2,0],[1,"list"]]]]],[[0,"let"],[1,"list:prev"],[[0,"lambda"],[1,"list"],[[0,"get"],[1,"list"],[2,0]]]],[[0,"let"],[1,"list:next"],[[0,"lambda"],[1,"list"],[[0,"get"],[1,"list"],[2,2]]]],[[0,"let"],[1,"list:value"],[[0,"lambda"],[1,"node"],[[0,"get"],[1,"node"],[2,1]]]],[[0,"let"],[1,"var:def"],[[0,"lambda"],[1,"val"],[[0,"array"],[1,"val"]]]],[[0,"let"],[1,"var:get"],[[0,"lambda"],[1,"variable"],[[0,"car"],[1,"variable"]]]],[[0,"let"],[1,"var:set!"],[[0,"lambda"],[1,"variable"],[1,"value"],[[0,"set!"],[1,"variable"],[2,0],[1,"value"]]]],[[0,"let"],[1,"var:del!"],[[0,"lambda"],[1,"variable"],[[0,"set!"],[1,"variable"],[2,-1]]]],[[0,"let"],[1,"bool:def"],[[0,"lambda"],[1,"val"],[[0,"array"],[[0,"not"],[[0,"not"],[1,"val"]]]]]],[[0,"let"],[1,"bool:get"],[[0,"lambda"],[1,"variable"],[[0,"car"],[1,"variable"]]]],[[0,"let"],[1,"bool:set!"],[[0,"lambda"],[1,"variable"],[1,"value"],[[0,"set!"],[1,"variable"],[2,0],[[0,"not"],[[0,"not"],[1,"value"]]]]]],[[0,"let"],[1,"bool:toggle!"],[[0,"lambda"],[1,"variable"],[[0,"set!"],[1,"variable"],[2,0],[[0,"not"],[[0,"car"],[1,"variable"]]]]]],[[0,"let"],[1,"bool:true"],[[0,"lambda"],[[0,"array"],[2,1]]]],[[0,"let"],[1,"bool:false"],[[0,"lambda"],[[0,"array"],[2,0]]]],[[0,"let"],[1,"bool:true!"],[[0,"lambda"],[1,"variable"],[[0,"set!"],[1,"variable"],[2,0],[2,1]]]],[[0,"let"],[1,"bool:false!"],[[0,"lambda"],[1,"variable"],[[0,"set!"],[1,"variable"],[2,0],[2,0]]]],[[0,"let"],[1,"bool:true?"],[[0,"lambda"],[1,"variable"],[[0,"="],[[0,"get"],[1,"variable"],[2,0]],[2,1]]]],[[0,"let"],[1,"bool:false?"],[[0,"lambda"],[1,"variable"],[[0,"="],[[0,"get"],[1,"variable"],[2,0]],[2,0]]]],[[0,"let"],[1,"new:brray"],[[0,"lambda"],[[0,"array"],[[0,"array"],[]],[]]]],[[0,"let"],[1,"brray:offset-left"],[[0,"lambda"],[1,"q"],[[0,"*"],[[0,"-"],[[0,"length"],[[0,"get"],[1,"q"],[2,0]]],[2,1]],[2,-1]]]],[[0,"let"],[1,"brray:offset-right"],[[0,"lambda"],[1,"q"],[[0,"length"],[[0,"get"],[1,"q"],[2,1]]]]],[[0,"let"],[1,"brray:length"],[[0,"lambda"],[1,"q"],[[0,"+"],[[0,"length"],[[0,"get"],[1,"q"],[2,0]]],[[0,"length"],[[0,"get"],[1,"q"],[2,1]]],[2,-1]]]],[[0,"let"],[1,"brray:empty?"],[[0,"lambda"],[1,"q"],[[0,"not"],[[0,"brray:length"],[1,"q"]]]]],[[0,"let"],[1,"brray:empty!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"set!"],[1,"q"],[2,0],[[0,"array"],[]]],[[0,"set!"],[1,"q"],[2,1],[]],[1,"q"]]]],[[0,"let"],[1,"brray:get"],[[0,"lambda"],[1,"q"],[1,"offset"],[[0,"do"],[[0,"let"],[1,"offset-index"],[[0,"+"],[1,"offset"],[[0,"brray:offset-left"],[1,"q"]]]],[[0,"let"],[1,"index"],[[0,"if"],[[0,"<"],[1,"offset-index"],[2,0]],[[0,"*"],[1,"offset-index"],[2,-1]],[1,"offset-index"]]],[[0,"if"],[[0,">="],[1,"offset-index"],[2,0]],[[0,"get"],[[0,"get"],[1,"q"],[2,1]],[1,"index"]],[[0,"get"],[[0,"get"],[1,"q"],[2,0]],[1,"index"]]]]]],[[0,"let"],[1,"brray:set!"],[[0,"lambda"],[1,"q"],[1,"index"],[1,"value"],[[0,"do"],[[0,"let"],[1,"offset"],[[0,"+"],[1,"index"],[[0,"brray:offset-left"],[1,"q"]]]],[[0,"if"],[[0,">="],[1,"offset"],[2,0]],[[0,"set!"],[[0,"get"],[1,"q"],[2,1]],[1,"offset"],[1,"value"]],[[0,"set!"],[[0,"get"],[1,"q"],[2,0]],[[0,"*"],[1,"offset"],[2,-1]],[1,"value"]]],[1,"q"]]]],[[0,"let"],[1,"brray:add-to-left!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"set!"],[[0,"let"],[1,"c"],[[0,"get"],[1,"q"],[2,0]]],[[0,"length"],[1,"c"]],[1,"item"]]]],[[0,"let"],[1,"brray:add-to-right!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"set!"],[[0,"let"],[1,"c"],[[0,"get"],[1,"q"],[2,1]]],[[0,"length"],[1,"c"]],[1,"item"]]]],[[0,"let"],[1,"brray:remove-from-left!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"brray:length"],[1,"q"]]],[[0,"if"],[1,"len"],[[0,"cond"],[[0,"="],[1,"len"],[2,1]],[[0,"brray:empty!"],[1,"q"]],[[0,">"],[[0,"length"],[[0,"get"],[1,"q"],[2,0]]],[2,0]],[[0,"set!"],[[0,"get"],[1,"q"],[2,0]],[2,-1]]]]]]],[[0,"let"],[1,"brray:remove-from-right!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"brray:length"],[1,"q"]]],[[0,"if"],[1,"len"],[[0,"cond"],[[0,"="],[1,"len"],[2,1]],[[0,"brray:empty!"],[1,"q"]],[[0,">"],[[0,"length"],[[0,"get"],[1,"q"],[2,1]]],[2,0]],[[0,"set!"],[[0,"get"],[1,"q"],[2,1]],[2,-1]]]]]]],[[0,"let"],[1,"brray:iter"],[[0,"lambda"],[1,"q"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:iter"],[2,0],[[0,"brray:length"],[1,"q"]]]]]],[[0,"let"],[1,"brray:map"],[[0,"lambda"],[1,"q"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"result"],[[0,"new:brray"]]],[[0,"let"],[1,"len"],[[0,"brray:length"],[1,"q"]]],[[0,"let"],[1,"half"],[[0,"math:floor"],[[0,"*"],[1,"len"],[2,0.5]]]],[[0,"let"],[1,"rec:left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"result"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]]],[[0,"if"],[[0,">"],[1,"index"],[2,0]],[[0,"rec:left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"rec:left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let"],[1,"rec:right"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"result"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:right"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:right"],[1,"half"],[[0,"-"],[1,"len"],[2,1]]],[1,"result"]]]],[[0,"let"],[1,"brray:balance?"],[[0,"lambda"],[1,"q"],[[0,"="],[[0,"+"],[[0,"brray:offset-right"],[1,"q"]],[[0,"brray:offset-left"],[1,"q"]]],[2,0]]]],[[0,"let"],[1,"brray:balance!"],[[0,"lambda"],[1,"q"],[[0,"if"],[[0,"brray:balance?"],[1,"q"]],[1,"q"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"initial"],[[0,"from:brray->array"],[1,"q"]]],[[0,"brray:empty!"],[1,"q"]],[[0,"let"],[1,"half"],[[0,"math:floor"],[[0,"*"],[[0,"length"],[1,"initial"]],[2,0.5]]]],[[0,"let"],[1,"rec:left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[[0,"get"],[1,"initial"],[1,"index"]]],[[0,"if"],[[0,">"],[1,"index"],[2,0]],[[0,"rec:left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"rec:left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let"],[1,"rec:right"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[[0,"get"],[1,"initial"],[1,"index"]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:right"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:right"],[1,"half"],[[0,"-"],[[0,"length"],[1,"initial"]],[2,1]]],[1,"q"]]]]]]],[[0,"let"],[1,"brray:append!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[1,"item"]],[1,"q"]]]],[[0,"let"],[1,"brray:prepend!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[1,"item"]],[1,"q"]]]],[[0,"let"],[1,"brray:head!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"brray:offset-right"],[1,"q"]],[2,0]],[[0,"brray:balance!"],[1,"q"]]],[[0,"brray:remove-from-right!"],[1,"q"]],[1,"q"]]]],[[0,"let"],[1,"brray:tail!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"brray:offset-left"],[1,"q"]],[2,0]],[[0,"brray:balance!"],[1,"q"]]],[[0,"brray:remove-from-left!"],[1,"q"]],[1,"q"]]]],[[0,"let"],[1,"brray:first"],[[0,"lambda"],[1,"q"],[[0,"brray:get"],[1,"q"],[2,0]]]],[[0,"let"],[1,"brray:last"],[[0,"lambda"],[1,"q"],[[0,"brray:get"],[1,"q"],[[0,"-"],[[0,"brray:length"],[1,"q"]],[2,1]]]]],[[0,"let"],[1,"brray:pop-right!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"last"],[[0,"brray:last"],[1,"q"]]],[[0,"brray:head!"],[1,"q"]],[1,"last"]]]],[[0,"let"],[1,"brray:pop-left!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"first"],[[0,"brray:first"],[1,"q"]]],[[0,"brray:tail!"],[1,"q"]],[1,"first"]]]],[[0,"let"],[1,"brray:rotate-left!"],[[0,"lambda"],[1,"q"],[1,"n"],[[0,"do"],[[0,"let"],[1,"N"],[[0,"mod"],[1,"n"],[[0,"brray:length"],[1,"q"]]]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"brray:offset-left"],[1,"q"]],[2,0]],[[0,"brray:balance!"],[1,"q"]]],[[0,"brray:add-to-right!"],[1,"q"],[[0,"brray:first"],[1,"q"]]],[[0,"brray:remove-from-left!"],[1,"q"]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:iter"],[2,0],[1,"N"]],[1,"q"]]]],[[0,"let"],[1,"brray:rotate-right!"],[[0,"lambda"],[1,"q"],[1,"n"],[[0,"do"],[[0,"let"],[1,"N"],[[0,"mod"],[1,"n"],[[0,"brray:length"],[1,"q"]]]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"brray:offset-right"],[1,"q"]],[2,0]],[[0,"brray:balance!"],[1,"q"]]],[[0,"brray:add-to-left!"],[1,"q"],[[0,"brray:last"],[1,"q"]]],[[0,"brray:remove-from-right!"],[1,"q"]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:iter"],[2,0],[1,"N"]],[1,"q"]]]],[[0,"let"],[1,"brray:slice"],[[0,"lambda"],[1,"entity"],[1,"s"],[1,"e"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"brray:length"],[1,"entity"]]],[[0,"let"],[1,"start"],[[0,"if"],[[0,"<"],[1,"s"],[2,0]],[[0,"math:max"],[[0,"+"],[1,"len"],[1,"s"]],[2,0]],[[0,"math:min"],[1,"s"],[1,"len"]]]],[[0,"let"],[1,"end"],[[0,"if"],[[0,"<"],[1,"e"],[2,0]],[[0,"math:max"],[[0,"+"],[1,"len"],[1,"e"]],[2,0]],[[0,"math:min"],[1,"e"],[1,"len"]]]],[[0,"let"],[1,"slice"],[[0,"new:brray"]]],[[0,"let"],[1,"slice-len"],[[0,"math:max"],[[0,"-"],[1,"end"],[1,"start"]],[2,0]]],[[0,"let"],[1,"half"],[[0,"math:floor"],[[0,"*"],[1,"slice-len"],[2,0.5]]]],[[0,"let"],[1,"rec:left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"slice"],[[0,"brray:get"],[1,"entity"],[[0,"+"],[1,"start"],[1,"index"]]]],[[0,"if"],[[0,">"],[1,"index"],[2,0]],[[0,"rec:left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"rec:left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let"],[1,"rec:right"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"slice"],[[0,"brray:get"],[1,"entity"],[[0,"+"],[1,"start"],[1,"index"]]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:right"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:right"],[1,"half"],[[0,"-"],[1,"slice-len"],[2,1]]],[1,"slice"]]]],[[0,"let"],[1,"tuple:apply"],[[0,"lambda"],[1,"x"],[1,"cb"],[[0,"cb"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:add"],[[0,"lambda"],[1,"x"],[[0,"+"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:subtract"],[[0,"lambda"],[1,"x"],[[0,"-"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:multiply"],[[0,"lambda"],[1,"x"],[[0,"*"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:divide"],[[0,"lambda"],[1,"x"],[[0,"/"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:swap"],[[0,"lambda"],[1,"x"],[[0,"array"],[[0,"car"],[[0,"cdr"],[1,"x"]],[[0,"car"],[1,"x"]]]]]],[[0,"let"],[1,"time:add-seconds"],[[0,"lambda"],[1,"date-time"],[1,"seconds"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"seconds"],[2,1000]]]]],[[0,"let"],[1,"time:add-minutes"],[[0,"lambda"],[1,"date-time"],[1,"minutes"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"minutes"],[2,1000],[2,60]]]]],[[0,"let"],[1,"time:add-hours"],[[0,"lambda"],[1,"date-time"],[1,"hours"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"hours"],[2,1000],[2,60],[2,60]]]]],[[0,"let"],[1,"time:add-days"],[[0,"lambda"],[1,"date-time"],[1,"days"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"days"],[2,1000],[2,60],[2,60],[2,24]]]]],[[0,"let"],[1,"time:add-months"],[[0,"lambda"],[1,"date-time"],[1,"months"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"months"],[2,1000],[2,60],[2,60],[2,24],[2,30]]]]],[[0,"let"],[1,"time:add-years"],[[0,"lambda"],[1,"date-time"],[1,"years"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"years"],[2,1000],[2,60],[2,60],[2,24],[2,365]]]]],[[0,"let"],[1,"time:sub-seconds"],[[0,"lambda"],[1,"date-time"],[1,"seconds"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"seconds"],[2,1000]]]]],[[0,"let"],[1,"time:sub-minutes"],[[0,"lambda"],[1,"date-time"],[1,"minutes"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"minutes"],[2,1000],[2,60]]]]],[[0,"let"],[1,"time:sub-hours"],[[0,"lambda"],[1,"date-time"],[1,"hours"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"hours"],[2,1000],[2,60],[2,60]]]]],[[0,"let"],[1,"time:sub-days"],[[0,"lambda"],[1,"date-time"],[1,"days"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"days"],[2,1000],[2,60],[2,60],[2,24]]]]],[[0,"let"],[1,"time:sub-months"],[[0,"lambda"],[1,"date-time"],[1,"months"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"months"],[2,1000],[2,60],[2,60],[2,24],[2,30]]]]],[[0,"let"],[1,"time:sub-years"],[[0,"lambda"],[1,"date-time"],[1,"years"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"years"],[2,1000],[2,60],[2,60],[2,24],[2,365]]]]],[[0,"let"],[1,"date:year"],[[0,"lambda"],[1,"date"],[[0,"car"],[1,"date"]]]],[[0,"let"],[1,"date:month"],[[0,"lambda"],[1,"date"],[[0,"car"],[[0,"cdr"],[1,"date"]]]]],[[0,"let"],[1,"date:day"],[[0,"lambda"],[1,"date"],[[0,"car"],[[0,"cdr"],[[0,"cdr"],[1,"date"]]]]]],[[0,"let"],[1,"date:month-day"],[[0,"lambda"],[1,"date"],[[0,"cdr"],[1,"date"]]]],[[0,"let"],[1,"date:year-month"],[[0,"lambda"],[1,"date"],[[0,"array"],[[0,"car"],[1,"date"]],[[0,"car"],[[0,"cdr"],[1,"date"]]]]]],[[0,"let"],[1,"array:set!"],[1,"set!"]],[[0,"let"],[1,"array:get"],[1,"get"]],[[0,"let"],[1,"identity"],[[0,"lambda"],[1,"x"],[1,"x"]]],[[0,"let"],[1,"truthy?"],[[0,"lambda"],[1,"x"],[[0,"cond"],[[0,"atom?"],[1,"x"]],[[0,"not"],[[0,"="],[1,"x"],[2,0]]],[[0,"array?"],[1,"x"]],[[0,">"],[[0,"length"],[1,"x"]],[2,0]],[[0,"*"]],[2,1]]]],[[0,"let"],[1,"falsy?"],[[0,"lambda"],[1,"x"],[[0,"cond"],[[0,"atom?"],[1,"x"]],[[0,"="],[1,"x"],[2,0]],[[0,"array?"],[1,"x"]],[[0,"="],[[0,"length"],[1,"x"]],[2,0]]]]],[[0,"let"],[1,"array?"],[[0,"lambda"],[1,"x"],[[0,"not"],[[0,"atom?"],[1,"x"]]]]],[[0,"let"],[1,"ast:type"],[2,0]],[[0,"let"],[1,"ast:value"],[2,1]],[[0,"let"],[1,"ast:apply"],[2,0]],[[0,"let"],[1,"ast:word"],[2,1]],[[0,"let"],[1,"ast:atom"],[2,2]],[[0,"let"],[1,"match:negative?"],[[0,"lambda"],[1,"string"],[[0,"="],[[0,"car"],[1,"string"]],[1,"char:dash"]]]],[[0,"let"],[1,"match:number?"],[[0,"lambda"],[1,"string"],[[0,"do"],[[0,"let"],[1,"is-negative"],[[0,"match:negative?"],[1,"string"]]],[[0,"let"],[1,"digits"],[[0,"if"],[1,"is-negative"],[[0,"cdr"],[1,"string"]],[1,"string"]]],[[0,"array:every?"],[1,"digits"],[[0,"lambda"],[1,"digit"],[[0,"or"],[[0,"and"],[[0,">="],[1,"digit"],[1,"char:0"]],[[0,"<="],[1,"digit"],[1,"char:9"]]],[[0,"="],[1,"digit"],[1,"char:dot"]]]]]]]],[[0,"let"],[1,"ast:leaf"],[[0,"lambda"],[1,"type"],[1,"value"],[[0,"array"],[1,"type"],[1,"value"]]]],[[0,"let"],[1,"ast:leaf?"],[[0,"lambda"],[1,"arg"],[[0,"do"],[[0,"let"],[1,"c"],[[0,"car"],[1,"arg"]]],[[0,"and"],[[0,"atom?"],[1,"c"]],[[0,"or"],[[0,"="],[1,"c"],[1,"ast:apply"]],[[0,"="],[1,"c"],[1,"ast:atom"]],[[0,"="],[1,"c"],[1,"ast:word"]]]]]]],[[0,"let"],[1,"from:chars->ast"],[[0,"lambda"],[1,"source"],[[0,"do"],[[0,"let"],[1,"tree"],[]],[[0,"let"],[1,"stack"],[[0,"array"],[1,"tree"]]],[[0,"let"],[1,"head"],[[0,"var:def"],[1,"tree"]]],[[0,"let"],[1,"acc"],[]],[[0,"array:for-range"],[2,0],[[0,"length"],[1,"source"]],[[0,"lambda"],[1,"i"],[[0,"do"],[[0,"let"],[1,"cursor"],[[0,"get"],[1,"source"],[1,"i"]]],[[0,"if"],[[0,"="],[1,"cursor"],[1,"char:left-brace"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"temp"],[]],[[0,"let"],[1,"h"],[[0,"var:get"],[1,"head"]]],[[0,"array:push!"],[1,"h"],[1,"temp"]],[[0,"array:push!"],[1,"stack"],[1,"h"]],[[0,"var:set!"],[1,"head"],[1,"temp"]]]]],[[0,"if"],[[0,"or"],[[0,"="],[1,"cursor"],[1,"char:right-brace"]],[[0,"="],[1,"cursor"],[1,"char:space"]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"token"],[[0,"array:shallow-copy"],[1,"acc"]]],[[0,"array:empty!"],[1,"acc"]],[[0,"if"],[[0,"length"],[1,"token"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"h"],[[0,"var:get"],[1,"head"]]],[[0,"if"],[[0,"array:empty?"],[1,"h"]],[[0,"array:push!"],[1,"h"],[[0,"ast:leaf"],[1,"ast:apply"],[1,"token"]]],[[0,"if"],[[0,"match:number?"],[1,"token"]],[[0,"array:push!"],[1,"h"],[[0,"ast:leaf"],[1,"ast:atom"],[[0,"from:digits->number"],[[0,"from:chars->digits"],[1,"token"]]]]],[[0,"array:push!"],[1,"h"],[[0,"ast:leaf"],[1,"ast:word"],[1,"token"]]]]]]]]],[[0,"if"],[[0,"="],[1,"cursor"],[1,"char:right-brace"]],[[0,"var:set!"],[1,"head"],[[0,"array:pop!"],[1,"stack"]]]]]]],[[0,"array:push!"],[1,"acc"],[1,"cursor"]]]]]]],[1,"tree"]]]],[[0,"let"],[1,"evaluate"],[[0,"lambda"],[1,"exp"],[1,"env"],[[0,"do"],[[0,"let"],[1,"expression"],[[0,"if"],[[0,"and"],[[0,"array?"],[1,"exp"]],[[0,"ast:leaf?"],[1,"exp"]]],[[0,"array"],[1,"exp"]],[1,"exp"]]],[[0,"if"],[[0,"length"],[1,"expression"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"first"],[[0,"car"],[1,"expression"]]],[[0,"let"],[1,"rest"],[[0,"cdr"],[1,"expression"]]],[[0,"let"],[1,"pattern"],[[0,"get"],[1,"first"],[1,"ast:type"]]],[[0,"cond"],[[0,"="],[1,"pattern"],[1,"ast:word"]],[[0,"map:get"],[1,"env"],[[0,"get"],[1,"first"],[1,"ast:value"]]],[[0,"="],[1,"pattern"],[1,"ast:apply"]],[[0,"apply"],[[0,"map:get"],[1,"env"],[[0,"get"],[1,"first"],[1,"ast:value"]]],[1,"rest"],[1,"env"]],[[0,"="],[1,"pattern"],[1,"ast:atom"]],[[0,"get"],[1,"first"],[1,"ast:value"]],[[0,"*"]],[]]]]],[]]]]]]
|
1
|
+
export default [[[0,"let"],[1,"char:A"],[2,65]],[[0,"let"],[1,"char:B"],[2,66]],[[0,"let"],[1,"char:C"],[2,67]],[[0,"let"],[1,"char:D"],[2,68]],[[0,"let"],[1,"char:E"],[2,69]],[[0,"let"],[1,"char:F"],[2,70]],[[0,"let"],[1,"char:G"],[2,71]],[[0,"let"],[1,"char:H"],[2,72]],[[0,"let"],[1,"char:I"],[2,73]],[[0,"let"],[1,"char:J"],[2,74]],[[0,"let"],[1,"char:K"],[2,75]],[[0,"let"],[1,"char:L"],[2,76]],[[0,"let"],[1,"char:M"],[2,77]],[[0,"let"],[1,"char:N"],[2,78]],[[0,"let"],[1,"char:O"],[2,79]],[[0,"let"],[1,"char:P"],[2,80]],[[0,"let"],[1,"char:Q"],[2,81]],[[0,"let"],[1,"char:R"],[2,82]],[[0,"let"],[1,"char:S"],[2,83]],[[0,"let"],[1,"char:T"],[2,84]],[[0,"let"],[1,"char:U"],[2,85]],[[0,"let"],[1,"char:V"],[2,86]],[[0,"let"],[1,"char:W"],[2,87]],[[0,"let"],[1,"char:X"],[2,88]],[[0,"let"],[1,"char:Y"],[2,89]],[[0,"let"],[1,"char:Z"],[2,90]],[[0,"let"],[1,"char:a"],[2,97]],[[0,"let"],[1,"char:b"],[2,98]],[[0,"let"],[1,"char:c"],[2,99]],[[0,"let"],[1,"char:d"],[2,100]],[[0,"let"],[1,"char:e"],[2,101]],[[0,"let"],[1,"char:f"],[2,102]],[[0,"let"],[1,"char:g"],[2,103]],[[0,"let"],[1,"char:h"],[2,104]],[[0,"let"],[1,"char:i"],[2,105]],[[0,"let"],[1,"char:j"],[2,106]],[[0,"let"],[1,"char:k"],[2,107]],[[0,"let"],[1,"char:l"],[2,108]],[[0,"let"],[1,"char:m"],[2,109]],[[0,"let"],[1,"char:n"],[2,110]],[[0,"let"],[1,"char:o"],[2,111]],[[0,"let"],[1,"char:p"],[2,112]],[[0,"let"],[1,"char:q"],[2,113]],[[0,"let"],[1,"char:r"],[2,114]],[[0,"let"],[1,"char:s"],[2,115]],[[0,"let"],[1,"char:t"],[2,116]],[[0,"let"],[1,"char:u"],[2,117]],[[0,"let"],[1,"char:v"],[2,118]],[[0,"let"],[1,"char:w"],[2,119]],[[0,"let"],[1,"char:x"],[2,120]],[[0,"let"],[1,"char:y"],[2,121]],[[0,"let"],[1,"char:z"],[2,122]],[[0,"let"],[1,"char:0"],[2,48]],[[0,"let"],[1,"char:1"],[2,49]],[[0,"let"],[1,"char:2"],[2,50]],[[0,"let"],[1,"char:3"],[2,51]],[[0,"let"],[1,"char:4"],[2,52]],[[0,"let"],[1,"char:5"],[2,53]],[[0,"let"],[1,"char:6"],[2,54]],[[0,"let"],[1,"char:7"],[2,55]],[[0,"let"],[1,"char:8"],[2,56]],[[0,"let"],[1,"char:9"],[2,57]],[[0,"let"],[1,"char:empty"],[2,0]],[[0,"let"],[1,"char:double-quote"],[2,34]],[[0,"let"],[1,"char:new-line"],[2,10]],[[0,"let"],[1,"char:space"],[2,32]],[[0,"let"],[1,"char:comma"],[2,44]],[[0,"let"],[1,"char:dot"],[2,46]],[[0,"let"],[1,"char:semi-colon"],[2,59]],[[0,"let"],[1,"char:colon"],[2,58]],[[0,"let"],[1,"char:dash"],[2,45]],[[0,"let"],[1,"char:left-brace"],[2,40]],[[0,"let"],[1,"char:right-brace"],[2,41]],[[0,"let"],[1,"char:hash"],[2,35]],[[0,"let"],[1,"math:e"],[2,2.718281828459045]],[[0,"let"],[1,"math:pi"],[2,3.141592653589793]],[[0,"let"],[1,"math:min-safe-integer"],[2,-9007199254740991]],[[0,"let"],[1,"math:max-safe-integer"],[2,9007199254740991]],[[0,"let"],[1,"math:range"],[[0,"lambda"],[1,"start"],[1,"end"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<="],[1,"count"],[1,"end"]],[[0,"rec:iterate"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[1,"count"]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"rec:iterate"],[],[1,"start"]]]]],[[0,"let"],[1,"math:sequence"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"end"],[[0,"length"],[1,"arr"]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"out"]],[1,"end"]],[[0,"rec:iterate"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[1,"count"]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"rec:iterate"],[],[2,0]]]]],[[0,"let"],[1,"math:sequence-n"],[[0,"lambda"],[1,"n"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"out"]],[1,"n"]],[[0,"rec:iterate"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[1,"count"]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"rec:iterate"],[],[2,0]]]]],[[0,"let"],[1,"math:between?"],[[0,"lambda"],[1,"v"],[1,"min"],[1,"max"],[[0,"and"],[[0,">"],[1,"v"],[1,"min"]],[[0,"<"],[1,"v"],[1,"max"]]]]],[[0,"let"],[1,"math:overlap?"],[[0,"lambda"],[1,"v"],[1,"min"],[1,"max"],[[0,"and"],[[0,">="],[1,"v"],[1,"min"]],[[0,"<="],[1,"v"],[1,"max"]]]]],[[0,"let"],[1,"math:permutations"],[[0,"lambda"],[1,"xs"],[[0,"if"],[[0,"length"],[1,"xs"]],[[0,"array:flat-one"],[[0,"array:enumerated-map"],[1,"xs"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"array:map"],[[0,"math:permutations"],[[0,"array:enumerated-exclude"],[1,"xs"],[[0,"lambda"],[1,"."],[1,"j"],[[0,"="],[1,"i"],[1,"j"]]]]],[[0,"lambda"],[1,"vs"],[[0,"cons"],[[0,"array"],[1,"x"]],[1,"vs"]]]]]]],[[0,"array"],[]]]]],[[0,"let"],[1,"math:greater?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:lesser?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"<"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:lesser-or-equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"<="],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:greater-or-equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">="],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"="],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:addition"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"+"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:multiplication"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"*"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:division"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"/"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:subtraction"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"-"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:summation"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"+"],[1,"a"],[1,"b"]]],[[0,"+"]]]]],[[0,"let"],[1,"math:product"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"*"],[1,"a"],[1,"b"]]],[[0,"*"]]]]],[[0,"let"],[1,"math:maximum"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]],[[0,"car"],[1,"arr"]]]]],[[0,"let"],[1,"math:minimum"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"<"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]],[[0,"car"],[1,"arr"]]]]],[[0,"let"],[1,"math:max"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:min"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"<"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"math:increment"],[[0,"lambda"],[1,"i"],[[0,"+"],[1,"i"],[2,1]]]],[[0,"let"],[1,"math:floor"],[[0,"lambda"],[1,"n"],[[0,"|"],[1,"n"],[2,0]]]],[[0,"let"],[1,"math:round"],[[0,"lambda"],[1,"n"],[[0,"|"],[[0,"+"],[1,"n"],[2,0.5]],[2,0]]]],[[0,"let"],[1,"math:set-bit"],[[0,"lambda"],[1,"n"],[1,"bit"],[[0,"|"],[1,"n"],[[0,"<<"],[2,1],[1,"bit"]]]]],[[0,"let"],[1,"math:clear-bit"],[[0,"lambda"],[1,"n"],[1,"bit"],[[0,"&"],[1,"n"],[[0,"~"],[[0,"<<"],[2,1],[1,"bit"]]]]]],[[0,"let"],[1,"math:power-of-two-bits"],[[0,"lambda"],[1,"n"],[[0,"<<"],[2,2],[[0,"-"],[1,"n"],[2,1]]]]],[[0,"let"],[1,"math:odd-bit?"],[[0,"lambda"],[1,"n"],[[0,"="],[[0,"&"],[1,"n"],[2,1]],[2,1]]]],[[0,"let"],[1,"math:average-bit"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">>"],[[0,"+"],[1,"a"],[1,"b"]],[2,1]]]],[[0,"let"],[1,"math:toggle-bit"],[[0,"lambda"],[1,"n"],[1,"a"],[1,"b"],[[0,"^"],[1,"a"],[1,"b"],[1,"n"]]]],[[0,"let"],[1,"math:same-sign-bit?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">="],[[0,"^"],[1,"a"],[1,"b"]],[2,0]]]],[[0,"let"],[1,"math:max-bit"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"-"],[1,"a"],[[0,"&"],[[0,"-"],[1,"a"],[1,"b"]],[[0,">>"],[[0,"-"],[1,"a"],[1,"b"]],[2,31]]]]]],[[0,"let"],[1,"math:min-bit"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"-"],[1,"a"],[[0,"&"],[[0,"-"],[1,"a"],[1,"b"]],[[0,">>"],[[0,"-"],[1,"b"],[1,"a"]],[2,31]]]]]],[[0,"let"],[1,"math:modulo-bit"],[[0,"lambda"],[1,"numerator"],[1,"divisor"],[[0,"&"],[1,"numerator"],[[0,"-"],[1,"divisor"],[2,1]]]]],[[0,"let"],[1,"math:n-one-bit?"],[[0,"lambda"],[1,"N"],[1,"nth"],[[0,"not"],[[0,"not"],[[0,"&"],[1,"N"],[[0,"<<"],[2,1],[1,"nth"]]]]]]],[[0,"let"],[1,"math:count-leading-zero-bits32"],[[0,"lambda"],[1,"x"],[[0,"if"],[[0,">="],[1,"x"],[2,0]],[[0,"-"],[2,32],[[0,"length"],[[0,"from:number->bit"],[1,"x"]]]]]]],[[0,"let"],[1,"math:bit-count32"],[[0,"lambda"],[1,"n0"],[[0,"do"],[[0,"let"],[1,"n1"],[[0,"-"],[1,"n0"],[[0,"&"],[[0,">>"],[1,"n0"],[2,1]],[2,1431655765]]]],[[0,"let"],[1,"n2"],[[0,"+"],[[0,"&"],[1,"n1"],[2,858993459]],[[0,"&"],[[0,">>"],[1,"n1"],[2,2]],[2,858993459]]]],[[0,">>"],[[0,"*"],[[0,"&"],[[0,"+"],[1,"n2"],[[0,">>"],[1,"n2"],[2,4]]],[2,252645135]],[2,16843009]],[2,24]]]]],[[0,"let"],[1,"math:bit-count"],[[0,"lambda"],[1,"n"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"n"],[1,"bits"],[[0,"if"],[[0,"="],[1,"n"],[2,0]],[1,"bits"],[[0,"rec:iter"],[[0,"/"],[1,"n"],[2,4294967296]],[[0,"+"],[1,"bits"],[[0,"math:bit-count32"],[[0,"|"],[1,"n"],[2,0]]]]]]]],[[0,"rec:iter"],[1,"n"],[2,0]]]]],[[0,"let"],[1,"math:square"],[[0,"lambda"],[1,"x"],[[0,"*"],[1,"x"],[1,"x"]]]],[[0,"let"],[1,"math:power"],[[0,"lambda"],[1,"base"],[1,"exp"],[[0,"if"],[[0,"<"],[1,"exp"],[2,0]],[[0,"if"],[[0,"="],[1,"base"],[2,0]],[],[[0,"/"],[[0,"*"],[1,"base"],[[0,"math:power"],[1,"base"],[[0,"-"],[[0,"*"],[1,"exp"],[2,-1]],[2,1]]]]]],[[0,"cond"],[[0,"="],[1,"exp"],[2,0]],[2,1],[[0,"="],[1,"exp"],[2,1]],[1,"base"],[[0,"*"]],[[0,"*"],[1,"base"],[[0,"math:power"],[1,"base"],[[0,"-"],[1,"exp"],[2,1]]]]]]]],[[0,"let"],[1,"math:greatest-common-divisor"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"rec:gcd"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"="],[1,"b"],[2,0]],[1,"a"],[[0,"rec:gcd"],[1,"b"],[[0,"mod"],[1,"a"],[1,"b"]]]]]],[[0,"rec:gcd"],[1,"a"],[1,"b"]]]]],[[0,"let"],[1,"math:least-common-divisor"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"*"],[1,"a"],[1,"b"],[[0,"/"],[[0,"math:greatest-common-divisor"],[1,"a"],[1,"b"]]]]]],[[0,"let"],[1,"math:sqrt"],[[0,"lambda"],[1,"x"],[[0,"do"],[[0,"let"],[1,"is-good-enough"],[[0,"lambda"],[1,"g"],[1,"x"],[[0,"<"],[[0,"math:abs"],[[0,"-"],[[0,"math:square"],[1,"g"]],[1,"x"]]],[2,0.01]]]],[[0,"let"],[1,"improve-guess"],[[0,"lambda"],[1,"g"],[1,"x"],[[0,"math:average"],[1,"g"],[[0,"*"],[1,"x"],[[0,"/"],[1,"g"]]]]]],[[0,"let"],[1,"rec:sqrt-rec:iter"],[[0,"lambda"],[1,"g"],[1,"x"],[[0,"if"],[[0,"is-good-enough"],[1,"g"],[1,"x"]],[1,"g"],[[0,"rec:sqrt-rec:iter"],[[0,"improve-guess"],[1,"g"],[1,"x"]],[1,"x"]]]]],[[0,"rec:sqrt-rec:iter"],[2,1],[1,"x"]]]]],[[0,"let"],[1,"math:circumference"],[[0,"lambda"],[1,"radius"],[[0,"*"],[1,"math:pi"],[[0,"*"],[1,"radius"],[2,2]]]]],[[0,"let"],[1,"math:hypotenuse"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"math:sqrt"],[[0,"+"],[[0,"*"],[1,"a"],[1,"a"]],[[0,"*"],[1,"b"],[1,"b"]]]]]],[[0,"let"],[1,"math:abs"],[[0,"lambda"],[1,"n"],[[0,"-"],[[0,"^"],[1,"n"],[[0,">>"],[1,"n"],[2,31]]],[[0,">>"],[1,"n"],[2,31]]]]],[[0,"let"],[1,"math:nth-digit"],[[0,"lambda"],[1,"digit"],[1,"n"],[[0,"|"],[[0,"mod"],[[0,"/"],[1,"digit"],[[0,"math:power"],[2,10],[[0,"-"],[1,"n"],[2,1]]]],[2,10]],[2,0.5]]]],[[0,"let"],[1,"math:normalize"],[[0,"lambda"],[1,"value"],[1,"math:min"],[1,"math:max"],[[0,"*"],[[0,"-"],[1,"value"],[1,"math:min"]],[[0,"/"],[[0,"-"],[1,"math:max"],[1,"math:min"]]]]]],[[0,"let"],[1,"math:linear-interpolation"],[[0,"lambda"],[1,"a"],[1,"b"],[1,"n"],[[0,"+"],[[0,"*"],[[0,"-"],[2,1],[1,"n"]],[1,"a"]],[[0,"*"],[1,"n"],[1,"b"]]]]],[[0,"let"],[1,"math:gauss-sum"],[[0,"lambda"],[1,"n"],[[0,"*"],[1,"n"],[[0,"+"],[1,"n"],[2,1]],[2,0.5]]]],[[0,"let"],[1,"math:gauss-sum-sequance"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"*"],[[0,"+"],[1,"a"],[1,"b"]],[[0,"+"],[[0,"-"],[1,"b"],[1,"a"]],[2,1]],[2,0.5]]]],[[0,"let"],[1,"math:clamp"],[[0,"lambda"],[1,"x"],[1,"limit"],[[0,"if"],[[0,">"],[1,"x"],[1,"limit"]],[1,"limit"],[1,"x"]]]],[[0,"let"],[1,"math:clamp-range"],[[0,"lambda"],[1,"x"],[1,"start"],[1,"end"],[[0,"cond"],[[0,">"],[1,"x"],[1,"end"]],[1,"end"],[[0,"<"],[1,"x"],[1,"start"]],[1,"start"],[[0,"*"]],[1,"x"]]]],[[0,"let"],[1,"math:odd?"],[[0,"lambda"],[1,"x"],[[0,"="],[[0,"mod"],[1,"x"],[2,2]],[2,1]]]],[[0,"let"],[1,"math:even?"],[[0,"lambda"],[1,"x"],[[0,"="],[[0,"mod"],[1,"x"],[2,2]],[2,0]]]],[[0,"let"],[1,"math:enumerated-odd?"],[[0,"lambda"],[1,"."],[1,"i"],[[0,"="],[[0,"mod"],[1,"i"],[2,2]],[2,1]]]],[[0,"let"],[1,"math:enumerated-even?"],[[0,"lambda"],[1,"."],[1,"i"],[[0,"="],[[0,"mod"],[1,"i"],[2,2]],[2,0]]]],[[0,"let"],[1,"math:sign"],[[0,"lambda"],[1,"n"],[[0,"if"],[[0,"<"],[1,"n"],[2,0]],[2,-1],[2,1]]]],[[0,"let"],[1,"math:radians"],[[0,"lambda"],[1,"deg"],[[0,"*"],[1,"deg"],[1,"math:pi"],[[0,"/"],[2,180]]]]],[[0,"let"],[1,"math:average"],[[0,"lambda"],[1,"x"],[1,"y"],[[0,"*"],[[0,"+"],[1,"x"],[1,"y"]],[2,0.5]]]],[[0,"let"],[1,"math:euclidean-mod"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"mod"],[[0,"+"],[[0,"mod"],[1,"a"],[1,"b"]],[1,"b"]],[1,"b"]]]],[[0,"let"],[1,"math:euclidean-distance"],[[0,"lambda"],[1,"x1"],[1,"y1"],[1,"x2"],[1,"y2"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"-"],[1,"x1"],[1,"x2"]]],[[0,"let"],[1,"b"],[[0,"-"],[1,"y1"],[1,"y2"]]],[[0,"math:sqrt"],[[0,"+"],[[0,"*"],[1,"a"],[1,"a"]],[[0,"*"],[1,"b"],[1,"b"]]]]]]],[[0,"let"],[1,"math:manhattan-distance"],[[0,"lambda"],[1,"x1"],[1,"y1"],[1,"x2"],[1,"y2"],[[0,"+"],[[0,"math:abs"],[[0,"-"],[1,"x2"],[1,"x1"]]],[[0,"math:abs"],[[0,"-"],[1,"y2"],[1,"y1"]]]]]],[[0,"let"],[1,"math:positive?"],[[0,"lambda"],[1,"num"],[[0,">"],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:negative?"],[[0,"lambda"],[1,"num"],[[0,"<"],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:zero?"],[[0,"lambda"],[1,"num"],[[0,"="],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:negative-one?"],[[0,"lambda"],[1,"num"],[[0,"="],[1,"num"],[2,-1]]]],[[0,"let"],[1,"math:divisible?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"="],[[0,"mod"],[1,"a"],[1,"b"]],[2,0]]]],[[0,"let"],[1,"math:factorial"],[[0,"lambda"],[1,"n"],[[0,"if"],[[0,"<="],[1,"n"],[2,0]],[2,1],[[0,"*"],[1,"n"],[[0,"math:factorial"],[[0,"-"],[1,"n"],[2,1]]]]]]],[[0,"let"],[1,"math:sine"],[[0,"lambda"],[1,"rad"],[1,"terms"],[[0,"do"],[[0,"let"],[1,"sine"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"rec:inc"],[[0,"lambda"],[1,"i"],[[0,"do"],[[0,"var:set!"],[1,"sine"],[[0,"+"],[[0,"var:get"],[1,"sine"]],[[0,"*"],[[0,"/"],[[0,"math:factorial"],[[0,"+"],[[0,"*"],[2,2],[1,"i"]],[2,1]]]],[[0,"math:power"],[2,-1],[1,"i"]],[[0,"math:power"],[1,"rad"],[[0,"+"],[[0,"*"],[2,2],[1,"i"]],[2,1]]]]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"terms"]],[[0,"rec:inc"],[[0,"+"],[1,"i"],[2,1]]],[[0,"var:get"],[1,"sine"]]]]]],[[0,"rec:inc"],[2,0]]]]],[[0,"let"],[1,"math:cosine"],[[0,"lambda"],[1,"rad"],[1,"terms"],[[0,"do"],[[0,"let"],[1,"cosine"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"rec:inc"],[[0,"lambda"],[1,"i"],[[0,"do"],[[0,"var:set!"],[1,"cosine"],[[0,"+"],[[0,"var:get"],[1,"cosine"]],[[0,"*"],[[0,"/"],[[0,"math:factorial"],[[0,"*"],[2,2],[1,"i"]]]],[[0,"math:power"],[2,-1],[1,"i"]],[[0,"math:power"],[1,"rad"],[[0,"*"],[2,2],[1,"i"]]]]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"terms"]],[[0,"rec:inc"],[[0,"+"],[1,"i"],[2,1]]],[[0,"var:get"],[1,"cosine"]]]]]],[[0,"rec:inc"],[2,0]]]]],[[0,"let"],[1,"math:prime-factors"],[[0,"lambda"],[1,"N"],[[0,"do"],[[0,"let"],[1,"a"],[]],[[0,"let"],[1,"n"],[[0,"var:def"],[1,"N"]]],[[0,"let"],[1,"f"],[[0,"var:def"],[2,2]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[[0,"if"],[[0,">"],[[0,"var:get"],[1,"n"]],[2,1]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"mod"],[[0,"var:get"],[1,"n"]],[[0,"var:get"],[1,"f"]]],[2,0]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[[0,"var:get"],[1,"f"]]],[[0,"var:set!"],[1,"n"],[[0,"*"],[[0,"var:get"],[1,"n"]],[[0,"/"],[[0,"var:get"],[1,"f"]]]]]]]],[[0,"var:set!"],[1,"f"],[[0,"+"],[[0,"var:get"],[1,"f"]],[2,1]]]],[[0,"rec:iterate"]]]]],[1,"a"]]]],[[0,"rec:iterate"]]]]],[[0,"let"],[1,"math:prime?"],[[0,"lambda"],[1,"n"],[[0,"cond"],[[0,"="],[1,"n"],[2,1]],[2,0],[[0,"<"],[1,"n"],[2,0]],[2,0],[[0,"*"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"i"],[1,"end"],[[0,"do"],[[0,"let"],[1,"prime?"],[[0,"not"],[[0,"="],[[0,"mod"],[1,"n"],[1,"i"]],[2,0]]]],[[0,"if"],[[0,"and"],[[0,"<="],[1,"i"],[1,"end"]],[1,"prime?"]],[[0,"rec:iter"],[[0,"+"],[1,"i"],[2,1]],[1,"end"]],[1,"prime?"]]]]],[[0,"or"],[[0,"="],[1,"n"],[2,2]],[[0,"rec:iter"],[2,2],[[0,"math:sqrt"],[1,"n"]]]]]]]]]],[[0,"let"],[1,"math:number-of-digits"],[[0,"lambda"],[1,"n"],[[0,"cond"],[[0,"="],[1,"n"],[2,0]],[2,1],[[0,"<"],[1,"n"],[2,0]],[[0,"length"],[[0,"from:number->digits"],[[0,"|"],[[0,"*"],[1,"n"],[2,-1]],[2,0]]]],[[0,"*"]],[[0,"length"],[[0,"from:number->digits"],[[0,"|"],[1,"n"],[2,0]]]]]]],[[0,"let"],[1,"math:largest-power"],[[0,"lambda"],[1,"N"],[[0,"do"],[[0,"let"],[1,"N1"],[[0,"|"],[1,"N"],[[0,">>"],[1,"N"],[2,1]]]],[[0,"let"],[1,"N2"],[[0,"|"],[1,"N1"],[[0,">>"],[1,"N1"],[2,2]]]],[[0,"let"],[1,"N3"],[[0,"|"],[1,"N2"],[[0,">>"],[1,"N2"],[2,4]]]],[[0,"let"],[1,"N4"],[[0,"|"],[1,"N3"],[[0,">>"],[1,"N3"],[2,8]]]],[[0,">>"],[[0,"+"],[1,"N4"],[2,1]],[2,1]]]]],[[0,"let"],[1,"math:cartesian-product"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:fold"],[1,"a"],[[0,"lambda"],[1,"p"],[1,"x"],[[0,"array:merge!"],[1,"p"],[[0,"array:map"],[1,"b"],[[0,"lambda"],[1,"y"],[[0,"array"],[1,"x"],[1,"y"]]]]]],[]]]],[[0,"let"],[1,"math:enumeration"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"I"],[[0,"var:def"],[2,-1]]],[[0,"let"],[1,"rec:inc"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"i"],[[0,"+"],[[0,"var:get"],[1,"I"]],[2,1]]],[[0,"var:set!"],[1,"I"],[1,"i"]],[1,"i"]]]]]]],[[0,"let"],[1,"math:palindrome?"],[[0,"lambda"],[1,"arr"],[[0,"array:every?"],[[0,"array:map"],[[0,"array:zip"],[1,"arr"],[[0,"array:reverse"],[1,"arr"]]],[1,"tuple:subtract"]],[1,"math:zero?"]]]],[[0,"let"],[1,"math:max-sub-array-sum"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"get-sum"],[[0,"lambda"],[1,"arr"],[[0,"get"],[1,"arr"],[2,0]]]],[[0,"let"],[1,"set-sum!"],[[0,"lambda"],[1,"arr"],[1,"value"],[[0,"set!"],[1,"arr"],[2,0],[1,"value"]]]],[[0,"let"],[1,"get-max"],[[0,"lambda"],[1,"arr"],[[0,"get"],[1,"arr"],[2,1]]]],[[0,"let"],[1,"set-max!"],[[0,"lambda"],[1,"arr"],[1,"value"],[[0,"set!"],[1,"arr"],[2,1],[1,"value"]]]],[[0,"car"],[[0,"cdr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"set-sum!"],[1,"a"],[[0,"+"],[[0,"get-sum"],[1,"a"]],[1,"b"]]],[[0,"if"],[[0,"<"],[[0,"get-max"],[1,"a"]],[[0,"get-sum"],[1,"a"]]],[[0,"set-max!"],[1,"a"],[[0,"get-sum"],[1,"a"]]]],[[0,"if"],[[0,"<"],[[0,"get-sum"],[1,"a"]],[2,0]],[[0,"set-sum!"],[1,"a"],[2,0]]],[1,"a"]]],[[0,"array"],[2,0],[1,"math:min-safe-integer"]]]]]]]],[[0,"let"],[1,"array:for"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"out"],[[0,"if"],[[0,"length"],[1,"out"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"callback"],[[0,"car"],[1,"out"]]],[[0,"rec:iter"],[[0,"cdr"],[1,"out"]]]]]]]]],[[0,"rec:iter"],[1,"arr"]],[1,"arr"]]]],[[0,"let"],[1,"array:fill"],[[0,"lambda"],[1,"n"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"="],[1,"i"],[2,0]],[1,"arr"],[[0,"rec:iter"],[[0,"cons"],[1,"arr"],[[0,"array"],[[0,"callback"]]]],[[0,"-"],[1,"i"],[2,1]]]]]],[[0,"rec:iter"],[],[1,"n"]]]]],[[0,"let"],[1,"array:of"],[[0,"lambda"],[1,"n"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"="],[1,"i"],[1,"n"]],[1,"arr"],[[0,"rec:iter"],[[0,"cons"],[1,"arr"],[[0,"array"],[[0,"callback"],[1,"i"]]]],[[0,"+"],[1,"i"],[2,1]]]]]],[[0,"rec:iter"],[],[2,0]]]]],[[0,"let"],[1,"array:map"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"callback"],[[0,"car"],[1,"arr"]]]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:select"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:exclude"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"if"],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]]]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:fold"],[[0,"lambda"],[1,"arr"],[1,"callback"],[1,"initial"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"callback"],[1,"out"],[[0,"car"],[1,"arr"]]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[1,"initial"]]]]],[[0,"let"],[1,"array:every?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"callback"],[[0,"car"],[1,"arr"]]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]]],[[0,"not"],[[0,"length"],[1,"arr"]]]]]],[[0,"rec:iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:some?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]]]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]]],[[0,"not"],[[0,"not"],[[0,"length"],[1,"arr"]]]]]]],[[0,"rec:iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:find"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"car"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]]]],[]]]],[[0,"rec:iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:has?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[2,1],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]]]]]]],[[0,"rec:iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:reverse"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"array:merge!"],[[0,"array"],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:append!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"set!"],[1,"q"],[[0,"length"],[1,"q"]],[1,"item"]]]],[[0,"let"],[1,"array:tail!"],[[0,"lambda"],[1,"q"],[[0,"set!"],[1,"q"],[2,-1]]]],[[0,"let"],[1,"array:push!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"do"],[[0,"set!"],[1,"q"],[[0,"length"],[1,"q"]],[1,"item"]],[1,"item"]]]],[[0,"let"],[1,"array:pop!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"l"],[[0,"get"],[1,"q"],[2,-1]]],[[0,"set!"],[1,"q"],[2,-1]],[1,"l"]]]],[[0,"let"],[1,"array:unique"],[[0,"lambda"],[1,"arr"],[[0,"array:map"],[[0,"array:select"],[[0,"array:zip"],[[0,"let"],[1,"sorted"],[[0,"array:sort"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,">"],[1,"a"],[1,"b"]]]]],[[0,"math:sequence"],[1,"sorted"]]],[[0,"lambda"],[1,"x"],[[0,"do"],[[0,"let"],[1,"index"],[[0,"car"],[[0,"cdr"],[1,"x"]]]],[[0,"or"],[[0,"not"],[1,"x"]],[[0,"not"],[[0,"="],[[0,"get"],[1,"sorted"],[[0,"-"],[1,"index"],[2,1]]],[[0,"get"],[1,"sorted"],[1,"index"]]]]]]]],[1,"car"]]]],[[0,"let"],[1,"array:for-range"],[[0,"lambda"],[1,"start"],[1,"end"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"end"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"callback"],[1,"i"]],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]]]]]]]]],[[0,"rec:iterate"],[1,"start"]]]]],[[0,"let"],[1,"array:traverse"],[[0,"lambda"],[1,"x"],[1,"callback"],[[0,"if"],[[0,"atom?"],[1,"x"]],[[0,"callback"],[1,"x"]],[[0,"rec:iterate"],[1,"x"],[[0,"lambda"],[1,"y"],[[0,"array:traverse"],[1,"y"],[1,"callback"]]]]]]],[[0,"let"],[1,"array:iterate"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"array:for-range"],[2,0],[[0,"length"],[1,"arr"]],[1,"callback"]],[1,"arr"]]]],[[0,"let"],[1,"array:empty?"],[[0,"lambda"],[1,"arr"],[[0,"not"],[[0,"length"],[1,"arr"]]]]],[[0,"let"],[1,"array:not-empty?"],[[0,"lambda"],[1,"arr"],[[0,"="],[[0,"not"],[[0,"length"],[1,"arr"]]],[2,0]]]],[[0,"let"],[1,"array:count-of"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"length"],[[0,"array:select"],[1,"arr"],[1,"callback"]]]]],[[0,"let"],[1,"array:empty!"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"arr"],[2,-1]],[[0,"rec:iterate"]]]]],[1,"arr"]]]],[[0,"rec:iterate"]]]]],[[0,"let"],[1,"array:in-bounds?"],[[0,"lambda"],[1,"arr"],[1,"index"],[[0,"and"],[[0,"<"],[1,"index"],[[0,"length"],[1,"arr"]]],[[0,">="],[1,"index"],[2,0]]]]],[[0,"let"],[1,"array:slice"],[[0,"lambda"],[1,"arr"],[1,"start"],[1,"end"],[[0,"do"],[[0,"let"],[1,"bounds"],[[0,"-"],[1,"end"],[1,"start"]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[1,"out"],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"get"],[1,"arr"],[[0,"+"],[1,"start"],[1,"i"]]]]],[1,"out"]]]],[[0,"rec:iterate"],[2,0],[]]]]],[[0,"let"],[1,"array:binary-search"],[[0,"lambda"],[1,"arr"],[1,"target"],[[0,"do"],[[0,"let"],[1,"rec:search"],[[0,"lambda"],[1,"arr"],[1,"target"],[1,"start"],[1,"end"],[[0,"do"],[[0,"if"],[[0,"<="],[1,"start"],[1,"end"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"index"],[[0,"math:floor"],[[0,"*"],[[0,"+"],[1,"start"],[1,"end"]],[2,0.5]]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"arr"],[1,"index"]]],[[0,"if"],[[0,"="],[1,"target"],[1,"current"]],[1,"target"],[[0,"if"],[[0,">"],[1,"current"],[1,"target"]],[[0,"rec:search"],[1,"arr"],[1,"target"],[1,"start"],[[0,"-"],[1,"index"],[2,1]]],[[0,"rec:search"],[1,"arr"],[1,"target"],[[0,"+"],[1,"index"],[2,1]],[1,"end"]]]]]]]]]]],[[0,"rec:search"],[1,"arr"],[1,"target"],[2,0],[[0,"length"],[1,"arr"]]]]]],[[0,"let"],[1,"array:zip"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"a"],[1,"b"],[1,"output"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"a"]],[[0,"cdr"],[1,"b"]],[[0,"set!"],[1,"output"],[[0,"length"],[1,"output"]],[[0,"array"],[[0,"car"],[1,"a"]],[[0,"car"],[1,"b"]]]]],[1,"output"]]]],[[0,"rec:iterate"],[1,"A"],[1,"B"],[]]]]],[[0,"let"],[1,"array:equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"or"],[[0,"and"],[[0,"atom?"],[1,"a"]],[[0,"atom?"],[1,"b"]],[[0,"="],[1,"a"],[1,"b"]]],[[0,"and"],[[0,"array?"],[1,"a"]],[[0,"="],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"not"],[[0,"array:some?"],[[0,"math:sequence"],[1,"a"]],[[0,"lambda"],[1,"i"],[[0,"not"],[[0,"array:equal?"],[[0,"get"],[1,"a"],[1,"i"]],[[0,"get"],[1,"b"],[1,"i"]]]]]]]]]]],[[0,"let"],[1,"array:join"],[[0,"lambda"],[1,"arr"],[1,"delim"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[1,"delim"],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:chars"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:lines"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:new-line"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:commas"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:comma"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:spaces"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:space"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:dots"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:dot"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:colons"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:colon"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:semi-colons"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:semi-colon"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:dashes"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"char:dash"]],[[0,"car"],[1,"b"]]],[[0,"car"],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:flat-one"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:merge!"],[1,"a"],[[0,"if"],[[0,"array?"],[1,"b"]],[1,"b"],[[0,"array"],[1,"b"]]]]],[]]]],[[0,"let"],[1,"array:flat"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"flatten"],[[0,"lambda"],[1,"item"],[[0,"if"],[[0,"array?"],[1,"item"]],[[0,"array:fold"],[1,"item"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:merge!"],[1,"a"],[[0,"flatten"],[1,"b"]]]],[]],[[0,"array"],[1,"item"]]]]],[[0,"flatten"],[1,"arr"]]]]],[[0,"let"],[1,"array:sort"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"if"],[[0,"<="],[[0,"length"],[1,"arr"]],[2,1]],[1,"arr"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"pivot"],[[0,"car"],[1,"arr"]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[1,"bounds"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"current"],[[0,"get"],[1,"arr"],[1,"i"]]],[[0,"let"],[1,"predicate"],[[0,"callback"],[1,"current"],[1,"pivot"]]],[[0,"let"],[1,"left"],[[0,"if"],[[0,"="],[1,"predicate"],[2,0]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"current"]]],[1,"a"]]],[[0,"let"],[1,"right"],[[0,"if"],[[0,"="],[1,"predicate"],[2,1]],[[0,"cons"],[1,"b"],[[0,"array"],[1,"current"]]],[1,"b"]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"],[1,"left"],[1,"right"]],[[0,"array"],[1,"left"],[1,"right"]]]]]],[[0,"let"],[1,"sorted"],[[0,"rec:iterate"],[2,1],[[0,"-"],[[0,"length"],[1,"arr"]],[2,1]],[],[]]],[[0,"let"],[1,"left"],[[0,"car"],[1,"sorted"]]],[[0,"let"],[1,"right"],[[0,"car"],[[0,"cdr"],[1,"sorted"]]]],[[0,"cons"],[[0,"array:sort"],[1,"left"],[1,"callback"]],[[0,"array"],[1,"pivot"]],[[0,"array:sort"],[1,"right"],[1,"callback"]]]]]]]]]],[[0,"let"],[1,"array:sorted-ascending?"],[[0,"lambda"],[1,"arr"],[[0,"array:enumerated-every?"],[1,"arr"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"or"],[[0,"="],[1,"i"],[2,0]],[[0,">="],[1,"x"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]]]]]]],[[0,"let"],[1,"array:sorted-descending?"],[[0,"lambda"],[1,"arr"],[[0,"array:enumerated-every?"],[1,"arr"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"or"],[[0,"="],[1,"i"],[2,0]],[[0,"<="],[1,"x"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]]]]]]],[[0,"let"],[1,"array:sorted-by?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"array:enumerated-every?"],[1,"arr"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"or"],[[0,"="],[1,"i"],[2,0]],[[0,"callback"],[1,"x"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]]]]]]],[[0,"let"],[1,"array:set"],[[0,"lambda"],[1,"arr"],[1,"index"],[1,"item"],[[0,"set!"],[[0,"array:shallow-copy"],[1,"arr"]],[1,"index"],[1,"item"]]]],[[0,"let"],[1,"array:adjacent-difference"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"length"],[1,"arr"]]],[[0,"if"],[[0,"="],[1,"len"],[2,1]],[1,"arr"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"array"],[[0,"car"],[1,"arr"]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[1,"result"],[[0,"if"],[[0,"<"],[1,"i"],[1,"len"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]],[[0,"set!"],[1,"result"],[1,"i"],[[0,"callback"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]],[[0,"get"],[1,"arr"],[1,"i"]]]]]]]],[1,"result"]]]],[[0,"rec:iterate"],[2,1],[1,"arr"]]]]]]]]],[[0,"let"],[1,"array:adjacent-find"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"length"],[1,"arr"]]],[[0,"if"],[[0,"not"],[[0,"="],[1,"len"],[2,1]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"len"]],[[0,"if"],[[0,"callback"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"arr"],[1,"i"]]]],[1,"prev"],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]]]],[]]]],[[0,"rec:iterate"],[2,1]]]]]]]]],[[0,"let"],[1,"array:adjacent"],[[0,"lambda"],[1,"arr"],[1,"directions"],[1,"y"],[1,"x"],[1,"callback"],[[0,"array:for"],[1,"directions"],[[0,"lambda"],[1,"dir"],[[0,"do"],[[0,"let"],[1,"dy"],[[0,"+"],[[0,"car"],[1,"dir"]],[1,"y"]]],[[0,"let"],[1,"dx"],[[0,"+"],[[0,"car"],[[0,"cdr"],[1,"dir"]]],[1,"x"]]],[[0,"if"],[[0,"and"],[[0,"array:in-bounds?"],[1,"arr"],[1,"dy"]],[[0,"array:in-bounds?"],[[0,"get"],[1,"arr"],[1,"dy"]],[1,"dx"]]],[[0,"callback"],[[0,"get"],[[0,"get"],[1,"arr"],[1,"dy"]],[1,"dx"]],[1,"dir"]]]]]]]],[[0,"let"],[1,"array:partition"],[[0,"lambda"],[1,"arr"],[1,"n"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"x"],[[0,"car"],[1,"b"]]],[[0,"let"],[1,"i"],[[0,"car"],[[0,"cdr"],[1,"b"]]]],[[0,"if"],[[0,"mod"],[1,"i"],[1,"n"]],[[0,"array:push!"],[[0,"get"],[1,"a"],[2,-1]],[1,"x"]],[[0,"array:push!"],[1,"a"],[[0,"array"],[1,"x"]]]],[1,"a"]]],[]]]],[[0,"let"],[1,"from:digit->char"],[[0,"lambda"],[1,"d"],[[0,"cond"],[[0,"="],[1,"d"],[2,0]],[1,"char:0"],[[0,"="],[1,"d"],[2,1]],[1,"char:1"],[[0,"="],[1,"d"],[2,2]],[1,"char:2"],[[0,"="],[1,"d"],[2,3]],[1,"char:3"],[[0,"="],[1,"d"],[2,4]],[1,"char:4"],[[0,"="],[1,"d"],[2,5]],[1,"char:5"],[[0,"="],[1,"d"],[2,6]],[1,"char:6"],[[0,"="],[1,"d"],[2,7]],[1,"char:7"],[[0,"="],[1,"d"],[2,8]],[1,"char:8"],[[0,"="],[1,"d"],[2,9]],[1,"char:9"],[[0,"*"]],[]]]],[[0,"let"],[1,"from:char->digit"],[[0,"lambda"],[1,"c"],[[0,"cond"],[[0,"="],[1,"c"],[1,"char:0"]],[2,0],[[0,"="],[1,"c"],[1,"char:1"]],[2,1],[[0,"="],[1,"c"],[1,"char:2"]],[2,2],[[0,"="],[1,"c"],[1,"char:3"]],[2,3],[[0,"="],[1,"c"],[1,"char:4"]],[2,4],[[0,"="],[1,"c"],[1,"char:5"]],[2,5],[[0,"="],[1,"c"],[1,"char:6"]],[2,6],[[0,"="],[1,"c"],[1,"char:7"]],[2,7],[[0,"="],[1,"c"],[1,"char:8"]],[2,8],[[0,"="],[1,"c"],[1,"char:9"]],[2,9],[[0,"*"]],[]]]],[[0,"let"],[1,"from:chars->digits"],[[0,"lambda"],[1,"chars"],[[0,"array:map"],[1,"chars"],[[0,"lambda"],[1,"ch"],[[0,"from:char->digit"],[1,"ch"]]]]]],[[0,"let"],[1,"from:digits->chars"],[[0,"lambda"],[1,"numbers"],[[0,"array:map"],[1,"numbers"],[[0,"lambda"],[1,"digit"],[[0,"from:digit->char"],[1,"digit"]]]]]],[[0,"let"],[1,"from:digits->number"],[[0,"lambda"],[1,"digits"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"rem"],[1,"num"],[1,"base"],[[0,"if"],[[0,"length"],[1,"rem"]],[[0,"rec:iter"],[[0,"cdr"],[1,"rem"]],[[0,"+"],[1,"num"],[[0,"*"],[1,"base"],[[0,"car"],[1,"rem"]]]],[[0,"*"],[1,"base"],[2,0.1]]],[1,"num"]]]],[[0,"rec:iter"],[1,"digits"],[2,0],[[0,"*"],[[0,"math:power"],[2,10],[[0,"length"],[1,"digits"]]],[2,0.1]]]]]],[[0,"let"],[1,"from:negative-or-positive-digits->chars"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[[0,"array:map"],[1,"arr"],[[0,"lambda"],[1,"x"],[[0,"if"],[[0,"math:negative?"],[1,"x"]],[[0,"array"],[2,0],[[0,"*"],[1,"x"],[2,-1]]],[[0,"array"],[2,1],[1,"x"]]]]],[[0,"lambda"],[1,"a"],[1,"x"],[[0,"if"],[[0,"car"],[1,"x"]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[[0,"from:digit->char"],[[0,"car"],[[0,"cdr"],[1,"x"]]]]],[[0,"set!"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"char:dash"]],[[0,"length"],[1,"a"]],[[0,"from:digit->char"],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]]],[]]]],[[0,"let"],[1,"from:number->digits"],[[0,"lambda"],[1,"num"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"num"],[1,"res"],[[0,"cond"],[[0,">="],[1,"num"],[2,1]],[[0,"rec:iter"],[[0,"/"],[1,"num"],[2,10]],[[0,"set!"],[1,"res"],[[0,"length"],[1,"res"]],[[0,"|"],[[0,"mod"],[1,"num"],[2,10]],[2,0]]]],[[0,"="],[1,"num"],[2,0]],[[0,"array"],[2,0]],[[0,"*"]],[1,"res"]]]],[[0,"array:reverse"],[[0,"rec:iter"],[1,"num"],[]]]]]],[[0,"let"],[1,"from:number->bits"],[[0,"lambda"],[1,"num"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"num"],[1,"res"],[[0,"cond"],[[0,">="],[1,"num"],[2,1]],[[0,"rec:iter"],[[0,"/"],[1,"num"],[2,2]],[[0,"set!"],[1,"res"],[[0,"length"],[1,"res"]],[[0,"|"],[[0,"mod"],[1,"num"],[2,2]],[2,0]]]],[[0,"="],[1,"num"],[2,0]],[[0,"array"],[2,0]],[[0,"*"]],[1,"res"]]]],[[0,"array:reverse"],[[0,"rec:iter"],[1,"num"],[]]]]]],[[0,"let"],[1,"from:numbers->chars"],[[0,"lambda"],[1,"x"],[[0,"array:map"],[1,"x"],[[0,"lambda"],[1,"x"],[[0,"from:digits->chars"],[[0,"from:number->digits"],[1,"x"]]]]]]],[[0,"let"],[1,"from:chars->numbers"],[[0,"lambda"],[1,"arr"],[[0,"array:map"],[[0,"array:select"],[[0,"array:map"],[[0,"array:map"],[1,"arr"],[1,"from:chars->digits"]],[1,"array:flat-one"]],[1,"length"]],[1,"from:digits->number"]]]],[[0,"let"],[1,"from:string->date"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"string:dashes"],[1,"str"]],[[0,"lambda"],[1,"d"],[[0,"from:digits->number"],[[0,"from:chars->digits"],[1,"d"]]]]]]],[[0,"let"],[1,"from:any->boolean"],[[0,"lambda"],[1,"val"],[[0,"not"],[[0,"not"],[1,"val"]]]]],[[0,"let"],[1,"from:array->set"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"s"],[[0,"array"],[],[],[],[]]],[[0,"array:for"],[1,"arr"],[[0,"lambda"],[1,"x"],[[0,"set:add!"],[1,"s"],[1,"x"]]]],[1,"s"]]]],[[0,"let"],[1,"from:array->table"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let"],[1,"s"],[[0,"array"],[],[],[],[]]],[[0,"array:for"],[1,"arr"],[[0,"lambda"],[1,"x"],[[0,"map:set!"],[1,"s"],[1,"x"],[2,0]]]],[1,"s"]]]],[[0,"let"],[1,"from:set->array"],[[0,"lambda"],[1,"set"],[[0,"array:select"],[[0,"array:flat-one"],[1,"set"]],[1,"length"]]]],[[0,"let"],[1,"from:map->array"],[[0,"lambda"],[1,"set"],[[0,"array:select"],[[0,"array:flat-one"],[1,"set"]],[1,"length"]]]],[[0,"let"],[1,"from:set->numbers"],[[0,"lambda"],[1,"set"],[[0,"array:map"],[[0,"from:set->array"],[1,"set"]],[[0,"lambda"],[1,"x"],[[0,"from:digits->number"],[[0,"from:chars->digits"],[1,"x"]]]]]]],[[0,"let"],[1,"from:array->brray"],[[0,"lambda"],[1,"initial"],[[0,"do"],[[0,"let"],[1,"q"],[[0,"new:brray"]]],[[0,"let"],[1,"half"],[[0,"math:floor"],[[0,"*"],[[0,"length"],[1,"initial"]],[2,0.5]]]],[[0,"let"],[1,"rec:left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[[0,"get"],[1,"initial"],[1,"index"]]],[[0,"if"],[[0,">"],[1,"index"],[2,0]],[[0,"rec:left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"rec:left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let"],[1,"rec:right"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[[0,"get"],[1,"initial"],[1,"index"]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:right"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:right"],[1,"half"],[[0,"-"],[[0,"length"],[1,"initial"]],[2,1]]],[1,"q"]]]],[[0,"let"],[1,"from:brray->array"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"out"],[]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"brray:get"],[1,"q"],[1,"index"]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:iter"],[2,0],[[0,"-"],[[0,"brray:length"],[1,"q"]],[2,1]]],[1,"out"]]]],[[0,"let"],[1,"array:shallow-copy"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"b"]]],[]]]],[[0,"let"],[1,"array:deep-copy"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[[0,"if"],[[0,"array?"],[1,"b"]],[[0,"array:deep-copy"],[1,"b"]],[1,"b"]]]],[]]]],[[0,"let"],[1,"array:merge!"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"array:for"],[1,"b"],[[0,"lambda"],[1,"x"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"x"]]]],[1,"a"]]]],[[0,"let"],[1,"array:merge"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"out"],[]],[[0,"array:for"],[1,"b"],[[0,"lambda"],[1,"x"],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[1,"x"]]]],[1,"out"]]]],[[0,"let"],[1,"array:swap-remove!"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"do"],[[0,"set!"],[1,"arr"],[1,"i"],[[0,"get"],[1,"arr"],[[0,"-"],[[0,"length"],[1,"arr"]],[2,1]]]],[[0,"set!"],[1,"arr"],[2,-1]]]]],[[0,"let"],[1,"array:swap!"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"j"],[[0,"do"],[[0,"let"],[1,"temp"],[[0,"get"],[1,"arr"],[1,"i"]]],[[0,"set!"],[1,"arr"],[1,"i"],[[0,"get"],[1,"arr"],[1,"j"]]],[[0,"set!"],[1,"arr"],[1,"j"],[1,"temp"]]]]],[[0,"let"],[1,"array:index-of"],[[0,"lambda"],[1,"arr"],[1,"item"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"="],[[0,"car"],[1,"arr"]],[1,"item"]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerate"],[[0,"lambda"],[1,"arr"],[[0,"array:zip"],[[0,"math:sequence"],[1,"arr"]],[1,"arr"]]]],[[0,"let"],[1,"array:enumerated-map"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-select"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-exclude"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"if"],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]],[[0,"set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-fold"],[[0,"lambda"],[1,"arr"],[1,"callback"],[1,"initial"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"callback"],[1,"out"],[[0,"car"],[1,"arr"]],[1,"i"]]],[1,"out"]]]],[[0,"rec:iterate"],[1,"arr"],[2,0],[1,"initial"]]]]],[[0,"let"],[1,"array:enumerated-find"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]],[[0,"car"],[1,"arr"]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-find-index"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-every?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]],[[0,"not"],[[0,"length"],[1,"arr"]]]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-some?"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]]],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]],[[0,"not"],[[0,"not"],[[0,"length"],[1,"arr"]]]]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:find-index"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:remove"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"x"],[[0,"do"],[[0,"if"],[[0,"="],[1,"x"],[1,"i"]],[1,"a"],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"x"]]]]],[]]]],[[0,"let"],[1,"array:pad-right"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"cons"],[1,"b"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[1,"length"]]],[[0,"cons"],[1,"a"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"b"]],[[0,"length"],[1,"a"]]],[1,"length"]]]]]],[[0,"let"],[1,"array:pad-left"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"cons"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[1,"length"]],[1,"b"]],[[0,"cons"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"b"]],[[0,"length"],[1,"a"]]],[1,"length"]],[1,"a"]]]]],[[0,"let"],[1,"array:pad-right!"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"array:merge!"],[1,"b"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[1,"length"]]],[[0,"array:merge!"],[1,"a"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"b"]],[[0,"length"],[1,"a"]]],[1,"length"]]]]]],[[0,"let"],[1,"array:pad-left!"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"array:merge!"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[1,"length"]],[1,"b"]],[[0,"array:merge!"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"b"]],[[0,"length"],[1,"a"]]],[1,"length"]],[1,"a"]]]]],[[0,"let"],[1,"array:rotate-right"],[[0,"lambda"],[1,"arr"],[1,"n"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"set!"],[1,"a"],[[0,"mod"],[[0,"+"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[1,"n"]],[[0,"length"],[1,"arr"]]],[[0,"car"],[1,"b"]]]],[[0,"array"],[[0,"length"],[1,"arr"]],[1,"length"]]]]],[[0,"let"],[1,"array:rotate-left"],[[0,"lambda"],[1,"arr"],[1,"n"],[[0,"array:fold"],[[0,"array:zip"],[1,"arr"],[[0,"math:sequence"],[1,"arr"]]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"set!"],[1,"a"],[[0,"mod"],[[0,"+"],[[0,"car"],[[0,"cdr"],[1,"b"]]],[[0,"-"],[[0,"length"],[1,"arr"]],[1,"n"]]],[[0,"length"],[1,"arr"]]],[[0,"car"],[1,"b"]]]],[[0,"array"],[[0,"length"],[1,"arr"]],[1,"length"]]]]],[[0,"let"],[1,"array:first"],[[0,"lambda"],[1,"arr"],[[0,"get"],[1,"arr"],[2,0]]]],[[0,"let"],[1,"array:last"],[[0,"lambda"],[1,"arr"],[[0,"get"],[1,"arr"],[2,-1]]]],[[0,"let"],[1,"string:character-occurances"],[[0,"lambda"],[1,"str"],[1,"letter"],[[0,"do"],[[0,"let"],[1,"arr"],[1,"str"]],[[0,"let"],[1,"bitmask"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"zero"],[1,"char:a"]],[[0,"let"],[1,"count"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"at-least-one?"],[[0,"var:def"],[2,0]]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"i"],[1,"bounds"],[[0,"do"],[[0,"let"],[1,"ch"],[[0,"get"],[1,"arr"],[1,"i"]]],[[0,"let"],[1,"code"],[[0,"-"],[1,"ch"],[1,"zero"]]],[[0,"let"],[1,"mask"],[[0,"<<"],[2,1],[1,"code"]]],[[0,"if"],[[0,"and"],[[0,"if"],[[0,"="],[1,"ch"],[1,"letter"]],[[0,"var:set!"],[1,"at-least-one?"],[2,1]]],[[0,"not"],[[0,"="],[[0,"&"],[[0,"var:get"],[1,"bitmask"]],[1,"mask"]],[2,0]]]],[[0,"var:set!"],[1,"count"],[[0,"+"],[[0,"var:get"],[1,"count"]],[2,1]]],[[0,"var:set!"],[1,"bitmask"],[[0,"|"],[[0,"var:get"],[1,"bitmask"]],[1,"mask"]]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"rec:iterate"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[[0,"+"],[[0,"var:get"],[1,"count"]],[[0,"var:get"],[1,"at-least-one?"]]]]]]],[[0,"rec:iterate"],[2,0],[[0,"-"],[[0,"length"],[1,"arr"]],[2,1]]]]]],[[0,"let"],[1,"string:slice-from"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"index"],[[0,"string:match"],[1,"a"],[1,"b"]]],[[0,"array:slice"],[1,"a"],[1,"index"],[[0,"+"],[1,"index"],[[0,"-"],[[0,"length"],[1,"a"]],[1,"index"]]]]]]],[[0,"let"],[1,"string:slice-after"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"index"],[[0,"string:match"],[1,"a"],[1,"b"]]],[[0,"array:slice"],[1,"a"],[[0,"+"],[1,"index"],[[0,"length"],[1,"b"]]],[[0,"+"],[1,"index"],[[0,"-"],[[0,"length"],[1,"a"]],[1,"index"]]]]]]],[[0,"let"],[1,"string:slice-to"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"array:reverse"],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"array:reverse"],[1,"B"]]],[[0,"let"],[1,"index"],[[0,"string:match"],[1,"a"],[1,"b"]]],[[0,"array:reverse"],[[0,"array:slice"],[1,"a"],[1,"index"],[[0,"+"],[1,"index"],[[0,"-"],[[0,"length"],[1,"a"]],[1,"index"]]]]]]]],[[0,"let"],[1,"string:slice-before"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"array:reverse"],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"array:reverse"],[1,"B"]]],[[0,"let"],[1,"index"],[[0,"string:match"],[1,"a"],[1,"b"]]],[[0,"array:reverse"],[[0,"array:slice"],[1,"a"],[[0,"+"],[1,"index"],[[0,"length"],[1,"b"]]],[[0,"+"],[1,"index"],[[0,"-"],[[0,"length"],[1,"a"]],[1,"index"]]]]]]]],[[0,"let"],[1,"string:split"],[[0,"lambda"],[1,"str"],[1,"delim"],[[0,"do"],[[0,"let"],[1,"locals"],[]],[[0,"set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[1,"delim"]],[[0,"set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[1,"str"]],[[0,"set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[[0,"length"],[1,"delim"]]],[[0,"set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[]],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"result"],[1,"i"],[1,"bounds"],[[0,"if"],[[0,"<"],[[0,"if"],[[0,"array:every?"],[[0,"array:zip"],[[0,"get"],[1,"locals"],[2,0]],[[0,"math:sequence"],[1,"locals"]]],[[0,"lambda"],[1,"item"],[[0,"do"],[[0,"let"],[1,"y"],[[0,"car"],[1,"item"]]],[[0,"let"],[1,"j"],[[0,"car"],[[0,"cdr"],[1,"item"]]]],[[0,"or"],[[0,"<="],[[0,"length"],[[0,"get"],[1,"locals"],[2,1]]],[[0,"+"],[1,"i"],[1,"j"]]],[[0,"="],[[0,"get"],[[0,"get"],[1,"locals"],[2,1]],[[0,"+"],[1,"i"],[1,"j"]]],[1,"y"]]]]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"result"],[[0,"length"],[1,"result"]],[[0,"get"],[1,"locals"],[2,3]]],[[0,"set!"],[1,"locals"],[2,3],[]],[[0,"+"],[1,"i"],[[0,"get"],[1,"locals"],[2,2]],[2,-1]]]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"locals"],[2,3],[[0,"cons"],[[0,"get"],[1,"locals"],[2,3]],[[0,"array"],[[0,"get"],[[0,"get"],[1,"locals"],[2,1]],[1,"i"]]]]],[1,"i"]]]]],[1,"bounds"]],[[0,"rec:iterate"],[1,"result"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[1,"result"]]]],[[0,"set!"],[[0,"let"],[1,"iteration-result"],[[0,"rec:iterate"],[],[2,0],[[0,"-"],[[0,"length"],[[0,"get"],[1,"locals"],[2,1]]],[2,1]]]],[[0,"length"],[1,"iteration-result"]],[[0,"get"],[1,"locals"],[2,3]]]]]],[[0,"let"],[1,"string:index-of-char"],[[0,"lambda"],[1,"str"],[1,"character"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"string:equal?"],[[0,"car"],[1,"arr"]],[1,"character"]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[[0,"array:shallow-copy"],[1,"str"],[1,"array"]],[2,0]]]]],[[0,"let"],[1,"string:match"],[[0,"lambda"],[1,"str"],[1,"word"],[[0,"cond"],[[0,"<"],[[0,"length"],[1,"str"]],[[0,"length"],[1,"word"]]],[2,-1],[[0,"string:equal?"],[1,"str"],[1,"word"]],[2,0],[[0,"*"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,">="],[[0,"length"],[1,"arr"]],[[0,"length"],[1,"word"]]]],[[0,"if"],[[0,"string:equal?"],[[0,"array:join"],[[0,"array"],[[0,"array:slice"],[1,"str"],[1,"i"],[[0,"+"],[1,"i"],[[0,"length"],[1,"word"]]]]],[[0,"array"],[1,"char:empty"]]],[1,"word"]],[1,"i"],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"rec:iterate"],[1,"str"],[2,0]]]]]]]],[[0,"let"],[1,"string:has?"],[[0,"lambda"],[1,"str"],[1,"word"],[[0,"cond"],[[0,"<"],[[0,"length"],[1,"str"]],[[0,"length"],[1,"word"]]],[2,0],[[0,"string:equal?"],[1,"str"],[1,"word"]],[2,1],[[0,"*"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"rec:iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,">="],[[0,"length"],[1,"arr"]],[[0,"length"],[1,"word"]]]],[[0,"if"],[[0,"string:equal?"],[[0,"array:join"],[[0,"array"],[[0,"array:slice"],[1,"str"],[1,"i"],[[0,"+"],[1,"i"],[[0,"length"],[1,"word"]]]]],[[0,"array"],[1,"char:empty"]]],[1,"word"]],[2,1],[[0,"rec:iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]]]]],[[0,"rec:iterate"],[1,"str"],[2,0]]]]]]]],[[0,"let"],[1,"string:greater?"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"if"],[[0,"not"],[[0,"string:equal?"],[1,"A"],[1,"B"]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"A"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"B"]],[[0,"length"],[1,"A"]]],[1,"length"]]],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"B"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[1,"length"]]],[1,"B"]]],[[0,"array:fold"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"acc"],[1,"pair"],[[0,"if"],[[0,">"],[[0,"car"],[1,"pair"]],[[0,"car"],[[0,"cdr"],[1,"pair"]]]],[2,0],[1,"acc"]]],[2,1]]]]]]]],[[0,"let"],[1,"string:greater-or-equal?"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"or"],[[0,"string:equal?"],[1,"A"],[1,"B"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"A"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"B"]],[[0,"length"],[1,"A"]]],[1,"length"]]],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"B"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[1,"length"]]],[1,"B"]]],[[0,"array:fold"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"acc"],[1,"pair"],[[0,"if"],[[0,">"],[[0,"car"],[1,"pair"]],[[0,"car"],[[0,"cdr"],[1,"pair"]]]],[2,0],[1,"acc"]]],[2,1]]]]]]]],[[0,"let"],[1,"string:lesser?"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"if"],[[0,"not"],[[0,"string:equal?"],[1,"A"],[1,"B"]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"A"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"B"]],[[0,"length"],[1,"A"]]],[1,"length"]]],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"B"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[1,"length"]]],[1,"B"]]],[[0,"array:fold"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"acc"],[1,"pair"],[[0,"if"],[[0,"<"],[[0,"car"],[1,"pair"]],[[0,"car"],[[0,"cdr"],[1,"pair"]]]],[2,0],[1,"acc"]]],[2,1]]]]]]]],[[0,"let"],[1,"string:lesser-or-equal?"],[[0,"lambda"],[1,"A"],[1,"B"],[[0,"or"],[[0,"string:equal?"],[1,"A"],[1,"B"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"a"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"A"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"B"]],[[0,"length"],[1,"A"]]],[1,"length"]]],[1,"A"]]],[[0,"let"],[1,"b"],[[0,"if"],[[0,">"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[[0,"array:merge!"],[1,"B"],[[0,"array"],[[0,"-"],[[0,"length"],[1,"A"]],[[0,"length"],[1,"B"]]],[1,"length"]]],[1,"B"]]],[[0,"array:fold"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"acc"],[1,"pair"],[[0,"if"],[[0,"<"],[[0,"car"],[1,"pair"]],[[0,"car"],[[0,"cdr"],[1,"pair"]]]],[2,0],[1,"acc"]]],[2,1]]]]]]]],[[0,"let"],[1,"string:equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"="],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"array:every?"],[[0,"array:zip"],[1,"a"],[1,"b"]],[[0,"lambda"],[1,"x"],[[0,"="],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]]]]]]]],[[0,"let"],[1,"string:min"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"string:lesser?"],[1,"a"],[1,"b"]],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"string:max"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"string:lesser?"],[1,"a"],[1,"b"]],[1,"b"],[1,"a"]]]],[[0,"let"],[1,"string:trim-left"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"tr"],[[0,"array"],[2,1]]],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"and"],[[0,"car"],[1,"tr"]],[[0,"="],[1,"b"],[1,"char:space"]]],[1,"a"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"if"],[[0,"car"],[1,"tr"]],[[0,"set!"],[1,"tr"],[2,0],[2,0]]],[[0,"cons"],[1,"a"],[[0,"array"],[1,"b"]]]]]]]],[]]]]],[[0,"let"],[1,"string:trim-right"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"tr"],[[0,"array"],[2,1]]],[[0,"array:fold"],[[0,"array:reverse"],[1,"str"]],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"and"],[[0,"car"],[1,"tr"]],[[0,"="],[1,"b"],[1,"char:space"]]],[1,"a"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"if"],[[0,"car"],[1,"tr"]],[[0,"set!"],[1,"tr"],[2,0],[2,0]]],[[0,"cons"],[[0,"array"],[1,"b"]],[1,"a"]]]]]]],[]]]]],[[0,"let"],[1,"string:trim"],[[0,"lambda"],[1,"str"],[[0,"string:trim-right"],[[0,"string:trim-left"],[1,"str"]]]]],[[0,"let"],[1,"string:lines"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:new-line"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:chars"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[1,"str"],[[0,"lambda"],[1,"x"],[[0,"array"],[1,"x"]]]]]],[[0,"let"],[1,"string:words"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:space"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:commas"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:comma"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:dots"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:dot"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:colons"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:colon"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:semi-colons"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:semi-colon"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:dashes"],[[0,"lambda"],[1,"str"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[[0,"array"],[1,"char:dash"]]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:separator"],[[0,"lambda"],[1,"str"],[1,"separator"],[[0,"array:map"],[[0,"array:fold"],[1,"str"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[[0,"array"],[1,"b"]],[1,"separator"]],[[0,"set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"lambda"],[1,"x"],[[0,"array:join"],[[0,"array"],[1,"x"]],[[0,"array"],[1,"char:empty"]]]]]]],[[0,"let"],[1,"string:append"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"cons"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"string:prepend"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"cons"],[1,"b"],[1,"a"]]]],[[0,"let"],[1,"string:pad-left"],[[0,"lambda"],[1,"str"],[1,"N"],[1,"ch"],[[0,"do"],[[0,"let"],[1,"n"],[[0,"-"],[1,"N"],[[0,"length"],[1,"str"]]]],[[0,"let"],[1,"rec:pad"],[[0,"lambda"],[1,"i"],[1,"str"],[[0,"if"],[[0,"<"],[1,"i"],[1,"n"]],[[0,"rec:pad"],[[0,"+"],[1,"i"],[2,1]],[[0,"cons"],[1,"ch"],[1,"str"]]],[1,"str"]]]],[[0,"rec:pad"],[2,0],[1,"str"]]]]],[[0,"let"],[1,"string:pad-right"],[[0,"lambda"],[1,"str"],[1,"N"],[1,"ch"],[[0,"do"],[[0,"let"],[1,"n"],[[0,"-"],[1,"N"],[[0,"length"],[1,"str"]]]],[[0,"let"],[1,"rec:pad"],[[0,"lambda"],[1,"i"],[1,"str"],[[0,"if"],[[0,"<"],[1,"i"],[1,"n"]],[[0,"rec:pad"],[[0,"+"],[1,"i"],[2,1]],[[0,"cons"],[1,"str"],[1,"ch"]]],[1,"str"]]]],[[0,"rec:pad"],[2,0],[1,"str"]]]]],[[0,"let"],[1,"string:upper"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"arr"],[]],[[0,"let"],[1,"n"],[[0,"length"],[1,"str"]]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"n"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"current-char"],[[0,"get"],[1,"str"],[1,"i"]]],[[0,"set!"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,">="],[1,"current-char"],[2,97]],[[0,"<="],[1,"current-char"],[2,122]]],[[0,"-"],[1,"current-char"],[2,32]],[1,"current-char"]]],[[0,"rec:iter"],[[0,"+"],[1,"i"],[2,1]]]]]],[1,"arr"]]]],[[0,"rec:iter"],[2,0]]]]],[[0,"let"],[1,"string:lower"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"arr"],[]],[[0,"let"],[1,"n"],[[0,"length"],[1,"str"]]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"n"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"current-char"],[[0,"get"],[1,"str"],[1,"i"]]],[[0,"set!"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,">="],[1,"current-char"],[2,65]],[[0,"<="],[1,"current-char"],[2,90]]],[[0,"+"],[1,"current-char"],[2,32]],[1,"current-char"]]],[[0,"rec:iter"],[[0,"+"],[1,"i"],[2,1]]]]]],[1,"arr"]]]],[[0,"rec:iter"],[2,0]]]]],[[0,"let"],[1,"char?"],[[0,"lambda"],[1,"cc"],[[0,"and"],[[0,"atom?"],[1,"cc"]],[[0,">="],[1,"cc"],[2,0]],[[0,"<"],[1,"cc"],[2,65535]]]]],[[0,"let"],[1,"new:set4"],[[0,"lambda"],[[0,"array"],[],[],[],[]]]],[[0,"let"],[1,"new:array"],[[0,"lambda"],[1,"items"],[[0,"array:shallow-copy"],[1,"items"]]]],[[0,"let"],[1,"new:list"],[[0,"lambda"],[1,"value"],[[0,"array"],[],[1,"value"],[]]]],[[0,"let"],[1,"new:set-n"],[[0,"lambda"],[1,"n"],[[0,"array:map"],[[0,"array"],[1,"n"],[1,"length"]],[[0,"lambda"],[1,"."],[]]]]],[[0,"let"],[1,"new:date"],[[0,"lambda"],[1,"year"],[1,"month"],[1,"day"],[[0,"array"],[1,"year"],[1,"month"],[1,"day"]]]],[[0,"let"],[1,"new:binary-tree"],[[0,"lambda"],[1,"value"],[[0,"do"],[[0,"let"],[1,"arr"],[]],[[0,"set!"],[1,"arr"],[2,0],[1,"value"]],[[0,"set!"],[1,"arr"],[2,1],[]],[[0,"set!"],[1,"arr"],[2,2],[]],[1,"arr"]]]],[[0,"let"],[1,"binary-tree:left"],[[0,"lambda"],[1,"node"],[[0,"get"],[1,"node"],[2,1]]]],[[0,"let"],[1,"binary-tree:right"],[[0,"lambda"],[1,"node"],[[0,"get"],[1,"node"],[2,2]]]],[[0,"let"],[1,"binary-tree:left!"],[[0,"lambda"],[1,"tree"],[1,"node"],[[0,"set!"],[1,"tree"],[2,1],[1,"node"]]]],[[0,"let"],[1,"binary-tree:right!"],[[0,"lambda"],[1,"tree"],[1,"node"],[[0,"set!"],[1,"tree"],[2,2],[1,"node"]]]],[[0,"let"],[1,"binary-tree:value"],[[0,"lambda"],[1,"node"],[[0,"car"],[1,"node"]]]],[[0,"let"],[1,"set:index"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"prime-num"],[2,31]],[[0,"let"],[1,"total"],[[0,"array"],[2,0]]],[[0,"let"],[1,"rec:find-hash-index"],[[0,"lambda"],[1,"i"],[1,"bounds"],[[0,"do"],[[0,"let"],[1,"letter"],[[0,"get"],[1,"key"],[1,"i"]]],[[0,"let"],[1,"value"],[[0,"-"],[1,"letter"],[2,96]]],[[0,"set!"],[1,"total"],[2,0],[[0,"math:euclidean-mod"],[[0,"+"],[[0,"*"],[[0,"car"],[1,"total"]],[1,"prime-num"]],[1,"value"]],[[0,"length"],[1,"table"]]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"rec:find-hash-index"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[[0,"car"],[1,"total"]]]]]],[[0,"rec:find-hash-index"],[2,0],[[0,"if"],[[0,"<"],[[0,"-"],[[0,"length"],[1,"key"]],[2,1]],[2,100]],[[0,"-"],[[0,"length"],[1,"key"]],[2,1]],[2,100]]]]]],[[0,"let"],[1,"set:add!"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"not"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]]],[[0,"set!"],[1,"table"],[1,"idx"],[[0,"array"]]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"len"],[[0,"length"],[1,"current"]]],[[0,"let"],[1,"index"],[[0,"if"],[1,"len"],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"x"],[1,"key"]]]],[2,-1]]],[[0,"let"],[1,"entry"],[1,"key"]],[[0,"if"],[[0,"="],[1,"index"],[2,-1]],[[0,"set!"],[1,"current"],[[0,"length"],[1,"current"]],[1,"entry"]],[[0,"set!"],[1,"current"],[1,"index"],[1,"entry"]]],[1,"table"]]]],[[0,"let"],[1,"set:remove!"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"not"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]]],[[0,"set!"],[1,"table"],[1,"idx"],[[0,"Array"]]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"len"],[[0,"length"],[1,"current"]]],[[0,"let"],[1,"index"],[[0,"if"],[1,"len"],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"x"],[1,"key"]]]],[2,-1]]],[[0,"let"],[1,"entry"],[1,"key"]],[[0,"if"],[[0,"not"],[[0,"="],[1,"index"],[2,-1]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"set!"],[1,"current"],[1,"index"],[[0,"get"],[1,"current"],[2,-1]]],[[0,"set!"],[1,"current"],[2,-1]]]]]],[1,"table"]]]],[[0,"let"],[1,"set:has?"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"and"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"and"],[[0,"length"],[1,"current"]],[[0,">="],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"x"],[1,"key"]]]],[2,0]]]]]]],[[0,"let"],[1,"set:intersection"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:fold"],[[0,"from:set->array"],[1,"b"]],[[0,"lambda"],[1,"out"],[1,"element"],[[0,"do"],[[0,"if"],[[0,"set:has?"],[1,"a"],[1,"element"]],[[0,"set:add!"],[1,"out"],[1,"element"]]],[1,"out"]]],[[0,"array"],[],[],[],[],[]]]]],[[0,"let"],[1,"set:difference"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array:fold"],[[0,"from:set->array"],[1,"a"]],[[0,"lambda"],[1,"out"],[1,"element"],[[0,"do"],[[0,"if"],[[0,"not"],[[0,"set:has?"],[1,"b"],[1,"element"]]],[[0,"set:add!"],[1,"out"],[1,"element"]]],[1,"out"]]],[[0,"array"],[],[],[],[],[]]]]],[[0,"let"],[1,"set:xor"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"out"],[[0,"array"],[],[],[],[],[]]],[[0,"array:for"],[[0,"from:set->array"],[1,"a"]],[[0,"lambda"],[1,"element"],[[0,"if"],[[0,"not"],[[0,"set:has?"],[1,"b"],[1,"element"]]],[[0,"set:add!"],[1,"out"],[1,"element"]]]]],[[0,"array:for"],[[0,"from:set->array"],[1,"b"]],[[0,"lambda"],[1,"element"],[[0,"if"],[[0,"not"],[[0,"set:has?"],[1,"a"],[1,"element"]]],[[0,"set:add!"],[1,"out"],[1,"element"]]]]],[1,"out"]]]],[[0,"let"],[1,"set:union"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"out"],[[0,"array"],[],[],[],[],[]]],[[0,"array:for"],[[0,"from:set->array"],[1,"a"]],[[0,"lambda"],[1,"element"],[[0,"set:add!"],[1,"out"],[1,"element"]]]],[[0,"array:for"],[[0,"from:set->array"],[1,"b"]],[[0,"lambda"],[1,"element"],[[0,"set:add!"],[1,"out"],[1,"element"]]]],[1,"out"]]]],[[0,"let"],[1,"set:empty!"],[[0,"lambda"],[1,"table"],[[0,"array:map"],[1,"table"],[1,"empty!"]]]],[[0,"let"],[1,"map:empty!"],[[0,"lambda"],[1,"table"],[[0,"array:map"],[1,"table"],[1,"empty!"]]]],[[0,"let"],[1,"map:set!"],[[0,"lambda"],[1,"table"],[1,"key"],[1,"value"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"not"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]]],[[0,"set!"],[1,"table"],[1,"idx"],[]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"len"],[[0,"length"],[1,"current"]]],[[0,"let"],[1,"index"],[[0,"if"],[1,"len"],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"car"],[1,"x"]],[1,"key"]]]],[2,-1]]],[[0,"let"],[1,"entry"],[[0,"array"],[1,"key"],[1,"value"]]],[[0,"if"],[[0,"="],[1,"index"],[2,-1]],[[0,"set!"],[1,"current"],[[0,"length"],[1,"current"]],[1,"entry"]],[[0,"set!"],[1,"current"],[1,"index"],[1,"entry"]]],[1,"table"]]]],[[0,"let"],[1,"map:remove!"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"not"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]]],[[0,"set!"],[1,"table"],[1,"idx"],[]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"len"],[[0,"length"],[1,"current"]]],[[0,"let"],[1,"index"],[[0,"if"],[1,"len"],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"car"],[1,"x"]],[1,"key"]]]],[2,-1]]],[[0,"if"],[[0,"not"],[[0,"="],[1,"index"],[2,-1]]],[[0,"and"],[[0,"set!"],[1,"current"],[1,"index"],[[0,"get"],[1,"current"],[2,-1]]],[[0,"set!"],[1,"current"],[2,-1]]]],[1,"table"]]]],[[0,"let"],[1,"map:get"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"if"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"found"],[[0,"array:find"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"key"],[[0,"get"],[1,"x"],[2,0]]]]]],[[0,"if"],[[0,"length"],[1,"found"]],[[0,"get"],[1,"found"],[2,1]]]]]]]]]],[[0,"let"],[1,"map:has?"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"do"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]],[[0,"let"],[1,"current"],[[0,"get"],[1,"table"],[1,"idx"]]],[[0,"and"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"and"],[[0,"length"],[1,"current"]],[[0,">="],[[0,"array:find-index"],[[0,"car"],[1,"current"]],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[1,"x"],[1,"key"]]]],[2,0]]]]]]],[[0,"let"],[1,"list:prev!"],[[0,"lambda"],[1,"list"],[1,"node"],[[0,"set!"],[1,"list"],[2,0],[[0,"set!"],[1,"node"],[2,2],[1,"list"]]]]],[[0,"let"],[1,"list:next!"],[[0,"lambda"],[1,"list"],[1,"node"],[[0,"set!"],[1,"list"],[2,2],[[0,"set!"],[1,"node"],[2,0],[1,"list"]]]]],[[0,"let"],[1,"list:prev"],[[0,"lambda"],[1,"list"],[[0,"get"],[1,"list"],[2,0]]]],[[0,"let"],[1,"list:next"],[[0,"lambda"],[1,"list"],[[0,"get"],[1,"list"],[2,2]]]],[[0,"let"],[1,"list:value"],[[0,"lambda"],[1,"node"],[[0,"get"],[1,"node"],[2,1]]]],[[0,"let"],[1,"var:def"],[[0,"lambda"],[1,"val"],[[0,"array"],[1,"val"]]]],[[0,"let"],[1,"var:get"],[[0,"lambda"],[1,"variable"],[[0,"car"],[1,"variable"]]]],[[0,"let"],[1,"var:set!"],[[0,"lambda"],[1,"variable"],[1,"value"],[[0,"set!"],[1,"variable"],[2,0],[1,"value"]]]],[[0,"let"],[1,"var:del!"],[[0,"lambda"],[1,"variable"],[[0,"set!"],[1,"variable"],[2,-1]]]],[[0,"let"],[1,"bool:def"],[[0,"lambda"],[1,"val"],[[0,"array"],[[0,"not"],[[0,"not"],[1,"val"]]]]]],[[0,"let"],[1,"bool:get"],[[0,"lambda"],[1,"variable"],[[0,"car"],[1,"variable"]]]],[[0,"let"],[1,"bool:set!"],[[0,"lambda"],[1,"variable"],[1,"value"],[[0,"set!"],[1,"variable"],[2,0],[[0,"not"],[[0,"not"],[1,"value"]]]]]],[[0,"let"],[1,"bool:toggle!"],[[0,"lambda"],[1,"variable"],[[0,"set!"],[1,"variable"],[2,0],[[0,"not"],[[0,"car"],[1,"variable"]]]]]],[[0,"let"],[1,"bool:true"],[[0,"lambda"],[[0,"array"],[2,1]]]],[[0,"let"],[1,"bool:false"],[[0,"lambda"],[[0,"array"],[2,0]]]],[[0,"let"],[1,"bool:true!"],[[0,"lambda"],[1,"variable"],[[0,"set!"],[1,"variable"],[2,0],[2,1]]]],[[0,"let"],[1,"bool:false!"],[[0,"lambda"],[1,"variable"],[[0,"set!"],[1,"variable"],[2,0],[2,0]]]],[[0,"let"],[1,"bool:true?"],[[0,"lambda"],[1,"variable"],[[0,"="],[[0,"get"],[1,"variable"],[2,0]],[2,1]]]],[[0,"let"],[1,"bool:false?"],[[0,"lambda"],[1,"variable"],[[0,"="],[[0,"get"],[1,"variable"],[2,0]],[2,0]]]],[[0,"let"],[1,"new:brray"],[[0,"lambda"],[[0,"array"],[[0,"array"],[]],[]]]],[[0,"let"],[1,"brray:offset-left"],[[0,"lambda"],[1,"q"],[[0,"*"],[[0,"-"],[[0,"length"],[[0,"get"],[1,"q"],[2,0]]],[2,1]],[2,-1]]]],[[0,"let"],[1,"brray:offset-right"],[[0,"lambda"],[1,"q"],[[0,"length"],[[0,"get"],[1,"q"],[2,1]]]]],[[0,"let"],[1,"brray:length"],[[0,"lambda"],[1,"q"],[[0,"+"],[[0,"length"],[[0,"get"],[1,"q"],[2,0]]],[[0,"length"],[[0,"get"],[1,"q"],[2,1]]],[2,-1]]]],[[0,"let"],[1,"brray:empty?"],[[0,"lambda"],[1,"q"],[[0,"not"],[[0,"brray:length"],[1,"q"]]]]],[[0,"let"],[1,"brray:empty!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"set!"],[1,"q"],[2,0],[[0,"array"],[]]],[[0,"set!"],[1,"q"],[2,1],[]],[1,"q"]]]],[[0,"let"],[1,"brray:get"],[[0,"lambda"],[1,"q"],[1,"offset"],[[0,"do"],[[0,"let"],[1,"offset-index"],[[0,"+"],[1,"offset"],[[0,"brray:offset-left"],[1,"q"]]]],[[0,"let"],[1,"index"],[[0,"if"],[[0,"<"],[1,"offset-index"],[2,0]],[[0,"*"],[1,"offset-index"],[2,-1]],[1,"offset-index"]]],[[0,"if"],[[0,">="],[1,"offset-index"],[2,0]],[[0,"get"],[[0,"get"],[1,"q"],[2,1]],[1,"index"]],[[0,"get"],[[0,"get"],[1,"q"],[2,0]],[1,"index"]]]]]],[[0,"let"],[1,"brray:set!"],[[0,"lambda"],[1,"q"],[1,"index"],[1,"value"],[[0,"do"],[[0,"let"],[1,"offset"],[[0,"+"],[1,"index"],[[0,"brray:offset-left"],[1,"q"]]]],[[0,"if"],[[0,">="],[1,"offset"],[2,0]],[[0,"set!"],[[0,"get"],[1,"q"],[2,1]],[1,"offset"],[1,"value"]],[[0,"set!"],[[0,"get"],[1,"q"],[2,0]],[[0,"*"],[1,"offset"],[2,-1]],[1,"value"]]],[1,"q"]]]],[[0,"let"],[1,"brray:add-to-left!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"set!"],[[0,"let"],[1,"c"],[[0,"get"],[1,"q"],[2,0]]],[[0,"length"],[1,"c"]],[1,"item"]]]],[[0,"let"],[1,"brray:add-to-right!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"set!"],[[0,"let"],[1,"c"],[[0,"get"],[1,"q"],[2,1]]],[[0,"length"],[1,"c"]],[1,"item"]]]],[[0,"let"],[1,"brray:remove-from-left!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"brray:length"],[1,"q"]]],[[0,"if"],[1,"len"],[[0,"cond"],[[0,"="],[1,"len"],[2,1]],[[0,"brray:empty!"],[1,"q"]],[[0,">"],[[0,"length"],[[0,"get"],[1,"q"],[2,0]]],[2,0]],[[0,"set!"],[[0,"get"],[1,"q"],[2,0]],[2,-1]]]]]]],[[0,"let"],[1,"brray:remove-from-right!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"brray:length"],[1,"q"]]],[[0,"if"],[1,"len"],[[0,"cond"],[[0,"="],[1,"len"],[2,1]],[[0,"brray:empty!"],[1,"q"]],[[0,">"],[[0,"length"],[[0,"get"],[1,"q"],[2,1]]],[2,0]],[[0,"set!"],[[0,"get"],[1,"q"],[2,1]],[2,-1]]]]]]],[[0,"let"],[1,"brray:iter"],[[0,"lambda"],[1,"q"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:iter"],[2,0],[[0,"brray:length"],[1,"q"]]]]]],[[0,"let"],[1,"brray:map"],[[0,"lambda"],[1,"q"],[1,"callback"],[[0,"do"],[[0,"let"],[1,"result"],[[0,"new:brray"]]],[[0,"let"],[1,"len"],[[0,"brray:length"],[1,"q"]]],[[0,"let"],[1,"half"],[[0,"math:floor"],[[0,"*"],[1,"len"],[2,0.5]]]],[[0,"let"],[1,"rec:left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"result"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]]],[[0,"if"],[[0,">"],[1,"index"],[2,0]],[[0,"rec:left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"rec:left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let"],[1,"rec:right"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"result"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:right"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:right"],[1,"half"],[[0,"-"],[1,"len"],[2,1]]],[1,"result"]]]],[[0,"let"],[1,"brray:balance?"],[[0,"lambda"],[1,"q"],[[0,"="],[[0,"+"],[[0,"brray:offset-right"],[1,"q"]],[[0,"brray:offset-left"],[1,"q"]]],[2,0]]]],[[0,"let"],[1,"brray:balance!"],[[0,"lambda"],[1,"q"],[[0,"if"],[[0,"brray:balance?"],[1,"q"]],[1,"q"],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"initial"],[[0,"from:brray->array"],[1,"q"]]],[[0,"brray:empty!"],[1,"q"]],[[0,"let"],[1,"half"],[[0,"math:floor"],[[0,"*"],[[0,"length"],[1,"initial"]],[2,0.5]]]],[[0,"let"],[1,"rec:left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[[0,"get"],[1,"initial"],[1,"index"]]],[[0,"if"],[[0,">"],[1,"index"],[2,0]],[[0,"rec:left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"rec:left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let"],[1,"rec:right"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[[0,"get"],[1,"initial"],[1,"index"]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:right"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:right"],[1,"half"],[[0,"-"],[[0,"length"],[1,"initial"]],[2,1]]],[1,"q"]]]]]]],[[0,"let"],[1,"brray:append!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[1,"item"]],[1,"q"]]]],[[0,"let"],[1,"brray:prepend!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[1,"item"]],[1,"q"]]]],[[0,"let"],[1,"brray:head!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"brray:offset-right"],[1,"q"]],[2,0]],[[0,"brray:balance!"],[1,"q"]]],[[0,"brray:remove-from-right!"],[1,"q"]],[1,"q"]]]],[[0,"let"],[1,"brray:tail!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"brray:offset-left"],[1,"q"]],[2,0]],[[0,"brray:balance!"],[1,"q"]]],[[0,"brray:remove-from-left!"],[1,"q"]],[1,"q"]]]],[[0,"let"],[1,"brray:first"],[[0,"lambda"],[1,"q"],[[0,"brray:get"],[1,"q"],[2,0]]]],[[0,"let"],[1,"brray:last"],[[0,"lambda"],[1,"q"],[[0,"brray:get"],[1,"q"],[[0,"-"],[[0,"brray:length"],[1,"q"]],[2,1]]]]],[[0,"let"],[1,"brray:pop-right!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"last"],[[0,"brray:last"],[1,"q"]]],[[0,"brray:head!"],[1,"q"]],[1,"last"]]]],[[0,"let"],[1,"brray:pop-left!"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"first"],[[0,"brray:first"],[1,"q"]]],[[0,"brray:tail!"],[1,"q"]],[1,"first"]]]],[[0,"let"],[1,"brray:rotate-left!"],[[0,"lambda"],[1,"q"],[1,"n"],[[0,"do"],[[0,"let"],[1,"N"],[[0,"mod"],[1,"n"],[[0,"brray:length"],[1,"q"]]]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"brray:offset-left"],[1,"q"]],[2,0]],[[0,"brray:balance!"],[1,"q"]]],[[0,"brray:add-to-right!"],[1,"q"],[[0,"brray:first"],[1,"q"]]],[[0,"brray:remove-from-left!"],[1,"q"]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:iter"],[2,0],[1,"N"]],[1,"q"]]]],[[0,"let"],[1,"brray:rotate-right!"],[[0,"lambda"],[1,"q"],[1,"n"],[[0,"do"],[[0,"let"],[1,"N"],[[0,"mod"],[1,"n"],[[0,"brray:length"],[1,"q"]]]],[[0,"let"],[1,"rec:iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"if"],[[0,"="],[[0,"brray:offset-right"],[1,"q"]],[2,0]],[[0,"brray:balance!"],[1,"q"]]],[[0,"brray:add-to-left!"],[1,"q"],[[0,"brray:last"],[1,"q"]]],[[0,"brray:remove-from-right!"],[1,"q"]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:iter"],[2,0],[1,"N"]],[1,"q"]]]],[[0,"let"],[1,"brray:slice"],[[0,"lambda"],[1,"entity"],[1,"s"],[1,"e"],[[0,"do"],[[0,"let"],[1,"len"],[[0,"brray:length"],[1,"entity"]]],[[0,"let"],[1,"start"],[[0,"if"],[[0,"<"],[1,"s"],[2,0]],[[0,"math:max"],[[0,"+"],[1,"len"],[1,"s"]],[2,0]],[[0,"math:min"],[1,"s"],[1,"len"]]]],[[0,"let"],[1,"end"],[[0,"if"],[[0,"<"],[1,"e"],[2,0]],[[0,"math:max"],[[0,"+"],[1,"len"],[1,"e"]],[2,0]],[[0,"math:min"],[1,"e"],[1,"len"]]]],[[0,"let"],[1,"slice"],[[0,"new:brray"]]],[[0,"let"],[1,"slice-len"],[[0,"math:max"],[[0,"-"],[1,"end"],[1,"start"]],[2,0]]],[[0,"let"],[1,"half"],[[0,"math:floor"],[[0,"*"],[1,"slice-len"],[2,0.5]]]],[[0,"let"],[1,"rec:left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"slice"],[[0,"brray:get"],[1,"entity"],[[0,"+"],[1,"start"],[1,"index"]]]],[[0,"if"],[[0,">"],[1,"index"],[2,0]],[[0,"rec:left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"rec:left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let"],[1,"rec:right"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"slice"],[[0,"brray:get"],[1,"entity"],[[0,"+"],[1,"start"],[1,"index"]]]],[[0,"if"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rec:right"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rec:right"],[1,"half"],[[0,"-"],[1,"slice-len"],[2,1]]],[1,"slice"]]]],[[0,"let"],[1,"tuple:apply"],[[0,"lambda"],[1,"x"],[1,"cb"],[[0,"cb"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:add"],[[0,"lambda"],[1,"x"],[[0,"+"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:subtract"],[[0,"lambda"],[1,"x"],[[0,"-"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:multiply"],[[0,"lambda"],[1,"x"],[[0,"*"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:divide"],[[0,"lambda"],[1,"x"],[[0,"/"],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]],[[0,"let"],[1,"tuple:swap"],[[0,"lambda"],[1,"x"],[[0,"array"],[[0,"car"],[[0,"cdr"],[1,"x"]],[[0,"car"],[1,"x"]]]]]],[[0,"let"],[1,"time:add-seconds"],[[0,"lambda"],[1,"date-time"],[1,"seconds"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"seconds"],[2,1000]]]]],[[0,"let"],[1,"time:add-minutes"],[[0,"lambda"],[1,"date-time"],[1,"minutes"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"minutes"],[2,1000],[2,60]]]]],[[0,"let"],[1,"time:add-hours"],[[0,"lambda"],[1,"date-time"],[1,"hours"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"hours"],[2,1000],[2,60],[2,60]]]]],[[0,"let"],[1,"time:add-days"],[[0,"lambda"],[1,"date-time"],[1,"days"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"days"],[2,1000],[2,60],[2,60],[2,24]]]]],[[0,"let"],[1,"time:add-months"],[[0,"lambda"],[1,"date-time"],[1,"months"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"months"],[2,1000],[2,60],[2,60],[2,24],[2,30]]]]],[[0,"let"],[1,"time:add-years"],[[0,"lambda"],[1,"date-time"],[1,"years"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"years"],[2,1000],[2,60],[2,60],[2,24],[2,365]]]]],[[0,"let"],[1,"time:sub-seconds"],[[0,"lambda"],[1,"date-time"],[1,"seconds"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"seconds"],[2,1000]]]]],[[0,"let"],[1,"time:sub-minutes"],[[0,"lambda"],[1,"date-time"],[1,"minutes"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"minutes"],[2,1000],[2,60]]]]],[[0,"let"],[1,"time:sub-hours"],[[0,"lambda"],[1,"date-time"],[1,"hours"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"hours"],[2,1000],[2,60],[2,60]]]]],[[0,"let"],[1,"time:sub-days"],[[0,"lambda"],[1,"date-time"],[1,"days"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"days"],[2,1000],[2,60],[2,60],[2,24]]]]],[[0,"let"],[1,"time:sub-months"],[[0,"lambda"],[1,"date-time"],[1,"months"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"months"],[2,1000],[2,60],[2,60],[2,24],[2,30]]]]],[[0,"let"],[1,"time:sub-years"],[[0,"lambda"],[1,"date-time"],[1,"years"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"years"],[2,1000],[2,60],[2,60],[2,24],[2,365]]]]],[[0,"let"],[1,"date:year"],[[0,"lambda"],[1,"date"],[[0,"car"],[1,"date"]]]],[[0,"let"],[1,"date:month"],[[0,"lambda"],[1,"date"],[[0,"car"],[[0,"cdr"],[1,"date"]]]]],[[0,"let"],[1,"date:day"],[[0,"lambda"],[1,"date"],[[0,"car"],[[0,"cdr"],[[0,"cdr"],[1,"date"]]]]]],[[0,"let"],[1,"date:month-day"],[[0,"lambda"],[1,"date"],[[0,"cdr"],[1,"date"]]]],[[0,"let"],[1,"date:year-month"],[[0,"lambda"],[1,"date"],[[0,"array"],[[0,"car"],[1,"date"]],[[0,"car"],[[0,"cdr"],[1,"date"]]]]]],[[0,"let"],[1,"array:set!"],[1,"set!"]],[[0,"let"],[1,"array:get"],[1,"get"]],[[0,"let"],[1,"arrray:length"],[1,"length"]],[[0,"let"],[1,"array:head"],[1,"car"]],[[0,"let"],[1,"array:tail"],[1,"cdr"]],[[0,"let"],[1,"array:concat"],[1,"cons"]],[[0,"let"],[1,"identity"],[[0,"lambda"],[1,"x"],[1,"x"]]],[[0,"let"],[1,"truthy?"],[[0,"lambda"],[1,"x"],[[0,"cond"],[[0,"atom?"],[1,"x"]],[[0,"not"],[[0,"="],[1,"x"],[2,0]]],[[0,"array?"],[1,"x"]],[[0,">"],[[0,"length"],[1,"x"]],[2,0]],[[0,"*"]],[2,1]]]],[[0,"let"],[1,"falsy?"],[[0,"lambda"],[1,"x"],[[0,"cond"],[[0,"atom?"],[1,"x"]],[[0,"="],[1,"x"],[2,0]],[[0,"array?"],[1,"x"]],[[0,"="],[[0,"length"],[1,"x"]],[2,0]]]]],[[0,"let"],[1,"array?"],[[0,"lambda"],[1,"x"],[[0,"not"],[[0,"atom?"],[1,"x"]]]]],[[0,"let"],[1,"ast:type"],[2,0]],[[0,"let"],[1,"ast:value"],[2,1]],[[0,"let"],[1,"ast:apply"],[2,0]],[[0,"let"],[1,"ast:word"],[2,1]],[[0,"let"],[1,"ast:atom"],[2,2]],[[0,"let"],[1,"match:negative?"],[[0,"lambda"],[1,"string"],[[0,"="],[[0,"car"],[1,"string"]],[1,"char:dash"]]]],[[0,"let"],[1,"match:number?"],[[0,"lambda"],[1,"string"],[[0,"do"],[[0,"let"],[1,"is-negative"],[[0,"match:negative?"],[1,"string"]]],[[0,"let"],[1,"digits"],[[0,"if"],[1,"is-negative"],[[0,"cdr"],[1,"string"]],[1,"string"]]],[[0,"array:every?"],[1,"digits"],[[0,"lambda"],[1,"digit"],[[0,"or"],[[0,"and"],[[0,">="],[1,"digit"],[1,"char:0"]],[[0,"<="],[1,"digit"],[1,"char:9"]]],[[0,"="],[1,"digit"],[1,"char:dot"]]]]]]]],[[0,"let"],[1,"ast:leaf"],[[0,"lambda"],[1,"type"],[1,"value"],[[0,"array"],[1,"type"],[1,"value"]]]],[[0,"let"],[1,"ast:leaf?"],[[0,"lambda"],[1,"arg"],[[0,"do"],[[0,"let"],[1,"c"],[[0,"car"],[1,"arg"]]],[[0,"and"],[[0,"atom?"],[1,"c"]],[[0,"or"],[[0,"="],[1,"c"],[1,"ast:apply"]],[[0,"="],[1,"c"],[1,"ast:atom"]],[[0,"="],[1,"c"],[1,"ast:word"]]]]]]],[[0,"let"],[1,"from:chars->ast"],[[0,"lambda"],[1,"source"],[[0,"do"],[[0,"let"],[1,"tree"],[]],[[0,"let"],[1,"stack"],[[0,"array"],[1,"tree"]]],[[0,"let"],[1,"head"],[[0,"var:def"],[1,"tree"]]],[[0,"let"],[1,"acc"],[]],[[0,"array:for-range"],[2,0],[[0,"length"],[1,"source"]],[[0,"lambda"],[1,"i"],[[0,"do"],[[0,"let"],[1,"cursor"],[[0,"get"],[1,"source"],[1,"i"]]],[[0,"if"],[[0,"="],[1,"cursor"],[1,"char:left-brace"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"temp"],[]],[[0,"let"],[1,"h"],[[0,"var:get"],[1,"head"]]],[[0,"array:push!"],[1,"h"],[1,"temp"]],[[0,"array:push!"],[1,"stack"],[1,"h"]],[[0,"var:set!"],[1,"head"],[1,"temp"]]]]],[[0,"if"],[[0,"or"],[[0,"="],[1,"cursor"],[1,"char:right-brace"]],[[0,"="],[1,"cursor"],[1,"char:space"]]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"token"],[[0,"array:shallow-copy"],[1,"acc"]]],[[0,"array:empty!"],[1,"acc"]],[[0,"if"],[[0,"length"],[1,"token"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"h"],[[0,"var:get"],[1,"head"]]],[[0,"if"],[[0,"array:empty?"],[1,"h"]],[[0,"array:push!"],[1,"h"],[[0,"ast:leaf"],[1,"ast:apply"],[1,"token"]]],[[0,"if"],[[0,"match:number?"],[1,"token"]],[[0,"array:push!"],[1,"h"],[[0,"ast:leaf"],[1,"ast:atom"],[[0,"from:digits->number"],[[0,"from:chars->digits"],[1,"token"]]]]],[[0,"array:push!"],[1,"h"],[[0,"ast:leaf"],[1,"ast:word"],[1,"token"]]]]]]]]],[[0,"if"],[[0,"="],[1,"cursor"],[1,"char:right-brace"]],[[0,"var:set!"],[1,"head"],[[0,"array:pop!"],[1,"stack"]]]]]]],[[0,"array:push!"],[1,"acc"],[1,"cursor"]]]]]]],[1,"tree"]]]],[[0,"let"],[1,"evaluate"],[[0,"lambda"],[1,"exp"],[1,"env"],[[0,"do"],[[0,"let"],[1,"expression"],[[0,"if"],[[0,"and"],[[0,"array?"],[1,"exp"]],[[0,"ast:leaf?"],[1,"exp"]]],[[0,"array"],[1,"exp"]],[1,"exp"]]],[[0,"if"],[[0,"length"],[1,"expression"]],[[0,"apply"],[[0,"lambda"],[[0,"do"],[[0,"let"],[1,"first"],[[0,"car"],[1,"expression"]]],[[0,"let"],[1,"rest"],[[0,"cdr"],[1,"expression"]]],[[0,"let"],[1,"pattern"],[[0,"get"],[1,"first"],[1,"ast:type"]]],[[0,"cond"],[[0,"="],[1,"pattern"],[1,"ast:word"]],[[0,"map:get"],[1,"env"],[[0,"get"],[1,"first"],[1,"ast:value"]]],[[0,"="],[1,"pattern"],[1,"ast:apply"]],[[0,"apply"],[[0,"map:get"],[1,"env"],[[0,"get"],[1,"first"],[1,"ast:value"]]],[1,"rest"],[1,"env"]],[[0,"="],[1,"pattern"],[1,"ast:atom"]],[[0,"get"],[1,"first"],[1,"ast:value"]],[[0,"*"]],[]]]]],[]]]]]]
|
package/package.json
CHANGED
package/src/compiler.js
CHANGED
@@ -310,10 +310,10 @@ const compile = (tree, Drill) => {
|
|
310
310
|
// return compile(inp, Drill)
|
311
311
|
// }
|
312
312
|
case KEYWORDS.NOT_COMPILED_BLOCK:
|
313
|
-
case KEYWORDS.TEST_CASE:
|
314
|
-
case KEYWORDS.TEST_BED:
|
315
|
-
case KEYWORDS.DOC:
|
316
|
-
|
313
|
+
// case KEYWORDS.TEST_CASE:
|
314
|
+
// case KEYWORDS.TEST_BED:
|
315
|
+
// case KEYWORDS.DOC:
|
316
|
+
// return ''
|
317
317
|
default: {
|
318
318
|
const camelCased = lispToJavaScriptVariableName(token)
|
319
319
|
if (camelCased in Helpers) Drill.Helpers.add(camelCased)
|
package/src/interpreter.js
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
import std from '../lib/baked/std.js'
|
2
2
|
import { TYPE, VALUE, WORD, KEYWORDS, APPLY, ATOM } from './keywords.js'
|
3
3
|
import { evaluate } from './evaluator.js'
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
isEqual,
|
7
|
-
isEqualTypes,
|
8
|
-
isForbiddenVariableName,
|
9
|
-
stringifyArgs
|
10
|
-
} from './utils.js'
|
4
|
+
import { isLeaf } from './parser.js'
|
5
|
+
import { isForbiddenVariableName, stringifyArgs } from './utils.js'
|
11
6
|
const keywords = {
|
12
7
|
[KEYWORDS.REMAINDER_OF_DIVISION]: (args, env) => {
|
13
8
|
if (args.length < 2)
|
@@ -530,19 +525,22 @@ const keywords = {
|
|
530
525
|
}) (= 2 required) (${KEYWORDS.DEFINE_VARIABLE} ${stringifyArgs(args)})`
|
531
526
|
)
|
532
527
|
const word = args[0]
|
533
|
-
|
528
|
+
const type = word[TYPE]
|
529
|
+
const name = word[VALUE]
|
530
|
+
if (type !== WORD)
|
534
531
|
throw new SyntaxError(
|
535
|
-
`First argument of (${
|
536
|
-
|
537
|
-
}
|
532
|
+
`First argument of (${
|
533
|
+
KEYWORDS.DEFINE_VARIABLE
|
534
|
+
}) must be word but got ${type} (${
|
535
|
+
KEYWORDS.DEFINE_VARIABLE
|
536
|
+
} ${stringifyArgs(args)})`
|
538
537
|
)
|
539
|
-
else if (isForbiddenVariableName(
|
538
|
+
else if (isForbiddenVariableName(name))
|
540
539
|
throw new ReferenceError(
|
541
|
-
`Variable name ${
|
540
|
+
`Variable name ${name} is forbidden at (${
|
542
541
|
KEYWORDS.DEFINE_VARIABLE
|
543
542
|
} ${stringifyArgs(args)})`
|
544
543
|
)
|
545
|
-
const name = word[VALUE]
|
546
544
|
Object.defineProperty(env, name, {
|
547
545
|
value: evaluate(args[1], env),
|
548
546
|
writable: false
|
@@ -715,52 +713,6 @@ const keywords = {
|
|
715
713
|
)
|
716
714
|
return other.reduce((a, b) => a.concat(b), array)
|
717
715
|
},
|
718
|
-
[KEYWORDS.TEST_CASE]: (args, env) => {
|
719
|
-
if (args.length !== 2)
|
720
|
-
throw new RangeError(
|
721
|
-
`Invalid number of arguments to (${
|
722
|
-
KEYWORDS.TEST_CASE
|
723
|
-
}) (= 2 required) (${KEYWORDS.TEST_CASE} ${stringifyArgs(args)})`
|
724
|
-
)
|
725
|
-
const a = evaluate(args[0], env)
|
726
|
-
const b = evaluate(args[1], env)
|
727
|
-
return !isEqualTypes(a, b) || !isEqual(a, b)
|
728
|
-
? [0, stringifyArgs([args[0]]), b, a]
|
729
|
-
: [1, stringifyArgs([args[0]]), a]
|
730
|
-
},
|
731
|
-
[KEYWORDS.TEST_BED]: (args, env) => {
|
732
|
-
let tests = []
|
733
|
-
let res
|
734
|
-
try {
|
735
|
-
if (
|
736
|
-
args.some(
|
737
|
-
([[type, car]]) => !(type === APPLY && car === KEYWORDS.TEST_CASE)
|
738
|
-
)
|
739
|
-
)
|
740
|
-
throw new TypeError(
|
741
|
-
`Arguments of (${KEYWORDS.TEST_BED}) must be (${
|
742
|
-
KEYWORDS.TEST_CASE
|
743
|
-
}) (${KEYWORDS.TEST_BED} ${stringifyArgs(args)})`
|
744
|
-
)
|
745
|
-
tests = args.map((x) => evaluate(x, env))
|
746
|
-
res = tests.reduce(
|
747
|
-
(acc, [state, ...rest]) =>
|
748
|
-
`${acc}${
|
749
|
-
!state
|
750
|
-
? `x ${rest[0]}\n + ${LISP.stringify(
|
751
|
-
rest[1]
|
752
|
-
)}\n - ${LISP.stringify(rest[2])}\n`
|
753
|
-
: `✓ ${rest[0]}\n + ${LISP.stringify(rest[1])}\n`
|
754
|
-
}`,
|
755
|
-
''
|
756
|
-
)
|
757
|
-
} catch (err) {
|
758
|
-
res = `${err.toString()}`
|
759
|
-
}
|
760
|
-
const result = !tests.length || tests.some(([t]) => !t)
|
761
|
-
res = `${result ? 'Some tests failed!\n\n' : 'All tests passed!\n\n'}${res}`
|
762
|
-
return [+!result, res]
|
763
|
-
},
|
764
716
|
[KEYWORDS.SET_ARRAY]: (args, env) => {
|
765
717
|
if (args.length !== 2 && args.length !== 3)
|
766
718
|
throw new RangeError(
|
@@ -890,39 +842,6 @@ const keywords = {
|
|
890
842
|
}
|
891
843
|
}
|
892
844
|
keywords[KEYWORDS.NOT_COMPILED_BLOCK] = keywords[KEYWORDS.BLOCK]
|
893
|
-
keywords[KEYWORDS.DOC] = (args, env) => {
|
894
|
-
if (args.length !== 1)
|
895
|
-
throw new RangeError(
|
896
|
-
`Invalid number of arguments to (${KEYWORDS.DOC}) (= 1 required) (${
|
897
|
-
KEYWORDS.DOC
|
898
|
-
} ${stringifyArgs(args)})`
|
899
|
-
)
|
900
|
-
const lib = evaluate(args[0], env)
|
901
|
-
.map((x) => String.fromCharCode(x))
|
902
|
-
.join('')
|
903
|
-
const kw = Object.keys(env).map((x) => [x])
|
904
|
-
const standard = std.map(([_, [_0, name], [_1, ...arg]]) => {
|
905
|
-
const args = arg
|
906
|
-
.slice(0, -1)
|
907
|
-
.map((x) => x[VALUE])
|
908
|
-
.filter((x) => x !== 'lambda')
|
909
|
-
|
910
|
-
return [name, ...args]
|
911
|
-
})
|
912
|
-
const all = [...kw, ...standard]
|
913
|
-
switch (lib) {
|
914
|
-
case '*':
|
915
|
-
return all.map((x) => `(${x.join(' ')})`)
|
916
|
-
case 'keywords':
|
917
|
-
return kw.map((x) => `(${x.join(' ')})`)
|
918
|
-
case 'std':
|
919
|
-
return standard.map((x) => `(${x.join(' ')})`)
|
920
|
-
default:
|
921
|
-
return all
|
922
|
-
.filter((name) => name[0].includes(lib))
|
923
|
-
.map((x) => `(${x.join(' ')})`)
|
924
|
-
}
|
925
|
-
}
|
926
845
|
|
927
846
|
export const deSuggar = (ast) => {
|
928
847
|
if (ast.length === 0)
|
package/src/keywords.js
CHANGED
@@ -46,11 +46,8 @@ export const KEYWORDS = {
|
|
46
46
|
SET_ARRAY: 'set!',
|
47
47
|
|
48
48
|
NOT_COMPILED_BLOCK: 'void',
|
49
|
-
TEST_CASE: 'case',
|
50
|
-
TEST_BED: 'assert',
|
51
49
|
LOG: 'log!',
|
52
50
|
LOG_STRING: 'log-string!',
|
53
51
|
LOG_CHAR: 'log-char!',
|
54
|
-
CLEAR_CONSOLE: 'clear!'
|
55
|
-
DOC: 'fez-manual'
|
52
|
+
CLEAR_CONSOLE: 'clear!'
|
56
53
|
}
|