fez-lisp 1.0.41 → 1.0.43

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -31,7 +31,7 @@
31
31
  (let solve (lambda arr cb
32
32
  (array:fold arr (lambda a b (do
33
33
  (let res (array:binary-search arr (cb b)))
34
- (if res (array:merge a (array res)) a)))
34
+ (if res (cons a (array res)) a)))
35
35
  ())))
36
36
  ; 514579
37
37
  (|> *input*
package/lib/baked/std.js CHANGED
@@ -1 +1 @@
1
- export default [[[0,"let"],[1,"math:E"],[2,2.718281828459045]],[[0,"let"],[1,"math:PI"],[2,3.141592653589793]],[[0,"let"],[1,"math:range"],[[0,"lambda"],[1,"start"],[1,"end"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<="],[1,"count"],[1,"end"]],[[0,"iterate"],[[0,"array:merge!"],[1,"out"],[[0,"array"],[1,"count"]]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"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,"iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"out"]],[1,"end"]],[[0,"iterate"],[[0,"array:merge!"],[1,"out"],[[0,"array"],[1,"count"]]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"iterate"],[],[2,0]]]]],[[0,"let"],[1,"math:sequence-n"],[[0,"lambda"],[1,"n"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"out"]],[1,"n"]],[[0,"iterate"],[[0,"array:merge!"],[1,"out"],[[0,"array"],[1,"count"]]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"iterate"],[],[2,0]]]]],[[0,"let"],[1,"math:permutations"],[[0,"lambda"],[1,"xs"],[[0,"unless"],[[0,"length"],[1,"xs"]],[[0,"array"],[]],[[0,"|>"],[1,"xs"],[[0,"array:enumerated-map"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"|>"],[1,"xs"],[[0,"array:enumerated-exclude"],[[0,"lambda"],[1,"."],[1,"j"],[[0,"="],[1,"i"],[1,"j"]]]],[[0,"math:permutations"]],[[0,"array:map"],[[0,"lambda"],[1,"vs"],[[0,"array:merge"],[[0,"array"],[1,"x"]],[1,"vs"]]]]]]],[[0,"array:flat-one"]]]]]],[[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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"i"],[[0,"+"],[1,"i"],[2,1]]]],[[0,"let"],[1,"math:floor"],[[0,"safety"],[1,"lambda"],[1,"n"],[[0,"|"],[1,"n"],[2,0]]]],[[0,"let"],[1,"math:round"],[[0,"safety"],[1,"lambda"],[1,"n"],[[0,"|"],[[0,"+"],[1,"n"],[2,0.5]],[2,0]]]],[[0,"let"],[1,"math:set-bit"],[[0,"safety"],[1,"lambda"],[1,"n"],[1,"bit"],[[0,"|"],[1,"n"],[[0,"<<"],[2,1],[1,"bit"]]]]],[[0,"let"],[1,"math:clear-bit"],[[0,"safety"],[1,"lambda"],[1,"n"],[1,"bit"],[[0,"&"],[1,"n"],[[0,"~"],[[0,"<<"],[2,1],[1,"bit"]]]]]],[[0,"let"],[1,"math:odd-bit?"],[[0,"safety"],[1,"lambda"],[1,"n"],[[0,"="],[[0,"&"],[1,"n"],[2,1]],[2,1]]]],[[0,"let"],[1,"math:average-bit"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"b"],[[0,">>"],[[0,"+"],[1,"a"],[1,"b"]],[2,1]]]],[[0,"let"],[1,"math:toggle-bit"],[[0,"safety"],[1,"lambda"],[1,"n"],[1,"a"],[1,"b"],[[0,"^"],[1,"a"],[1,"b"],[1,"n"]]]],[[0,"let"],[1,"math:same-sign-bit?"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"b"],[[0,">="],[[0,"^"],[1,"a"],[1,"b"]],[2,0]]]],[[0,"let"],[1,"math:max-bit"],[[0,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"numerator"],[1,"divisor"],[[0,"&"],[1,"numerator"],[[0,"-"],[1,"divisor"],[2,1]]]]],[[0,"let"],[1,"math:n-one-bit?"],[[0,"safety"],[1,"lambda"],[1,"N"],[1,"nth"],[[0,"type"],[[0,"&"],[1,"N"],[[0,"<<"],[2,1],[1,"nth"]]],[1,"boolean"]]]],[[0,"let"],[1,"math:square"],[[0,"safety"],[1,"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,"throw"],[[0,"string:merge"],[2,"Attempting to divide by 0 in (math:power "],[[0,"type"],[1,"base"],[1,"string"]],[2," "],[[0,"type"],[1,"exp"],[1,"string"]],[2,")"]]],[[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,"gcd"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"="],[1,"b"],[2,0]],[1,"a"],[[0,"gcd"],[1,"b"],[[0,"mod"],[1,"a"],[1,"b"]]]]]],[[0,"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,"math:sqrt-iter"],[[0,"lambda"],[1,"g"],[1,"x"],[[0,"if"],[[0,"is-good-enough"],[1,"g"],[1,"x"]],[1,"g"],[[0,"math:sqrt-iter"],[[0,"improve-guess"],[1,"g"],[1,"x"]],[1,"x"]]]]],[[0,"math:sqrt-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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"n"],[[0,"*"],[1,"n"],[[0,"+"],[1,"n"],[2,1]],[2,0.5]]]],[[0,"let"],[1,"math:gauss-sum-sequance"],[[0,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"x"],[1,"limit"],[[0,"if"],[[0,">"],[1,"x"],[1,"limit"]],[1,"limit"],[1,"x"]]]],[[0,"let"],[1,"math:odd?"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"="],[[0,"mod"],[1,"x"],[2,2]],[2,1]]]],[[0,"let"],[1,"math:even?"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"="],[[0,"mod"],[1,"x"],[2,2]],[2,0]]]],[[0,"let"],[1,"math:enumerated-odd?"],[[0,"safety"],[1,"lambda"],[1,"."],[1,"i"],[[0,"="],[[0,"mod"],[1,"i"],[2,2]],[2,1]]]],[[0,"let"],[1,"math:enumerated-even?"],[[0,"safety"],[1,"lambda"],[1,"."],[1,"i"],[[0,"="],[[0,"mod"],[1,"i"],[2,2]],[2,0]]]],[[0,"let"],[1,"math:sign"],[[0,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"x"],[1,"y"],[[0,"*"],[[0,"+"],[1,"x"],[1,"y"]],[2,0.5]]]],[[0,"let"],[1,"math:euclidean-mod"],[[0,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"num"],[[0,">"],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:negative?"],[[0,"safety"],[1,"lambda"],[1,"num"],[[0,"<"],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:zero?"],[[0,"safety"],[1,"lambda"],[1,"num"],[[0,"="],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:negative-one?"],[[0,"safety"],[1,"lambda"],[1,"num"],[[0,"="],[1,"num"],[2,-1]]]],[[0,"let"],[1,"math:divisible?"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"b"],[[0,"="],[[0,"mod"],[1,"a"],[1,"b"]],[2,0]]]],[[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,"do"],[[0,"let*"],[1,"iter"],[[0,"lambda"],[1,"i"],[1,"end"],[[0,"do"],[[0,"let"],[1,"is-prime"],[[0,"not"],[[0,"="],[[0,"mod"],[1,"n"],[1,"i"]],[2,0]]]],[[0,"if"],[[0,"and"],[[0,"<="],[1,"i"],[1,"end"]],[1,"is-prime"]],[[0,"iter"],[[0,"+"],[1,"i"],[2,1]],[1,"end"]],[1,"is-prime"]]]]],[[0,"or"],[[0,"="],[1,"n"],[2,2]],[[0,"iter"],[2,2],[[0,"math:sqrt"],[1,"n"]]]]]]]],[[0,"let"],[1,"math:largest-power"],[[0,"safety"],[1,"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,"array:for"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"when"],[[0,"length"],[1,"arr"]],[[0,"do"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"array:for"],[[0,"cdr"],[1,"arr"]],[1,"callback"]]]]]],[[0,"let"],[1,"array:map"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"callback"],[[0,"car"],[1,"arr"]]]]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:select"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"car"],[1,"arr"]]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:exclude"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"if"],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]]]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"car"],[1,"arr"]]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:fold"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[1,"initial"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"callback"],[1,"out"],[[0,"car"],[1,"arr"]]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[1,"initial"]]]]],[[0,"let"],[1,"array:every?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"callback"],[[0,"car"],[1,"arr"]]]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]]],[[0,"not"],[[0,"length"],[1,"arr"]]]]]],[[0,"iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:some?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]]]]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]]],[[0,"type"],[[0,"length"],[1,"arr"]],[1,"boolean"]]]]],[[0,"iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:find"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"car"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]]]],[]]]],[[0,"iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:has?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[[0,"when"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[2,1],[[0,"iterate"],[[0,"cdr"],[1,"arr"]]]]]]],[[0,"iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:reverse"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"array:merge!"],[[0,"array"],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:append!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"array:set!"],[1,"q"],[[0,"length"],[1,"q"]],[1,"item"]]]],[[0,"let"],[1,"array:tail!"],[[0,"lambda"],[1,"q"],[[0,"array:set!"],[1,"q"],[2,-1]]]],[[0,"let"],[1,"array:push!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"do"],[[0,"array: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,"array:get"],[1,"q"],[2,-1]]],[[0,"array:set!"],[1,"q"],[2,-1]],[1,"l"]]]],[[0,"let"],[1,"array:unique"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[[0,"let"],[1,"sorted"],[[0,"array:sort"],[1,"arr"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"b"],[[0,">"],[1,"a"],[1,"b"]]]]],[[0,"array:zip"],[[0,"math:sequence"],[1,"sorted"]]],[[0,"array:select"],[[0,"lambda"],[1,"x"],[[0,"or"],[[0,"not"],[[0,"let"],[1,"index"],[[0,"car"],[[0,"cdr"],[1,"x"]]]]],[[0,"not"],[[0,"="],[[0,"array:get"],[1,"sorted"],[[0,"-"],[1,"index"],[2,1]]],[[0,"array:get"],[1,"sorted"],[1,"index"]]]]]]],[[0,"array:map"],[1,"car"]]]]],[[0,"let"],[1,"array:for-range"],[[0,"safety"],[1,"lambda"],[1,"start"],[1,"end"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"i"],[[0,"when"],[[0,"<"],[1,"i"],[1,"end"]],[[0,"do"],[[0,"callback"],[1,"i"]],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]]]]]]],[[0,"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,"iterate"],[1,"x"],[[0,"lambda"],[1,"y"],[[0,"array:traverse"],[1,"y"],[1,"callback"]]]]]]],[[0,"let"],[1,"array:empty?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[[0,"not"],[[0,"length"],[1,"arr"]]]]],[[0,"let"],[1,"array:count-of"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"|>"],[1,"arr"],[[0,"array:select"],[1,"callback"]],[[0,"length"]]]]],[[0,"let"],[1,"array:empty!"],[[0,"safety"],[1,"lambda"],[1,"arr"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"do"],[[0,"array:set!"],[1,"arr"],[2,-1]],[[0,"iterate"]]],[1,"arr"]]]],[[0,"iterate"]]]]],[[0,"let"],[1,"array:in-bounds?"],[[0,"safety"],[1,"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,"iterate"],[[0,"lambda"],[1,"i"],[1,"out"],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"array:get"],[1,"arr"],[[0,"+"],[1,"start"],[1,"i"]]]]]],[1,"out"]]]],[[0,"iterate"],[2,0],[]]]]],[[0,"let"],[1,"array:binary-search"],[[0,"lambda"],[1,"arr"],[1,"target"],[[0,"do"],[[0,"let*"],[1,"search"],[[0,"lambda"],[1,"arr"],[1,"target"],[1,"start"],[1,"end"],[[0,"do"],[[0,"when"],[[0,"<="],[1,"start"],[1,"end"]],[[0,"do"],[[0,"let"],[1,"index"],[[0,"math:floor"],[[0,"*"],[[0,"+"],[1,"start"],[1,"end"]],[2,0.5]]]],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"arr"],[1,"index"]]],[[0,"if"],[[0,"="],[1,"target"],[1,"current"]],[1,"target"],[[0,"if"],[[0,">"],[1,"current"],[1,"target"]],[[0,"search"],[1,"arr"],[1,"target"],[1,"start"],[[0,"-"],[1,"index"],[2,1]]],[[0,"search"],[1,"arr"],[1,"target"],[[0,"+"],[1,"index"],[2,1]],[1,"end"]]]]]]]]],[[0,"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,"iterate"],[[0,"lambda"],[1,"a"],[1,"b"],[1,"output"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"iterate"],[[0,"cdr"],[1,"a"]],[[0,"cdr"],[1,"b"]],[[0,"array:merge!"],[1,"output"],[[0,"array"],[[0,"array"],[[0,"car"],[1,"a"]],[[0,"car"],[1,"b"]]]]]],[1,"output"]]]],[[0,"iterate"],[1,"A"],[1,"B"],[]]]]],[[0,"let"],[1,"array:equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"or"],[[0,"and"],[[0,"number?"],[1,"a"]],[[0,"number?"],[1,"b"]],[[0,"="],[1,"a"],[1,"b"]]],[[0,"and"],[[0,"string?"],[1,"a"]],[[0,"string?"],[1,"b"]],[[0,"string:equal?"],[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,"array:get"],[1,"a"],[1,"i"]],[[0,"array: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,"string:merge"],[1,"a"],[1,"delim"],[[0,"type"],[[0,"car"],[1,"b"]],[1,"string"]]],[[0,"type"],[[0,"car"],[1,"b"]],[1,"string"]]]],[2,""]]]],[[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,"and"],[[0,"array?"],[1,"item"]],[[0,"length"],[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,"do"],[[0,"let"],[1,"pivot"],[[0,"car"],[1,"arr"]]],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"i"],[1,"bounds"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"current"],[[0,"array: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,"array:merge"],[1,"a"],[[0,"array"],[1,"current"]]],[1,"a"]]],[[0,"let"],[1,"right"],[[0,"if"],[[0,"="],[1,"predicate"],[2,1]],[[0,"array:merge"],[1,"b"],[[0,"array"],[1,"current"]]],[1,"b"]]],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"],[1,"left"],[1,"right"]],[[0,"array"],[1,"left"],[1,"right"]]]]]],[[0,"let"],[1,"sorted"],[[0,"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,"array:merge"],[[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,"array: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,"array: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,"array:get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]]]]]]],[[0,"let"],[1,"array:set"],[[0,"lambda"],[1,"arr"],[1,"index"],[1,"item"],[[0,"array:set!"],[[0,"type"],[1,"arr"],[1,"array"]],[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,"unless"],[[0,"="],[1,"len"],[2,1]],[[0,"do"],[[0,"array"],[[0,"car"],[1,"arr"]]],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"i"],[1,"result"],[[0,"if"],[[0,"<"],[1,"i"],[1,"len"]],[[0,"do"],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]],[[0,"array:set!"],[1,"result"],[1,"i"],[[0,"callback"],[[0,"array:get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]],[[0,"array:get"],[1,"arr"],[1,"i"]]]]]],[1,"result"]]]],[[0,"iterate"],[2,1],[1,"arr"]]],[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,"otherwise"],[[0,"="],[1,"len"],[2,1]],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"len"]],[[0,"if"],[[0,"callback"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"arr"],[1,"i"]]]],[1,"prev"],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]]]],[]]]],[[0,"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,"when"],[[0,"and"],[[0,"array:in-bounds?"],[1,"arr"],[1,"dy"]],[[0,"array:in-bounds?"],[[0,"array:get"],[1,"arr"],[1,"dy"]],[1,"dx"]]],[[0,"callback"],[[0,"array:get"],[[0,"array: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:set!"],[[0,"let"],[1,"last-a"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"length"],[1,"last-a"]],[1,"x"]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[[0,"do"],[[0,"let"],[1,"mut-arr"],[]],[[0,"array:set!"],[1,"mut-arr"],[[0,"length"],[1,"mut-arr"]],[1,"x"]]]]],[1,"a"]]],[]]]],[[0,"let"],[1,"cast: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,"cast:string->chars"],[[0,"safety"],[1,"lambda"],[1,"str"],[[0,"type"],[1,"str"],[1,"array"]]]],[[0,"let"],[1,"cast:chars->string"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"x"],[[0,"string:merge"],[1,"a"],[[0,"type"],[1,"x"],[1,"string"]]]],[2,""]]]],[[0,"let"],[1,"cast:string->number"],[[0,"safety"],[1,"lambda"],[1,"str"],[[0,"type"],[1,"str"],[1,"number"]]]],[[0,"let"],[1,"cast:number->string"],[[0,"safety"],[1,"lambda"],[1,"n"],[[0,"type"],[1,"n"],[1,"string"]]]],[[0,"let"],[1,"cast:strings->numbers"],[[0,"lambda"],[1,"arr"],[[0,"array:map"],[1,"arr"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"number"]]]]]],[[0,"let"],[1,"cast:numbers->strings"],[[0,"lambda"],[1,"arr"],[[0,"array:map"],[1,"arr"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"string"]]]]]],[[0,"let"],[1,"cast:string->char-codes"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"char-code"]]]]]]],[[0,"let"],[1,"cast:chars->char-codes"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[1,"arr"],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"char-code"]]]]]]],[[0,"let"],[1,"cast:chars->numbers"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[1,"arr"],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"number"]]]]]]],[[0,"let"],[1,"cast:char->number"],[[0,"safety"],[1,"lambda"],[1,"ch"],[[0,"type"],[1,"ch"],[1,"number"]]]],[[0,"let"],[1,"cast:char->char-code"],[[0,"safety"],[1,"lambda"],[1,"ch"],[[0,"type"],[1,"ch"],[1,"char-code"]]]],[[0,"let"],[1,"cast:char-code->char"],[[0,"safety"],[1,"lambda"],[1,"ch"],[[0,"type"],[1,"ch"],[1,"char"]]]],[[0,"let"],[1,"cast:char-codes->chars"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[1,"arr"],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"char"]]]]]]],[[0,"let"],[1,"cast:char-codes->string"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[1,"arr"],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"char"]]]],[[0,"cast:chars->string"]]]]],[[0,"let"],[1,"cast:table->array"],[[0,"lambda"],[1,"set"],[[0,"array:select"],[[0,"array:flat"],[1,"set"]],[1,"atom?"]]]],[[0,"let"],[1,"cast:map->string"],[[0,"lambda"],[1,"table"],[[0,"|>"],[1,"table"],[[0,"array:select"],[1,"length"]],[[0,"array:flat-one"]],[[0,"array:map"],[[0,"lambda"],[1,"y"],[[0,"array:join"],[1,"y"],[2," -> "]]]],[[0,"array:join"],[2,"\n"]]]]],[[0,"let"],[1,"cast: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,"left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[[0,"array:get"],[1,"initial"],[1,"index"]]],[[0,"when"],[[0,">"],[1,"index"],[2,0]],[[0,"left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let*"],[1,"rigth"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[[0,"array:get"],[1,"initial"],[1,"index"]]],[[0,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rigth"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rigth"],[1,"half"],[[0,"-"],[[0,"length"],[1,"initial"]],[2,1]]],[1,"q"]]]],[[0,"let"],[1,"cast:brray->array"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"out"],[]],[[0,"let*"],[1,"iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"array:set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"brray:get"],[1,"q"],[1,"index"]]],[[0,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"iter"],[2,0],[[0,"-"],[[0,"brray:length"],[1,"q"]],[2,1]]],[1,"out"]]]],[[0,"let"],[1,"string:split"],[[0,"lambda"],[1,"str"],[1,"delim"],[[0,"do"],[[0,"let"],[1,"locals"],[]],[[0,"let"],[1,"delim-arr"],[[0,"type"],[1,"delim"],[1,"array"]]],[[0,"array:set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[1,"delim-arr"]],[[0,"array:set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[[0,"type"],[1,"str"],[1,"array"]]],[[0,"array:set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[[0,"length"],[1,"delim-arr"]]],[[0,"array:set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[2,""]],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"result"],[1,"i"],[1,"bounds"],[[0,"if"],[[0,"<"],[[0,"if"],[[0,"array:every?"],[[0,"array:zip"],[[0,"array: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,"array:get"],[1,"locals"],[2,1]]],[[0,"+"],[1,"i"],[1,"j"]]],[[0,"="],[[0,"type"],[[0,"array:get"],[[0,"array:get"],[1,"locals"],[2,1]],[[0,"+"],[1,"i"],[1,"j"]]],[1,"char-code"]],[[0,"type"],[1,"y"],[1,"char-code"]]]]]]],[[0,"do"],[[0,"array:set!"],[1,"result"],[[0,"length"],[1,"result"]],[[0,"array:get"],[1,"locals"],[2,3]]],[[0,"array:set!"],[1,"locals"],[2,3],[2,""]],[[0,"+"],[1,"i"],[[0,"array:get"],[1,"locals"],[2,2]],[2,-1]]],[[0,"do"],[[0,"array:set!"],[1,"locals"],[2,3],[[0,"string:merge"],[[0,"array:get"],[1,"locals"],[2,3]],[[0,"array:get"],[[0,"array:get"],[1,"locals"],[2,1]],[1,"i"]]]],[1,"i"]]],[1,"bounds"]],[[0,"iterate"],[1,"result"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[1,"result"]]]],[[0,"array:set!"],[[0,"let"],[1,"iteration-result"],[[0,"iterate"],[],[2,0],[[0,"-"],[[0,"length"],[[0,"array:get"],[1,"locals"],[2,1]]],[2,1]]]],[[0,"length"],[1,"iteration-result"]],[[0,"array:get"],[1,"locals"],[2,3]]]]]],[[0,"let"],[1,"array:shallow-copy"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array: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,"array: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,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[1,"x"]]]],[1,"a"]]]],[[0,"let"],[1,"array:swap-remove!"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"do"],[[0,"array:set!"],[1,"arr"],[1,"i"],[[0,"array:get"],[1,"arr"],[[0,"-"],[[0,"length"],[1,"arr"]],[2,1]]]],[[0,"array: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,"array:get"],[1,"arr"],[1,"i"]]],[[0,"array:set!"],[1,"arr"],[1,"i"],[[0,"array:get"],[1,"arr"],[1,"j"]]],[[0,"array:set!"],[1,"arr"],[1,"j"],[1,"temp"]]]]],[[0,"let"],[1,"array:index-of"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"item"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"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,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-select"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"car"],[1,"arr"]]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-exclude"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"if"],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"car"],[1,"arr"]]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-fold"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[1,"initial"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"callback"],[1,"out"],[[0,"car"],[1,"arr"]],[1,"i"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[2,0],[1,"initial"]]]]],[[0,"let"],[1,"array:enumerated-find"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[]]]],[[0,"iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-find-index"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-every?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]],[[0,"not"],[[0,"length"],[1,"arr"]]]]]],[[0,"iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-some?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]],[[0,"type"],[[0,"length"],[1,"arr"]],[1,"boolean"]]]]],[[0,"iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:find-index"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[1,"i"],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"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,"unless"],[[0,"="],[1,"x"],[1,"i"]],[[0,"array:merge!"],[1,"a"],[[0,"array"],[1,"x"]]],[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: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,"|>"],[1,"arr"],[[0,"array:zip"],[[0,"math:sequence"],[1,"arr"]]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array: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,"|>"],[1,"arr"],[[0,"array:zip"],[[0,"math:sequence"],[1,"arr"]]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array: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,"safety"],[1,"lambda"],[1,"arr"],[[0,"array:get"],[1,"arr"],[2,0]]]],[[0,"let"],[1,"array:last"],[[0,"safety"],[1,"lambda"],[1,"arr"],[[0,"array:get"],[1,"arr"],[2,-1]]]],[[0,"let"],[1,"string:index-of-char"],[[0,"lambda"],[1,"str"],[1,"character"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"iterate"],[[0,"type"],[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,"do"],[[0,"let"],[1,"string-arr"],[[0,"type"],[1,"str"],[1,"array"]]],[[0,"let*"],[1,"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,"|>"],[1,"string-arr"],[[0,"array:slice"],[1,"i"],[[0,"+"],[1,"i"],[[0,"length"],[1,"word"]]]],[[0,"array:join"],[2,""]]],[1,"word"]],[1,"i"],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"iterate"],[1,"string-arr"],[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,"do"],[[0,"let"],[1,"string-arr"],[[0,"type"],[1,"str"],[1,"array"]]],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"when"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,">="],[[0,"length"],[1,"arr"]],[[0,"length"],[1,"word"]]]],[[0,"if"],[[0,"string:equal?"],[[0,"|>"],[1,"string-arr"],[[0,"array:slice"],[1,"i"],[[0,"+"],[1,"i"],[[0,"length"],[1,"word"]]]],[[0,"array:join"],[2,""]]],[1,"word"]],[2,1],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]]]]],[[0,"iterate"],[1,"string-arr"],[2,0]]]]]],[[0,"let"],[1,"string:greater?"],[[0,"lambda"],[1,"L"],[1,"R"],[[0,"otherwise"],[[0,"string:equal?"],[1,"L"],[1,"R"]],[[0,"do"],[[0,"let"],[1,"A"],[[0,"cast:string->char-codes"],[[0,"type"],[1,"L"],[1,"string"]]]],[[0,"let"],[1,"B"],[[0,"cast:string->char-codes"],[[0,"type"],[1,"R"],[1,"string"]]]],[[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,"|>"],[1,"a"],[[0,"array:zip"],[1,"b"]],[[0,"array:fold"],[[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,"L"],[1,"R"],[[0,"otherwise"],[[0,"string:equal?"],[1,"L"],[1,"R"]],[[0,"do"],[[0,"let"],[1,"A"],[[0,"cast:string->char-codes"],[[0,"type"],[1,"L"],[1,"string"]]]],[[0,"let"],[1,"B"],[[0,"cast:string->char-codes"],[[0,"type"],[1,"R"],[1,"string"]]]],[[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,"|>"],[1,"a"],[[0,"array:zip"],[1,"b"]],[[0,"array:fold"],[[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,"L"],[1,"R"],[[0,"when"],[[0,"="],[[0,"length"],[1,"L"]],[[0,"length"],[1,"R"]]],[[0,"do"],[[0,"let"],[1,"a"],[[0,"cast:string->char-codes"],[1,"R"]]],[[0,"let"],[1,"b"],[[0,"cast:string->char-codes"],[1,"L"]]],[[0,"|>"],[1,"a"],[[0,"array:zip"],[1,"b"]],[[0,"array:every?"],[[0,"lambda"],[1,"x"],[[0,"="],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]]]]]]],[[0,"let"],[1,"string:trim-left"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"tr"],[[0,"array"],[2,1]]],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"and"],[[0,"car"],[1,"tr"]],[[0,"string:equal?"],[1,"b"],[2," "]]],[1,"a"],[[0,"do"],[[0,"when"],[[0,"car"],[1,"tr"]],[[0,"array:set!"],[1,"tr"],[2,0],[2,0]]],[[0,"string:merge"],[1,"a"],[1,"b"]]]]],[2,""]]]]]],[[0,"let"],[1,"string:trim-right"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"tr"],[[0,"array"],[2,1]]],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:reverse"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"and"],[[0,"car"],[1,"tr"]],[[0,"string:equal?"],[1,"b"],[2," "]]],[1,"a"],[[0,"do"],[[0,"when"],[[0,"car"],[1,"tr"]],[[0,"array:set!"],[1,"tr"],[2,0],[2,0]]],[[0,"string:merge"],[1,"b"],[1,"a"]]]]],[2,""]]]]]],[[0,"let"],[1,"string:trim"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"string:trim-left"]],[[0,"string:trim-right"]]]]],[[0,"let"],[1,"string:lines"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[1,"b"],[2,"\n"]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"array:set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"array:map"],[[0,"lambda"],[1,"x"],[[0,"array:join"],[1,"x"],[2,""]]]]]]],[[0,"let"],[1,"string:words"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[1,"b"],[2," "]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"array:set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"array:map"],[[0,"lambda"],[1,"x"],[[0,"array:join"],[1,"x"],[2,""]]]]]]],[[0,"let"],[1,"string:commas"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[1,"b"],[2,","]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"array:set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"array:map"],[[0,"lambda"],[1,"x"],[[0,"array:join"],[1,"x"],[2,""]]]]]]],[[0,"let"],[1,"string:separator"],[[0,"lambda"],[1,"str"],[1,"separator"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[1,"b"],[1,"separator"]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"array:set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"array:map"],[[0,"lambda"],[1,"x"],[[0,"array:join"],[1,"x"],[2,""]]]]]]],[[0,"let"],[1,"string:append"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"string:merge"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"string:prepend"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"string:merge"],[1,"b"],[1,"a"]]]],[[0,"let"],[1,"new:set"],[[0,"lambda"],[[0,"array"],[],[],[],[]]]],[[0,"let"],[1,"new:array"],[[0,"safety"],[1,"lambda"],[1,"items"],[[0,"type"],[1,"items"],[1,"array"]]]],[[0,"let"],[1,"new:list"],[[0,"safety"],[1,"lambda"],[1,"value"],[[0,"array"],[],[1,"value"],[]]]],[[0,"let"],[1,"new:binary-tree"],[[0,"safety"],[1,"lambda"],[1,"value"],[[0,"do"],[[0,"let"],[1,"arr"],[]],[[0,"array:set!"],[1,"arr"],[2,0],[1,"value"]],[[0,"array:set!"],[1,"arr"],[2,1],[]],[[0,"array:set!"],[1,"arr"],[2,2],[]],[1,"arr"]]]],[[0,"let"],[1,"binary-tree:left"],[[0,"safety"],[1,"lambda"],[1,"node"],[[0,"array:get"],[1,"node"],[2,1]]]],[[0,"let"],[1,"binary-tree:right"],[[0,"safety"],[1,"lambda"],[1,"node"],[[0,"array:get"],[1,"node"],[2,2]]]],[[0,"let"],[1,"binary-tree:left!"],[[0,"safety"],[1,"lambda"],[1,"tree"],[1,"node"],[[0,"array:set!"],[1,"tree"],[2,1],[1,"node"]]]],[[0,"let"],[1,"binary-tree:right!"],[[0,"safety"],[1,"lambda"],[1,"tree"],[1,"node"],[[0,"array:set!"],[1,"tree"],[2,2],[1,"node"]]]],[[0,"let"],[1,"binary-tree:value"],[[0,"safety"],[1,"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,"key-arr"],[[0,"type"],[[0,"type"],[1,"key"],[1,"string"]],[1,"array"]]],[[0,"let"],[1,"total"],[[0,"array"],[2,0]]],[[0,"let*"],[1,"find-hash-index"],[[0,"lambda"],[1,"i"],[1,"bounds"],[[0,"do"],[[0,"let"],[1,"letter"],[[0,"array:get"],[1,"key-arr"],[1,"i"]]],[[0,"let"],[1,"value"],[[0,"-"],[[0,"type"],[1,"letter"],[1,"char-code"]],[2,96]]],[[0,"array: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,"find-hash-index"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[[0,"car"],[1,"total"]]]]]],[[0,"find-hash-index"],[2,0],[[0,"if"],[[0,"<"],[[0,"-"],[[0,"length"],[1,"key-arr"]],[2,1]],[2,100]],[[0,"-"],[[0,"length"],[1,"key-arr"]],[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,"otherwise"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"array:set!"],[1,"table"],[1,"idx"],[[0,"array"]]]],[[0,"let"],[1,"current"],[[0,"array: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,"type"],[1,"x"],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,-1]]],[[0,"let"],[1,"entry"],[1,"key"]],[[0,"if"],[[0,"="],[1,"index"],[2,-1]],[[0,"array:set!"],[1,"current"],[[0,"length"],[1,"current"]],[1,"entry"]],[[0,"array: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,"otherwise"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"array:set!"],[1,"table"],[1,"idx"],[[0,"Array"]]]],[[0,"let"],[1,"current"],[[0,"array: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,"type"],[1,"x"],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,-1]]],[[0,"let"],[1,"entry"],[1,"key"]],[[0,"otherwise"],[[0,"="],[1,"index"],[2,-1]],[[0,"and"],[[0,"array:set!"],[1,"current"],[1,"index"],[[0,"array:get"],[1,"current"],[2,-1]]],[[0,"array:set!"],[1,"current"],[2,-1]]]],[1,"table"]]]],[[0,"let"],[1,"set:has?"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"and"],[[0,"array:in-bounds?"],[1,"table"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]]],[[0,"and"],[[0,"length"],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"table"],[1,"idx"]]]],[[0,">="],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"type"],[1,"x"],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,0]]]]]],[[0,"let"],[1,"set:intersection"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"|>"],[1,"b"],[[0,"cast:table->array"]],[[0,"array:fold"],[[0,"lambda"],[1,"out"],[1,"element"],[[0,"do"],[[0,"when"],[[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,"|>"],[1,"a"],[[0,"cast:table->array"]],[[0,"array:fold"],[[0,"lambda"],[1,"out"],[1,"element"],[[0,"do"],[[0,"when"],[[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,"|>"],[1,"a"],[[0,"cast:table->array"]],[[0,"array:for"],[[0,"lambda"],[1,"element"],[[0,"when"],[[0,"not"],[[0,"set:has?"],[1,"b"],[1,"element"]]],[[0,"set:add!"],[1,"out"],[1,"element"]]]]]],[[0,"|>"],[1,"b"],[[0,"cast:table->array"]],[[0,"array:for"],[[0,"lambda"],[1,"element"],[[0,"when"],[[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,"|>"],[1,"a"],[[0,"cast:table->array"]],[[0,"array:for"],[[0,"lambda"],[1,"element"],[[0,"set:add!"],[1,"out"],[1,"element"]]]]],[[0,"|>"],[1,"b"],[[0,"cast:table->array"]],[[0,"array:for"],[[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,"otherwise"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"array:set!"],[1,"table"],[1,"idx"],[]]],[[0,"let"],[1,"current"],[[0,"array: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,"type"],[[0,"car"],[1,"x"]],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,-1]]],[[0,"let"],[1,"entry"],[[0,"array"],[1,"key"],[1,"value"]]],[[0,"if"],[[0,"="],[1,"index"],[2,-1]],[[0,"array:set!"],[1,"current"],[[0,"length"],[1,"current"]],[1,"entry"]],[[0,"array: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,"otherwise"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"array:set!"],[1,"table"],[1,"idx"],[]]],[[0,"let"],[1,"current"],[[0,"array: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,"type"],[[0,"car"],[1,"x"]],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,-1]]],[[0,"otherwise"],[[0,"="],[1,"index"],[2,-1]],[[0,"and"],[[0,"array:set!"],[1,"current"],[1,"index"],[[0,"array:get"],[1,"current"],[2,-1]]],[[0,"array: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,"when"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"do"],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"found"],[[0,"array:find"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"type"],[1,"key"],[1,"string"]],[[0,"type"],[[0,"array:get"],[1,"x"],[2,0]],[1,"string"]]]]]],[[0,"when"],[[0,"length"],[1,"found"]],[[0,"array:get"],[1,"found"],[2,1]]]]]]]],[[0,"let"],[1,"map:has?"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"and"],[[0,"array:in-bounds?"],[1,"table"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]]],[[0,"and"],[[0,"length"],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"table"],[1,"idx"]]]],[[0,">="],[[0,"array:find-index"],[[0,"car"],[1,"current"]],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"type"],[1,"x"],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,0]]]]]],[[0,"let"],[1,"list:prev!"],[[0,"safety"],[1,"lambda"],[1,"list"],[1,"node"],[[0,"array:set!"],[1,"list"],[2,0],[[0,"array:set!"],[1,"node"],[2,2],[1,"list"]]]]],[[0,"let"],[1,"list:next!"],[[0,"safety"],[1,"lambda"],[1,"list"],[1,"node"],[[0,"array:set!"],[1,"list"],[2,2],[[0,"array:set!"],[1,"node"],[2,0],[1,"list"]]]]],[[0,"let"],[1,"list:prev"],[[0,"safety"],[1,"lambda"],[1,"list"],[[0,"array:get"],[1,"list"],[2,0]]]],[[0,"let"],[1,"list:next"],[[0,"safety"],[1,"lambda"],[1,"list"],[[0,"array:get"],[1,"list"],[2,2]]]],[[0,"let"],[1,"list:value"],[[0,"lambda"],[1,"node"],[[0,"array:get"],[1,"node"],[2,1]]]],[[0,"let"],[1,"var:def"],[[0,"safety"],[1,"lambda"],[1,"val"],[[0,"array"],[1,"val"]]]],[[0,"let"],[1,"var:get"],[[0,"safety"],[1,"lambda"],[1,"variable"],[[0,"car"],[1,"variable"]]]],[[0,"let"],[1,"var:set!"],[[0,"safety"],[1,"lambda"],[1,"variable"],[1,"value"],[[0,"array:set!"],[1,"variable"],[2,0],[1,"value"]]]],[[0,"let"],[1,"var:del!"],[[0,"safety"],[1,"lambda"],[1,"variable"],[[0,"array:set!"],[1,"variable"],[2,-1]]]],[[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,"array:get"],[1,"q"],[2,0]]],[2,1]],[2,-1]]]],[[0,"let"],[1,"brray:offset-right"],[[0,"lambda"],[1,"q"],[[0,"length"],[[0,"array:get"],[1,"q"],[2,1]]]]],[[0,"let"],[1,"brray:length"],[[0,"lambda"],[1,"q"],[[0,"+"],[[0,"length"],[[0,"array:get"],[1,"q"],[2,0]]],[[0,"length"],[[0,"array: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,"array:set!"],[1,"q"],[2,0],[[0,"array"],[]]],[[0,"array: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,"array:get"],[[0,"array:get"],[1,"q"],[2,1]],[1,"index"]],[[0,"array:get"],[[0,"array: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,"offset"],[[0,"brray:offset-left"],[1,"q"]]]],[[0,"if"],[[0,">="],[1,"offset"],[2,0]],[[0,"array:set!"],[[0,"array:get"],[1,"q"],[2,1]],[1,"offset"],[1,"value"]],[[0,"array:set!"],[[0,"array: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,"array:set!"],[[0,"let"],[1,"c"],[[0,"array: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,"array:set!"],[[0,"let"],[1,"c"],[[0,"array: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,"when"],[1,"len"],[[0,"cond"],[[0,"="],[1,"len"],[2,1]],[[0,"brray:empty!"],[1,"q"]],[[0,">"],[[0,"length"],[[0,"array:get"],[1,"q"],[2,0]]],[2,0]],[[0,"array:set!"],[[0,"array: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,"when"],[1,"len"],[[0,"cond"],[[0,"="],[1,"len"],[2,1]],[[0,"brray:empty!"],[1,"q"]],[[0,">"],[[0,"length"],[[0,"array:get"],[1,"q"],[2,1]]],[2,0]],[[0,"array:set!"],[[0,"array:get"],[1,"q"],[2,1]],[2,-1]]]]]]],[[0,"let"],[1,"brray:iter"],[[0,"lambda"],[1,"q"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]],[[0,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"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,"left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"result"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]]],[[0,"when"],[[0,">"],[1,"index"],[2,0]],[[0,"left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let*"],[1,"rigth"],[[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,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rigth"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rigth"],[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,"do"],[[0,"let"],[1,"initial"],[[0,"cast: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,"left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[[0,"array:get"],[1,"initial"],[1,"index"]]],[[0,"when"],[[0,">"],[1,"index"],[2,0]],[[0,"left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let*"],[1,"rigth"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[[0,"array:get"],[1,"initial"],[1,"index"]]],[[0,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rigth"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rigth"],[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,"when"],[[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,"when"],[[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,"iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"when"],[[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,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"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,"iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"when"],[[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,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"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,"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,"when"],[[0,">"],[1,"index"],[2,0]],[[0,"left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let*"],[1,"rigth"],[[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,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rigth"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rigth"],[1,"half"],[[0,"-"],[1,"slice-len"],[2,1]]],[1,"slice"]]]],[[0,"let"],[1,"date:add-seconds"],[[0,"lambda"],[1,"date-time"],[1,"seconds"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"seconds"],[2,1000]]]]],[[0,"let"],[1,"date:add-minutes"],[[0,"lambda"],[1,"date-time"],[1,"minutes"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"minutes"],[2,1000],[2,60]]]]],[[0,"let"],[1,"date: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,"date: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,"date: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,"date: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,"date:sub-seconds"],[[0,"lambda"],[1,"date-time"],[1,"seconds"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"seconds"],[2,1000]]]]],[[0,"let"],[1,"date:sub-minutes"],[[0,"lambda"],[1,"date-time"],[1,"minutes"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"minutes"],[2,1000],[2,60]]]]],[[0,"let"],[1,"date: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,"date: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,"date: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,"date: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]]]]]]
1
+ export default [[[0,"let"],[1,"math:E"],[2,2.718281828459045]],[[0,"let"],[1,"math:PI"],[2,3.141592653589793]],[[0,"let"],[1,"math:range"],[[0,"lambda"],[1,"start"],[1,"end"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<="],[1,"count"],[1,"end"]],[[0,"iterate"],[[0,"array:merge!"],[1,"out"],[[0,"array"],[1,"count"]]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"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,"iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"out"]],[1,"end"]],[[0,"iterate"],[[0,"array:merge!"],[1,"out"],[[0,"array"],[1,"count"]]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"iterate"],[],[2,0]]]]],[[0,"let"],[1,"math:sequence-n"],[[0,"lambda"],[1,"n"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"out"],[1,"count"],[[0,"if"],[[0,"<"],[[0,"length"],[1,"out"]],[1,"n"]],[[0,"iterate"],[[0,"array:merge!"],[1,"out"],[[0,"array"],[1,"count"]]],[[0,"+"],[1,"count"],[2,1]]],[1,"out"]]]],[[0,"iterate"],[],[2,0]]]]],[[0,"let"],[1,"math:permutations"],[[0,"lambda"],[1,"xs"],[[0,"unless"],[[0,"length"],[1,"xs"]],[[0,"array"],[]],[[0,"|>"],[1,"xs"],[[0,"array:enumerated-map"],[[0,"lambda"],[1,"x"],[1,"i"],[[0,"|>"],[1,"xs"],[[0,"array:enumerated-exclude"],[[0,"lambda"],[1,"."],[1,"j"],[[0,"="],[1,"i"],[1,"j"]]]],[[0,"math:permutations"]],[[0,"array:map"],[[0,"lambda"],[1,"vs"],[[0,"cons"],[[0,"array"],[1,"x"]],[1,"vs"]]]]]]],[[0,"array:flat-one"]]]]]],[[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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"i"],[[0,"+"],[1,"i"],[2,1]]]],[[0,"let"],[1,"math:floor"],[[0,"safety"],[1,"lambda"],[1,"n"],[[0,"|"],[1,"n"],[2,0]]]],[[0,"let"],[1,"math:round"],[[0,"safety"],[1,"lambda"],[1,"n"],[[0,"|"],[[0,"+"],[1,"n"],[2,0.5]],[2,0]]]],[[0,"let"],[1,"math:set-bit"],[[0,"safety"],[1,"lambda"],[1,"n"],[1,"bit"],[[0,"|"],[1,"n"],[[0,"<<"],[2,1],[1,"bit"]]]]],[[0,"let"],[1,"math:clear-bit"],[[0,"safety"],[1,"lambda"],[1,"n"],[1,"bit"],[[0,"&"],[1,"n"],[[0,"~"],[[0,"<<"],[2,1],[1,"bit"]]]]]],[[0,"let"],[1,"math:odd-bit?"],[[0,"safety"],[1,"lambda"],[1,"n"],[[0,"="],[[0,"&"],[1,"n"],[2,1]],[2,1]]]],[[0,"let"],[1,"math:average-bit"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"b"],[[0,">>"],[[0,"+"],[1,"a"],[1,"b"]],[2,1]]]],[[0,"let"],[1,"math:toggle-bit"],[[0,"safety"],[1,"lambda"],[1,"n"],[1,"a"],[1,"b"],[[0,"^"],[1,"a"],[1,"b"],[1,"n"]]]],[[0,"let"],[1,"math:same-sign-bit?"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"b"],[[0,">="],[[0,"^"],[1,"a"],[1,"b"]],[2,0]]]],[[0,"let"],[1,"math:max-bit"],[[0,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"numerator"],[1,"divisor"],[[0,"&"],[1,"numerator"],[[0,"-"],[1,"divisor"],[2,1]]]]],[[0,"let"],[1,"math:n-one-bit?"],[[0,"safety"],[1,"lambda"],[1,"N"],[1,"nth"],[[0,"type"],[[0,"&"],[1,"N"],[[0,"<<"],[2,1],[1,"nth"]]],[1,"boolean"]]]],[[0,"let"],[1,"math:square"],[[0,"safety"],[1,"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,"throw"],[[0,"string:merge"],[2,"Attempting to divide by 0 in (math:power "],[[0,"type"],[1,"base"],[1,"string"]],[2," "],[[0,"type"],[1,"exp"],[1,"string"]],[2,")"]]],[[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,"gcd"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"="],[1,"b"],[2,0]],[1,"a"],[[0,"gcd"],[1,"b"],[[0,"mod"],[1,"a"],[1,"b"]]]]]],[[0,"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,"math:sqrt-iter"],[[0,"lambda"],[1,"g"],[1,"x"],[[0,"if"],[[0,"is-good-enough"],[1,"g"],[1,"x"]],[1,"g"],[[0,"math:sqrt-iter"],[[0,"improve-guess"],[1,"g"],[1,"x"]],[1,"x"]]]]],[[0,"math:sqrt-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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"n"],[[0,"*"],[1,"n"],[[0,"+"],[1,"n"],[2,1]],[2,0.5]]]],[[0,"let"],[1,"math:gauss-sum-sequance"],[[0,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"x"],[1,"limit"],[[0,"if"],[[0,">"],[1,"x"],[1,"limit"]],[1,"limit"],[1,"x"]]]],[[0,"let"],[1,"math:odd?"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"="],[[0,"mod"],[1,"x"],[2,2]],[2,1]]]],[[0,"let"],[1,"math:even?"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"="],[[0,"mod"],[1,"x"],[2,2]],[2,0]]]],[[0,"let"],[1,"math:enumerated-odd?"],[[0,"safety"],[1,"lambda"],[1,"."],[1,"i"],[[0,"="],[[0,"mod"],[1,"i"],[2,2]],[2,1]]]],[[0,"let"],[1,"math:enumerated-even?"],[[0,"safety"],[1,"lambda"],[1,"."],[1,"i"],[[0,"="],[[0,"mod"],[1,"i"],[2,2]],[2,0]]]],[[0,"let"],[1,"math:sign"],[[0,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"x"],[1,"y"],[[0,"*"],[[0,"+"],[1,"x"],[1,"y"]],[2,0.5]]]],[[0,"let"],[1,"math:euclidean-mod"],[[0,"safety"],[1,"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,"safety"],[1,"lambda"],[1,"num"],[[0,">"],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:negative?"],[[0,"safety"],[1,"lambda"],[1,"num"],[[0,"<"],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:zero?"],[[0,"safety"],[1,"lambda"],[1,"num"],[[0,"="],[1,"num"],[2,0]]]],[[0,"let"],[1,"math:negative-one?"],[[0,"safety"],[1,"lambda"],[1,"num"],[[0,"="],[1,"num"],[2,-1]]]],[[0,"let"],[1,"math:divisible?"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"b"],[[0,"="],[[0,"mod"],[1,"a"],[1,"b"]],[2,0]]]],[[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,"do"],[[0,"let*"],[1,"iter"],[[0,"lambda"],[1,"i"],[1,"end"],[[0,"do"],[[0,"let"],[1,"is-prime"],[[0,"not"],[[0,"="],[[0,"mod"],[1,"n"],[1,"i"]],[2,0]]]],[[0,"if"],[[0,"and"],[[0,"<="],[1,"i"],[1,"end"]],[1,"is-prime"]],[[0,"iter"],[[0,"+"],[1,"i"],[2,1]],[1,"end"]],[1,"is-prime"]]]]],[[0,"or"],[[0,"="],[1,"n"],[2,2]],[[0,"iter"],[2,2],[[0,"math:sqrt"],[1,"n"]]]]]]]],[[0,"let"],[1,"math:largest-power"],[[0,"safety"],[1,"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,"array:for"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"when"],[[0,"length"],[1,"arr"]],[[0,"do"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"array:for"],[[0,"cdr"],[1,"arr"]],[1,"callback"]]]]]],[[0,"let"],[1,"array:map"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"callback"],[[0,"car"],[1,"arr"]]]]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:select"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"car"],[1,"arr"]]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:exclude"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"if"],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]]]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"car"],[1,"arr"]]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:fold"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[1,"initial"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"callback"],[1,"out"],[[0,"car"],[1,"arr"]]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[1,"initial"]]]]],[[0,"let"],[1,"array:every?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"callback"],[[0,"car"],[1,"arr"]]]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]]],[[0,"not"],[[0,"length"],[1,"arr"]]]]]],[[0,"iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:some?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]]]]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]]],[[0,"type"],[[0,"length"],[1,"arr"]],[1,"boolean"]]]]],[[0,"iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:find"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[[0,"car"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]]]],[]]]],[[0,"iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:has?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[[0,"when"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[2,1],[[0,"iterate"],[[0,"cdr"],[1,"arr"]]]]]]],[[0,"iterate"],[1,"arr"]]]]],[[0,"let"],[1,"array:reverse"],[[0,"lambda"],[1,"arr"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"array:merge!"],[[0,"array"],[[0,"car"],[1,"arr"]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[]]]]],[[0,"let"],[1,"array:append!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"array:set!"],[1,"q"],[[0,"length"],[1,"q"]],[1,"item"]]]],[[0,"let"],[1,"array:tail!"],[[0,"lambda"],[1,"q"],[[0,"array:set!"],[1,"q"],[2,-1]]]],[[0,"let"],[1,"array:push!"],[[0,"lambda"],[1,"q"],[1,"item"],[[0,"do"],[[0,"array: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,"array:get"],[1,"q"],[2,-1]]],[[0,"array:set!"],[1,"q"],[2,-1]],[1,"l"]]]],[[0,"let"],[1,"array:unique"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[[0,"let"],[1,"sorted"],[[0,"array:sort"],[1,"arr"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"b"],[[0,">"],[1,"a"],[1,"b"]]]]],[[0,"array:zip"],[[0,"math:sequence"],[1,"sorted"]]],[[0,"array:select"],[[0,"lambda"],[1,"x"],[[0,"or"],[[0,"not"],[[0,"let"],[1,"index"],[[0,"car"],[[0,"cdr"],[1,"x"]]]]],[[0,"not"],[[0,"="],[[0,"array:get"],[1,"sorted"],[[0,"-"],[1,"index"],[2,1]]],[[0,"array:get"],[1,"sorted"],[1,"index"]]]]]]],[[0,"array:map"],[1,"car"]]]]],[[0,"let"],[1,"array:for-range"],[[0,"safety"],[1,"lambda"],[1,"start"],[1,"end"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"i"],[[0,"when"],[[0,"<"],[1,"i"],[1,"end"]],[[0,"do"],[[0,"callback"],[1,"i"]],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]]]]]]],[[0,"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,"iterate"],[1,"x"],[[0,"lambda"],[1,"y"],[[0,"array:traverse"],[1,"y"],[1,"callback"]]]]]]],[[0,"let"],[1,"array:empty?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[[0,"not"],[[0,"length"],[1,"arr"]]]]],[[0,"let"],[1,"array:count-of"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"|>"],[1,"arr"],[[0,"array:select"],[1,"callback"]],[[0,"length"]]]]],[[0,"let"],[1,"array:empty!"],[[0,"safety"],[1,"lambda"],[1,"arr"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"do"],[[0,"array:set!"],[1,"arr"],[2,-1]],[[0,"iterate"]]],[1,"arr"]]]],[[0,"iterate"]]]]],[[0,"let"],[1,"array:in-bounds?"],[[0,"safety"],[1,"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,"iterate"],[[0,"lambda"],[1,"i"],[1,"out"],[[0,"if"],[[0,"<"],[1,"i"],[1,"bounds"]],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"array:get"],[1,"arr"],[[0,"+"],[1,"start"],[1,"i"]]]]]],[1,"out"]]]],[[0,"iterate"],[2,0],[]]]]],[[0,"let"],[1,"array:binary-search"],[[0,"lambda"],[1,"arr"],[1,"target"],[[0,"do"],[[0,"let*"],[1,"search"],[[0,"lambda"],[1,"arr"],[1,"target"],[1,"start"],[1,"end"],[[0,"do"],[[0,"when"],[[0,"<="],[1,"start"],[1,"end"]],[[0,"do"],[[0,"let"],[1,"index"],[[0,"math:floor"],[[0,"*"],[[0,"+"],[1,"start"],[1,"end"]],[2,0.5]]]],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"arr"],[1,"index"]]],[[0,"if"],[[0,"="],[1,"target"],[1,"current"]],[1,"target"],[[0,"if"],[[0,">"],[1,"current"],[1,"target"]],[[0,"search"],[1,"arr"],[1,"target"],[1,"start"],[[0,"-"],[1,"index"],[2,1]]],[[0,"search"],[1,"arr"],[1,"target"],[[0,"+"],[1,"index"],[2,1]],[1,"end"]]]]]]]]],[[0,"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,"iterate"],[[0,"lambda"],[1,"a"],[1,"b"],[1,"output"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"a"]],[[0,"length"],[1,"b"]]],[[0,"iterate"],[[0,"cdr"],[1,"a"]],[[0,"cdr"],[1,"b"]],[[0,"array:merge!"],[1,"output"],[[0,"array"],[[0,"array"],[[0,"car"],[1,"a"]],[[0,"car"],[1,"b"]]]]]],[1,"output"]]]],[[0,"iterate"],[1,"A"],[1,"B"],[]]]]],[[0,"let"],[1,"array:equal?"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"or"],[[0,"and"],[[0,"number?"],[1,"a"]],[[0,"number?"],[1,"b"]],[[0,"="],[1,"a"],[1,"b"]]],[[0,"and"],[[0,"string?"],[1,"a"]],[[0,"string?"],[1,"b"]],[[0,"string:equal?"],[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,"array:get"],[1,"a"],[1,"i"]],[[0,"array: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,"string:merge"],[1,"a"],[1,"delim"],[[0,"type"],[[0,"car"],[1,"b"]],[1,"string"]]],[[0,"type"],[[0,"car"],[1,"b"]],[1,"string"]]]],[2,""]]]],[[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,"and"],[[0,"array?"],[1,"item"]],[[0,"length"],[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,"do"],[[0,"let"],[1,"pivot"],[[0,"car"],[1,"arr"]]],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"i"],[1,"bounds"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"current"],[[0,"array: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,"iterate"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"],[1,"left"],[1,"right"]],[[0,"array"],[1,"left"],[1,"right"]]]]]],[[0,"let"],[1,"sorted"],[[0,"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,"|>"],[[0,"array:sort"],[1,"left"],[1,"callback"]],[[0,"cons"],[[0,"array"],[1,"pivot"]]],[[0,"cons"],[[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,"array: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,"array: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,"array:get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]]]]]]],[[0,"let"],[1,"array:set"],[[0,"lambda"],[1,"arr"],[1,"index"],[1,"item"],[[0,"array:set!"],[[0,"type"],[1,"arr"],[1,"array"]],[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,"unless"],[[0,"="],[1,"len"],[2,1]],[[0,"do"],[[0,"array"],[[0,"car"],[1,"arr"]]],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"i"],[1,"result"],[[0,"if"],[[0,"<"],[1,"i"],[1,"len"]],[[0,"do"],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]],[[0,"array:set!"],[1,"result"],[1,"i"],[[0,"callback"],[[0,"array:get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]],[[0,"array:get"],[1,"arr"],[1,"i"]]]]]],[1,"result"]]]],[[0,"iterate"],[2,1],[1,"arr"]]],[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,"otherwise"],[[0,"="],[1,"len"],[2,1]],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"i"],[[0,"if"],[[0,"<"],[1,"i"],[1,"len"]],[[0,"if"],[[0,"callback"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"arr"],[[0,"-"],[1,"i"],[2,1]]]],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"arr"],[1,"i"]]]],[1,"prev"],[[0,"iterate"],[[0,"+"],[1,"i"],[2,1]]]],[]]]],[[0,"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,"when"],[[0,"and"],[[0,"array:in-bounds?"],[1,"arr"],[1,"dy"]],[[0,"array:in-bounds?"],[[0,"array:get"],[1,"arr"],[1,"dy"]],[1,"dx"]]],[[0,"callback"],[[0,"array:get"],[[0,"array: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:set!"],[[0,"let"],[1,"last-a"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"length"],[1,"last-a"]],[1,"x"]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[[0,"do"],[[0,"let"],[1,"mut-arr"],[]],[[0,"array:set!"],[1,"mut-arr"],[[0,"length"],[1,"mut-arr"]],[1,"x"]]]]],[1,"a"]]],[]]]],[[0,"let"],[1,"cast: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,"cast:string->chars"],[[0,"safety"],[1,"lambda"],[1,"str"],[[0,"type"],[1,"str"],[1,"array"]]]],[[0,"let"],[1,"cast:chars->string"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"safety"],[1,"lambda"],[1,"a"],[1,"x"],[[0,"string:merge"],[1,"a"],[[0,"type"],[1,"x"],[1,"string"]]]],[2,""]]]],[[0,"let"],[1,"cast:string->number"],[[0,"safety"],[1,"lambda"],[1,"str"],[[0,"type"],[1,"str"],[1,"number"]]]],[[0,"let"],[1,"cast:number->string"],[[0,"safety"],[1,"lambda"],[1,"n"],[[0,"type"],[1,"n"],[1,"string"]]]],[[0,"let"],[1,"cast:strings->numbers"],[[0,"lambda"],[1,"arr"],[[0,"array:map"],[1,"arr"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"number"]]]]]],[[0,"let"],[1,"cast:numbers->strings"],[[0,"lambda"],[1,"arr"],[[0,"array:map"],[1,"arr"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"string"]]]]]],[[0,"let"],[1,"cast:string->char-codes"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"char-code"]]]]]]],[[0,"let"],[1,"cast:chars->char-codes"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[1,"arr"],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"char-code"]]]]]]],[[0,"let"],[1,"cast:chars->numbers"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[1,"arr"],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"number"]]]]]]],[[0,"let"],[1,"cast:char->number"],[[0,"safety"],[1,"lambda"],[1,"ch"],[[0,"type"],[1,"ch"],[1,"number"]]]],[[0,"let"],[1,"cast:char->char-code"],[[0,"safety"],[1,"lambda"],[1,"ch"],[[0,"type"],[1,"ch"],[1,"char-code"]]]],[[0,"let"],[1,"cast:char-code->char"],[[0,"safety"],[1,"lambda"],[1,"ch"],[[0,"type"],[1,"ch"],[1,"char"]]]],[[0,"let"],[1,"cast:char-codes->chars"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[1,"arr"],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"char"]]]]]]],[[0,"let"],[1,"cast:char-codes->string"],[[0,"lambda"],[1,"arr"],[[0,"|>"],[1,"arr"],[[0,"array:map"],[[0,"safety"],[1,"lambda"],[1,"x"],[[0,"type"],[1,"x"],[1,"char"]]]],[[0,"cast:chars->string"]]]]],[[0,"let"],[1,"cast:table->array"],[[0,"lambda"],[1,"set"],[[0,"array:select"],[[0,"array:flat"],[1,"set"]],[1,"atom?"]]]],[[0,"let"],[1,"cast:map->string"],[[0,"lambda"],[1,"table"],[[0,"|>"],[1,"table"],[[0,"array:select"],[1,"length"]],[[0,"array:flat-one"]],[[0,"array:map"],[[0,"lambda"],[1,"y"],[[0,"array:join"],[1,"y"],[2," -> "]]]],[[0,"array:join"],[2,"\n"]]]]],[[0,"let"],[1,"cast: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,"left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[[0,"array:get"],[1,"initial"],[1,"index"]]],[[0,"when"],[[0,">"],[1,"index"],[2,0]],[[0,"left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let*"],[1,"rigth"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[[0,"array:get"],[1,"initial"],[1,"index"]]],[[0,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rigth"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rigth"],[1,"half"],[[0,"-"],[[0,"length"],[1,"initial"]],[2,1]]],[1,"q"]]]],[[0,"let"],[1,"cast:brray->array"],[[0,"lambda"],[1,"q"],[[0,"do"],[[0,"let"],[1,"out"],[]],[[0,"let*"],[1,"iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"array:set!"],[1,"out"],[[0,"length"],[1,"out"]],[[0,"brray:get"],[1,"q"],[1,"index"]]],[[0,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"iter"],[2,0],[[0,"-"],[[0,"brray:length"],[1,"q"]],[2,1]]],[1,"out"]]]],[[0,"let"],[1,"string:split"],[[0,"lambda"],[1,"str"],[1,"delim"],[[0,"do"],[[0,"let"],[1,"locals"],[]],[[0,"let"],[1,"delim-arr"],[[0,"type"],[1,"delim"],[1,"array"]]],[[0,"array:set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[1,"delim-arr"]],[[0,"array:set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[[0,"type"],[1,"str"],[1,"array"]]],[[0,"array:set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[[0,"length"],[1,"delim-arr"]]],[[0,"array:set!"],[1,"locals"],[[0,"length"],[1,"locals"]],[2,""]],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"result"],[1,"i"],[1,"bounds"],[[0,"if"],[[0,"<"],[[0,"if"],[[0,"array:every?"],[[0,"array:zip"],[[0,"array: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,"array:get"],[1,"locals"],[2,1]]],[[0,"+"],[1,"i"],[1,"j"]]],[[0,"="],[[0,"type"],[[0,"array:get"],[[0,"array:get"],[1,"locals"],[2,1]],[[0,"+"],[1,"i"],[1,"j"]]],[1,"char-code"]],[[0,"type"],[1,"y"],[1,"char-code"]]]]]]],[[0,"do"],[[0,"array:set!"],[1,"result"],[[0,"length"],[1,"result"]],[[0,"array:get"],[1,"locals"],[2,3]]],[[0,"array:set!"],[1,"locals"],[2,3],[2,""]],[[0,"+"],[1,"i"],[[0,"array:get"],[1,"locals"],[2,2]],[2,-1]]],[[0,"do"],[[0,"array:set!"],[1,"locals"],[2,3],[[0,"string:merge"],[[0,"array:get"],[1,"locals"],[2,3]],[[0,"array:get"],[[0,"array:get"],[1,"locals"],[2,1]],[1,"i"]]]],[1,"i"]]],[1,"bounds"]],[[0,"iterate"],[1,"result"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[1,"result"]]]],[[0,"array:set!"],[[0,"let"],[1,"iteration-result"],[[0,"iterate"],[],[2,0],[[0,"-"],[[0,"length"],[[0,"array:get"],[1,"locals"],[2,1]]],[2,1]]]],[[0,"length"],[1,"iteration-result"]],[[0,"array:get"],[1,"locals"],[2,3]]]]]],[[0,"let"],[1,"array:shallow-copy"],[[0,"lambda"],[1,"arr"],[[0,"array:fold"],[1,"arr"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array: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,"array: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,"array: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,"array: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,"array:set!"],[1,"arr"],[1,"i"],[[0,"array:get"],[1,"arr"],[[0,"-"],[[0,"length"],[1,"arr"]],[2,1]]]],[[0,"array: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,"array:get"],[1,"arr"],[1,"i"]]],[[0,"array:set!"],[1,"arr"],[1,"i"],[[0,"array:get"],[1,"arr"],[1,"j"]]],[[0,"array:set!"],[1,"arr"],[1,"j"],[1,"temp"]]]]],[[0,"let"],[1,"array:index-of"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"item"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"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,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-select"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"car"],[1,"arr"]]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-exclude"],[[0,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"if"],[[0,"not"],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]],[[0,"array:merge!"],[1,"out"],[[0,"array"],[[0,"car"],[1,"arr"]]]],[1,"out"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[2,0],[]]]]],[[0,"let"],[1,"array:enumerated-fold"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[1,"initial"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[1,"out"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]],[[0,"callback"],[1,"out"],[[0,"car"],[1,"arr"]],[1,"i"]]],[1,"out"]]]],[[0,"iterate"],[1,"arr"],[2,0],[1,"initial"]]]]],[[0,"let"],[1,"array:enumerated-find"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[]]]],[[0,"iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-find-index"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-every?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,"callback"],[[0,"car"],[1,"arr"]],[1,"i"]]],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]],[[0,"not"],[[0,"length"],[1,"arr"]]]]]],[[0,"iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:enumerated-some?"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]],[[0,"type"],[[0,"length"],[1,"arr"]],[1,"boolean"]]]]],[[0,"iterate"],[1,"arr"],[2,0]]]]],[[0,"let"],[1,"array:find-index"],[[0,"safety"],[1,"lambda"],[1,"arr"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"if"],[[0,"length"],[1,"arr"]],[[0,"if"],[[0,"callback"],[[0,"car"],[1,"arr"]]],[1,"i"],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"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,"unless"],[[0,"="],[1,"x"],[1,"i"]],[[0,"array:merge!"],[1,"a"],[[0,"array"],[1,"x"]]],[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,"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,"|>"],[1,"arr"],[[0,"array:zip"],[[0,"math:sequence"],[1,"arr"]]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array: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,"|>"],[1,"arr"],[[0,"array:zip"],[[0,"math:sequence"],[1,"arr"]]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"array: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,"safety"],[1,"lambda"],[1,"arr"],[[0,"array:get"],[1,"arr"],[2,0]]]],[[0,"let"],[1,"array:last"],[[0,"safety"],[1,"lambda"],[1,"arr"],[[0,"array:get"],[1,"arr"],[2,-1]]]],[[0,"let"],[1,"string:index-of-char"],[[0,"lambda"],[1,"str"],[1,"character"],[[0,"do"],[[0,"let*"],[1,"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,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"iterate"],[[0,"type"],[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,"do"],[[0,"let"],[1,"string-arr"],[[0,"type"],[1,"str"],[1,"array"]]],[[0,"let*"],[1,"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,"|>"],[1,"string-arr"],[[0,"array:slice"],[1,"i"],[[0,"+"],[1,"i"],[[0,"length"],[1,"word"]]]],[[0,"array:join"],[2,""]]],[1,"word"]],[1,"i"],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]],[2,-1]]]],[[0,"iterate"],[1,"string-arr"],[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,"do"],[[0,"let"],[1,"string-arr"],[[0,"type"],[1,"str"],[1,"array"]]],[[0,"let*"],[1,"iterate"],[[0,"lambda"],[1,"arr"],[1,"i"],[[0,"when"],[[0,"and"],[[0,"length"],[1,"arr"]],[[0,">="],[[0,"length"],[1,"arr"]],[[0,"length"],[1,"word"]]]],[[0,"if"],[[0,"string:equal?"],[[0,"|>"],[1,"string-arr"],[[0,"array:slice"],[1,"i"],[[0,"+"],[1,"i"],[[0,"length"],[1,"word"]]]],[[0,"array:join"],[2,""]]],[1,"word"]],[2,1],[[0,"iterate"],[[0,"cdr"],[1,"arr"]],[[0,"+"],[1,"i"],[2,1]]]]]]],[[0,"iterate"],[1,"string-arr"],[2,0]]]]]],[[0,"let"],[1,"string:greater?"],[[0,"lambda"],[1,"L"],[1,"R"],[[0,"otherwise"],[[0,"string:equal?"],[1,"L"],[1,"R"]],[[0,"do"],[[0,"let"],[1,"A"],[[0,"cast:string->char-codes"],[[0,"type"],[1,"L"],[1,"string"]]]],[[0,"let"],[1,"B"],[[0,"cast:string->char-codes"],[[0,"type"],[1,"R"],[1,"string"]]]],[[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,"|>"],[1,"a"],[[0,"array:zip"],[1,"b"]],[[0,"array:fold"],[[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,"L"],[1,"R"],[[0,"otherwise"],[[0,"string:equal?"],[1,"L"],[1,"R"]],[[0,"do"],[[0,"let"],[1,"A"],[[0,"cast:string->char-codes"],[[0,"type"],[1,"L"],[1,"string"]]]],[[0,"let"],[1,"B"],[[0,"cast:string->char-codes"],[[0,"type"],[1,"R"],[1,"string"]]]],[[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,"|>"],[1,"a"],[[0,"array:zip"],[1,"b"]],[[0,"array:fold"],[[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,"L"],[1,"R"],[[0,"when"],[[0,"="],[[0,"length"],[1,"L"]],[[0,"length"],[1,"R"]]],[[0,"do"],[[0,"let"],[1,"a"],[[0,"cast:string->char-codes"],[1,"R"]]],[[0,"let"],[1,"b"],[[0,"cast:string->char-codes"],[1,"L"]]],[[0,"|>"],[1,"a"],[[0,"array:zip"],[1,"b"]],[[0,"array:every?"],[[0,"lambda"],[1,"x"],[[0,"="],[[0,"car"],[1,"x"]],[[0,"car"],[[0,"cdr"],[1,"x"]]]]]]]]]]],[[0,"let"],[1,"string:trim-left"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"tr"],[[0,"array"],[2,1]]],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"and"],[[0,"car"],[1,"tr"]],[[0,"string:equal?"],[1,"b"],[2," "]]],[1,"a"],[[0,"do"],[[0,"when"],[[0,"car"],[1,"tr"]],[[0,"array:set!"],[1,"tr"],[2,0],[2,0]]],[[0,"string:merge"],[1,"a"],[1,"b"]]]]],[2,""]]]]]],[[0,"let"],[1,"string:trim-right"],[[0,"lambda"],[1,"str"],[[0,"do"],[[0,"let"],[1,"tr"],[[0,"array"],[2,1]]],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:reverse"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"if"],[[0,"and"],[[0,"car"],[1,"tr"]],[[0,"string:equal?"],[1,"b"],[2," "]]],[1,"a"],[[0,"do"],[[0,"when"],[[0,"car"],[1,"tr"]],[[0,"array:set!"],[1,"tr"],[2,0],[2,0]]],[[0,"string:merge"],[1,"b"],[1,"a"]]]]],[2,""]]]]]],[[0,"let"],[1,"string:trim"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"string:trim-left"]],[[0,"string:trim-right"]]]]],[[0,"let"],[1,"string:lines"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[1,"b"],[2,"\n"]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"array:set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"array:map"],[[0,"lambda"],[1,"x"],[[0,"array:join"],[1,"x"],[2,""]]]]]]],[[0,"let"],[1,"string:words"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[1,"b"],[2," "]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"array:set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"array:map"],[[0,"lambda"],[1,"x"],[[0,"array:join"],[1,"x"],[2,""]]]]]]],[[0,"let"],[1,"string:commas"],[[0,"lambda"],[1,"str"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[1,"b"],[2,","]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"array:set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"array:map"],[[0,"lambda"],[1,"x"],[[0,"array:join"],[1,"x"],[2,""]]]]]]],[[0,"let"],[1,"string:separator"],[[0,"lambda"],[1,"str"],[1,"separator"],[[0,"|>"],[1,"str"],[[0,"type"],[1,"array"]],[[0,"array:fold"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"do"],[[0,"let"],[1,"prev"],[[0,"array:get"],[1,"a"],[2,-1]]],[[0,"if"],[[0,"string:equal?"],[1,"b"],[1,"separator"]],[[0,"array:set!"],[1,"a"],[[0,"length"],[1,"a"]],[]],[[0,"array:set!"],[1,"prev"],[[0,"length"],[1,"prev"]],[1,"b"]]],[1,"a"]]],[[0,"array"],[]]],[[0,"array:map"],[[0,"lambda"],[1,"x"],[[0,"array:join"],[1,"x"],[2,""]]]]]]],[[0,"let"],[1,"string:append"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"string:merge"],[1,"a"],[1,"b"]]]],[[0,"let"],[1,"string:prepend"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"string:merge"],[1,"b"],[1,"a"]]]],[[0,"let"],[1,"new:set"],[[0,"lambda"],[[0,"array"],[],[],[],[]]]],[[0,"let"],[1,"new:array"],[[0,"safety"],[1,"lambda"],[1,"items"],[[0,"type"],[1,"items"],[1,"array"]]]],[[0,"let"],[1,"new:list"],[[0,"safety"],[1,"lambda"],[1,"value"],[[0,"array"],[],[1,"value"],[]]]],[[0,"let"],[1,"new:binary-tree"],[[0,"safety"],[1,"lambda"],[1,"value"],[[0,"do"],[[0,"let"],[1,"arr"],[]],[[0,"array:set!"],[1,"arr"],[2,0],[1,"value"]],[[0,"array:set!"],[1,"arr"],[2,1],[]],[[0,"array:set!"],[1,"arr"],[2,2],[]],[1,"arr"]]]],[[0,"let"],[1,"binary-tree:left"],[[0,"safety"],[1,"lambda"],[1,"node"],[[0,"array:get"],[1,"node"],[2,1]]]],[[0,"let"],[1,"binary-tree:right"],[[0,"safety"],[1,"lambda"],[1,"node"],[[0,"array:get"],[1,"node"],[2,2]]]],[[0,"let"],[1,"binary-tree:left!"],[[0,"safety"],[1,"lambda"],[1,"tree"],[1,"node"],[[0,"array:set!"],[1,"tree"],[2,1],[1,"node"]]]],[[0,"let"],[1,"binary-tree:right!"],[[0,"safety"],[1,"lambda"],[1,"tree"],[1,"node"],[[0,"array:set!"],[1,"tree"],[2,2],[1,"node"]]]],[[0,"let"],[1,"binary-tree:value"],[[0,"safety"],[1,"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,"key-arr"],[[0,"type"],[[0,"type"],[1,"key"],[1,"string"]],[1,"array"]]],[[0,"let"],[1,"total"],[[0,"array"],[2,0]]],[[0,"let*"],[1,"find-hash-index"],[[0,"lambda"],[1,"i"],[1,"bounds"],[[0,"do"],[[0,"let"],[1,"letter"],[[0,"array:get"],[1,"key-arr"],[1,"i"]]],[[0,"let"],[1,"value"],[[0,"-"],[[0,"type"],[1,"letter"],[1,"char-code"]],[2,96]]],[[0,"array: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,"find-hash-index"],[[0,"+"],[1,"i"],[2,1]],[1,"bounds"]],[[0,"car"],[1,"total"]]]]]],[[0,"find-hash-index"],[2,0],[[0,"if"],[[0,"<"],[[0,"-"],[[0,"length"],[1,"key-arr"]],[2,1]],[2,100]],[[0,"-"],[[0,"length"],[1,"key-arr"]],[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,"otherwise"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"array:set!"],[1,"table"],[1,"idx"],[[0,"array"]]]],[[0,"let"],[1,"current"],[[0,"array: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,"type"],[1,"x"],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,-1]]],[[0,"let"],[1,"entry"],[1,"key"]],[[0,"if"],[[0,"="],[1,"index"],[2,-1]],[[0,"array:set!"],[1,"current"],[[0,"length"],[1,"current"]],[1,"entry"]],[[0,"array: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,"otherwise"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"array:set!"],[1,"table"],[1,"idx"],[[0,"Array"]]]],[[0,"let"],[1,"current"],[[0,"array: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,"type"],[1,"x"],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,-1]]],[[0,"let"],[1,"entry"],[1,"key"]],[[0,"otherwise"],[[0,"="],[1,"index"],[2,-1]],[[0,"and"],[[0,"array:set!"],[1,"current"],[1,"index"],[[0,"array:get"],[1,"current"],[2,-1]]],[[0,"array:set!"],[1,"current"],[2,-1]]]],[1,"table"]]]],[[0,"let"],[1,"set:has?"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"and"],[[0,"array:in-bounds?"],[1,"table"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]]],[[0,"and"],[[0,"length"],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"table"],[1,"idx"]]]],[[0,">="],[[0,"array:find-index"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"type"],[1,"x"],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,0]]]]]],[[0,"let"],[1,"set:intersection"],[[0,"lambda"],[1,"a"],[1,"b"],[[0,"|>"],[1,"b"],[[0,"cast:table->array"]],[[0,"array:fold"],[[0,"lambda"],[1,"out"],[1,"element"],[[0,"do"],[[0,"when"],[[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,"|>"],[1,"a"],[[0,"cast:table->array"]],[[0,"array:fold"],[[0,"lambda"],[1,"out"],[1,"element"],[[0,"do"],[[0,"when"],[[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,"|>"],[1,"a"],[[0,"cast:table->array"]],[[0,"array:for"],[[0,"lambda"],[1,"element"],[[0,"when"],[[0,"not"],[[0,"set:has?"],[1,"b"],[1,"element"]]],[[0,"set:add!"],[1,"out"],[1,"element"]]]]]],[[0,"|>"],[1,"b"],[[0,"cast:table->array"]],[[0,"array:for"],[[0,"lambda"],[1,"element"],[[0,"when"],[[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,"|>"],[1,"a"],[[0,"cast:table->array"]],[[0,"array:for"],[[0,"lambda"],[1,"element"],[[0,"set:add!"],[1,"out"],[1,"element"]]]]],[[0,"|>"],[1,"b"],[[0,"cast:table->array"]],[[0,"array:for"],[[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,"otherwise"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"array:set!"],[1,"table"],[1,"idx"],[]]],[[0,"let"],[1,"current"],[[0,"array: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,"type"],[[0,"car"],[1,"x"]],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,-1]]],[[0,"let"],[1,"entry"],[[0,"array"],[1,"key"],[1,"value"]]],[[0,"if"],[[0,"="],[1,"index"],[2,-1]],[[0,"array:set!"],[1,"current"],[[0,"length"],[1,"current"]],[1,"entry"]],[[0,"array: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,"otherwise"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"array:set!"],[1,"table"],[1,"idx"],[]]],[[0,"let"],[1,"current"],[[0,"array: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,"type"],[[0,"car"],[1,"x"]],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,-1]]],[[0,"otherwise"],[[0,"="],[1,"index"],[2,-1]],[[0,"and"],[[0,"array:set!"],[1,"current"],[1,"index"],[[0,"array:get"],[1,"current"],[2,-1]]],[[0,"array: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,"when"],[[0,"array:in-bounds?"],[1,"table"],[1,"idx"]],[[0,"do"],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"table"],[1,"idx"]]],[[0,"let"],[1,"found"],[[0,"array:find"],[1,"current"],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"type"],[1,"key"],[1,"string"]],[[0,"type"],[[0,"array:get"],[1,"x"],[2,0]],[1,"string"]]]]]],[[0,"when"],[[0,"length"],[1,"found"]],[[0,"array:get"],[1,"found"],[2,1]]]]]]]],[[0,"let"],[1,"map:has?"],[[0,"lambda"],[1,"table"],[1,"key"],[[0,"and"],[[0,"array:in-bounds?"],[1,"table"],[[0,"let"],[1,"idx"],[[0,"set:index"],[1,"table"],[1,"key"]]]],[[0,"and"],[[0,"length"],[[0,"let"],[1,"current"],[[0,"array:get"],[1,"table"],[1,"idx"]]]],[[0,">="],[[0,"array:find-index"],[[0,"car"],[1,"current"]],[[0,"lambda"],[1,"x"],[[0,"string:equal?"],[[0,"type"],[1,"x"],[1,"string"]],[[0,"type"],[1,"key"],[1,"string"]]]]],[2,0]]]]]],[[0,"let"],[1,"list:prev!"],[[0,"safety"],[1,"lambda"],[1,"list"],[1,"node"],[[0,"array:set!"],[1,"list"],[2,0],[[0,"array:set!"],[1,"node"],[2,2],[1,"list"]]]]],[[0,"let"],[1,"list:next!"],[[0,"safety"],[1,"lambda"],[1,"list"],[1,"node"],[[0,"array:set!"],[1,"list"],[2,2],[[0,"array:set!"],[1,"node"],[2,0],[1,"list"]]]]],[[0,"let"],[1,"list:prev"],[[0,"safety"],[1,"lambda"],[1,"list"],[[0,"array:get"],[1,"list"],[2,0]]]],[[0,"let"],[1,"list:next"],[[0,"safety"],[1,"lambda"],[1,"list"],[[0,"array:get"],[1,"list"],[2,2]]]],[[0,"let"],[1,"list:value"],[[0,"lambda"],[1,"node"],[[0,"array:get"],[1,"node"],[2,1]]]],[[0,"let"],[1,"var:def"],[[0,"safety"],[1,"lambda"],[1,"val"],[[0,"array"],[1,"val"]]]],[[0,"let"],[1,"var:get"],[[0,"safety"],[1,"lambda"],[1,"variable"],[[0,"car"],[1,"variable"]]]],[[0,"let"],[1,"var:set!"],[[0,"safety"],[1,"lambda"],[1,"variable"],[1,"value"],[[0,"array:set!"],[1,"variable"],[2,0],[1,"value"]]]],[[0,"let"],[1,"var:del!"],[[0,"safety"],[1,"lambda"],[1,"variable"],[[0,"array:set!"],[1,"variable"],[2,-1]]]],[[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,"array:get"],[1,"q"],[2,0]]],[2,1]],[2,-1]]]],[[0,"let"],[1,"brray:offset-right"],[[0,"lambda"],[1,"q"],[[0,"length"],[[0,"array:get"],[1,"q"],[2,1]]]]],[[0,"let"],[1,"brray:length"],[[0,"lambda"],[1,"q"],[[0,"+"],[[0,"length"],[[0,"array:get"],[1,"q"],[2,0]]],[[0,"length"],[[0,"array: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,"array:set!"],[1,"q"],[2,0],[[0,"array"],[]]],[[0,"array: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,"array:get"],[[0,"array:get"],[1,"q"],[2,1]],[1,"index"]],[[0,"array:get"],[[0,"array: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,"offset"],[[0,"brray:offset-left"],[1,"q"]]]],[[0,"if"],[[0,">="],[1,"offset"],[2,0]],[[0,"array:set!"],[[0,"array:get"],[1,"q"],[2,1]],[1,"offset"],[1,"value"]],[[0,"array:set!"],[[0,"array: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,"array:set!"],[[0,"let"],[1,"c"],[[0,"array: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,"array:set!"],[[0,"let"],[1,"c"],[[0,"array: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,"when"],[1,"len"],[[0,"cond"],[[0,"="],[1,"len"],[2,1]],[[0,"brray:empty!"],[1,"q"]],[[0,">"],[[0,"length"],[[0,"array:get"],[1,"q"],[2,0]]],[2,0]],[[0,"array:set!"],[[0,"array: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,"when"],[1,"len"],[[0,"cond"],[[0,"="],[1,"len"],[2,1]],[[0,"brray:empty!"],[1,"q"]],[[0,">"],[[0,"length"],[[0,"array:get"],[1,"q"],[2,1]]],[2,0]],[[0,"array:set!"],[[0,"array:get"],[1,"q"],[2,1]],[2,-1]]]]]]],[[0,"let"],[1,"brray:iter"],[[0,"lambda"],[1,"q"],[1,"callback"],[[0,"do"],[[0,"let*"],[1,"iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]],[[0,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"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,"left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"result"],[[0,"callback"],[[0,"brray:get"],[1,"q"],[1,"index"]]]],[[0,"when"],[[0,">"],[1,"index"],[2,0]],[[0,"left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let*"],[1,"rigth"],[[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,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rigth"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rigth"],[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,"do"],[[0,"let"],[1,"initial"],[[0,"cast: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,"left"],[[0,"lambda"],[1,"index"],[[0,"do"],[[0,"brray:add-to-left!"],[1,"q"],[[0,"array:get"],[1,"initial"],[1,"index"]]],[[0,"when"],[[0,">"],[1,"index"],[2,0]],[[0,"left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let*"],[1,"rigth"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"brray:add-to-right!"],[1,"q"],[[0,"array:get"],[1,"initial"],[1,"index"]]],[[0,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rigth"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rigth"],[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,"when"],[[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,"when"],[[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,"iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"when"],[[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,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"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,"iter"],[[0,"lambda"],[1,"index"],[1,"bounds"],[[0,"do"],[[0,"when"],[[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,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"iter"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"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,"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,"when"],[[0,">"],[1,"index"],[2,0]],[[0,"left"],[[0,"-"],[1,"index"],[2,1]]]]]]],[[0,"left"],[[0,"-"],[1,"half"],[2,1]]],[[0,"let*"],[1,"rigth"],[[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,"when"],[[0,"<"],[1,"index"],[1,"bounds"]],[[0,"rigth"],[[0,"+"],[1,"index"],[2,1]],[1,"bounds"]]]]]],[[0,"rigth"],[1,"half"],[[0,"-"],[1,"slice-len"],[2,1]]],[1,"slice"]]]],[[0,"let"],[1,"date:add-seconds"],[[0,"lambda"],[1,"date-time"],[1,"seconds"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"seconds"],[2,1000]]]]],[[0,"let"],[1,"date:add-minutes"],[[0,"lambda"],[1,"date-time"],[1,"minutes"],[[0,"+"],[1,"date-time"],[[0,"*"],[1,"minutes"],[2,1000],[2,60]]]]],[[0,"let"],[1,"date: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,"date: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,"date: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,"date: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,"date:sub-seconds"],[[0,"lambda"],[1,"date-time"],[1,"seconds"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"seconds"],[2,1000]]]]],[[0,"let"],[1,"date:sub-minutes"],[[0,"lambda"],[1,"date-time"],[1,"minutes"],[[0,"-"],[1,"date-time"],[[0,"*"],[1,"minutes"],[2,1000],[2,60]]]]],[[0,"let"],[1,"date: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,"date: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,"date: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,"date: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]]]]]]
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "fez-lisp",
3
3
  "description": "Lisp interpreted & compiled to JavaScript",
4
4
  "author": "AT290690",
5
- "version": "1.0.41",
5
+ "version": "1.0.43",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/compiler.js CHANGED
@@ -39,7 +39,7 @@ const Helpers = {
39
39
  }`,
40
40
  logEffect: `logEffect=(msg)=>{console.log(msg);return msg}`,
41
41
  clearEffect: `clearEffect=()=>{console.clear();return 0}`,
42
- array_merge: `array_merge=(...arrays)=>arrays.reduce((a,b)=>a.concat(b),[])`,
42
+ array_cons: `array_cons=(a,b)=>a.concat(b)`,
43
43
  car: 'car=(arr)=>arr.at(0)',
44
44
  cdr: 'cdr=(arr)=>arr.slice(1)',
45
45
  array_get: 'array_get=(arr,i)=>arr.at(i)',
@@ -192,9 +192,9 @@ const compile = (tree, Drill) => {
192
192
  Arguments[1],
193
193
  Drill
194
194
  )});`
195
- case KEYWORDS.MERGE:
196
- Drill.Helpers.add('array_merge')
197
- return `array_merge(${parseArgs(Arguments, Drill)});`
195
+ case KEYWORDS.CONS:
196
+ Drill.Helpers.add('array_cons')
197
+ return `array_cons(${parseArgs(Arguments, Drill)});`
198
198
  case KEYWORDS.ANONYMOUS_FUNCTION: {
199
199
  const functionArgs = Arguments
200
200
  const body = Arguments.pop()
package/src/enums.js CHANGED
@@ -45,7 +45,7 @@ export const KEYWORDS = {
45
45
 
46
46
  BLOCK: 'do',
47
47
 
48
- MERGE: 'array:merge',
48
+ CONS: 'cons',
49
49
  ANONYMOUS_FUNCTION: 'lambda',
50
50
 
51
51
  IF: 'if',
package/src/parser.js CHANGED
@@ -1,5 +1,5 @@
1
- import { APPLY, ATOM, WORD } from './enums.js'
2
- import { escape } from './utils.js'
1
+ import { APPLY, ATOM, TYPE, WORD, VALUE } from './enums.js'
2
+ import { escape, preserveEscape } from './utils.js'
3
3
  export const leaf = (type, value) => [type, value]
4
4
  export const isLeaf = ([car]) => car === APPLY || car === ATOM || car === WORD
5
5
  export const LISP = {
@@ -39,21 +39,44 @@ export const LISP = {
39
39
  }
40
40
  return tree
41
41
  },
42
- stringify: (ast) => {
43
- if (ast == undefined) return '()'
44
- else if (typeof ast === 'object')
45
- if (Array.isArray(ast))
46
- return ast.length
47
- ? `(array ${ast.map(LISP.stringify).join(' ')})`
42
+ stringify: (array) => {
43
+ if (array == undefined) return '()'
44
+ else if (typeof array === 'object')
45
+ if (Array.isArray(array))
46
+ return array.length
47
+ ? `(array ${array.map(LISP.stringify).join(' ')})`
48
48
  : '()'
49
49
  else
50
- return `(array ${ast
50
+ return `(array ${array
51
51
  .map(([key, value]) => `("${key}" ${LISP.stringify(value)})`)
52
52
  .join(' ')})`
53
- else if (typeof ast === 'string') return `"${ast}"`
54
- else if (typeof ast === 'function') return '()'
55
- else if (typeof ast === 'boolean') return +ast
56
- else return ast
53
+ else if (typeof array === 'string') return `"${array}"`
54
+ else if (typeof array === 'function') return '()'
55
+ else if (typeof array === 'boolean') return +array
56
+ else return array
57
+ },
58
+ source: (ast) => {
59
+ const dfs = (exp) => {
60
+ let out = ''
61
+ const [first, ...rest] = isLeaf(exp) ? [exp] : exp
62
+ if (first == undefined) return (out += '()')
63
+ switch (first[TYPE]) {
64
+ case WORD:
65
+ out += first[VALUE]
66
+ break
67
+ case ATOM:
68
+ out +=
69
+ typeof first[VALUE] === 'string'
70
+ ? `"${preserveEscape(first[VALUE])}"`
71
+ : first[VALUE]
72
+ break
73
+ case APPLY:
74
+ out += `(${first[VALUE]} ${rest.map(dfs).join(' ')})`
75
+ break
76
+ }
77
+ return out
78
+ }
79
+ return ast.map(dfs).join(' ')
57
80
  }
58
81
  }
59
82
  export const AST = {
@@ -94,6 +117,6 @@ export const AST = {
94
117
  typeof ast === 'object'
95
118
  ? `[${ast.map(AST.stringify).join(',')}]`
96
119
  : typeof ast === 'string'
97
- ? `"${ast}"`
120
+ ? `"${preserveEscape(ast)}"`
98
121
  : ast
99
122
  }
package/src/tokeniser.js CHANGED
@@ -904,6 +904,29 @@ const keywords = {
904
904
  )
905
905
  return arrays.reduce((a, b) => a.concat(b), [])
906
906
  },
907
+ [KEYWORDS.CONS]: (args, env) => {
908
+ if (args.length !== 2)
909
+ throw new RangeError(
910
+ `Invalid number of arguments to (${KEYWORDS.CONS}) (= 2 required). (${
911
+ KEYWORDS.CONS
912
+ } ${stringifyArgs(args)})`
913
+ )
914
+ const array = evaluate(args[0], env)
915
+ if (!Array.isArray(array))
916
+ throw new TypeError(
917
+ `First Argument of (${KEYWORDS.CONS}) must be (${
918
+ KEYWORDS.ARRAY_TYPE
919
+ }) (${KEYWORDS.CONS} ${stringifyArgs(args)})`
920
+ )
921
+ const other = evaluate(args[1], env)
922
+ if (!Array.isArray(other))
923
+ throw new TypeError(
924
+ `Second Argument of (${KEYWORDS.CONS}) must be (${
925
+ KEYWORDS.ARRAY_TYPE
926
+ }) (${KEYWORDS.CONS} ${stringifyArgs(args)})`
927
+ )
928
+ return array.concat(other)
929
+ },
907
930
  [KEYWORDS.IMMUTABLE_FUNCTION]: (args, env) => {
908
931
  if (!args.length)
909
932
  throw new RangeError(
package/src/utils.js CHANGED
@@ -39,6 +39,15 @@ export const escape = (Char) => {
39
39
  return ''
40
40
  }
41
41
  }
42
+ const escapeChars = {
43
+ '\n': '\\n',
44
+ '\r': '\\r',
45
+ '\t': '\\t',
46
+ s: '\\s',
47
+ '"': '\\"'
48
+ }
49
+ export const preserveEscape = (str) =>
50
+ str.replace(/[\n\r\t\s\"]/g, (match) => escapeChars[match] || match)
42
51
  export const stringifyType = (type) =>
43
52
  !isLeaf(type)
44
53
  ? `(array ${type.map((t) => stringifyType(t)).join(' ')})`