fez-lisp 1.0.26 → 1.0.28

Sign up to get free protection for your applications and to get access to all the features.
package/lib/baked/std.js CHANGED
@@ -1 +1 @@
1
- export default [[["f","let"],["w","math:E"],["a",2.718281828459045]],[["f","let"],["w","math:PI"],["a",3.141592653589793]],[["f","let*"],["w","array:for"],[["f","lambda"],["w","arr"],["w","callback"],[["f","when"],[["f","length"],["w","arr"]],[["f","do"],[["f","callback"],[["f","car"],["w","arr"]]],[["f","array:for"],[["f","cdr"],["w","arr"]],["w","callback"]]]]]],[["f","let"],["w","array:map"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","array:merge!"],["w","out"],[["f","array"],[["f","callback"],[["f","car"],["w","arr"]]]]]],["w","out"]]]],[["f","iterate"],["w","arr"],[]]]]],[["f","let"],["w","array:select"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","if"],[["f","callback"],[["f","car"],["w","arr"]]],[["f","array:merge!"],["w","out"],[["f","array"],[["f","car"],["w","arr"]]]],["w","out"]]],["w","out"]]]],[["f","iterate"],["w","arr"],[]]]]],[["f","let"],["w","array:exclude"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","if"],[["f","not"],[["f","callback"],[["f","car"],["w","arr"]]]],[["f","array:merge!"],["w","out"],[["f","array"],[["f","car"],["w","arr"]]]],["w","out"]]],["w","out"]]]],[["f","iterate"],["w","arr"],[]]]]],[["f","let"],["w","array:fold"],[["f","lambda"],["w","arr"],["w","callback"],["w","initial"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","callback"],["w","out"],[["f","car"],["w","arr"]]]],["w","out"]]]],[["f","iterate"],["w","arr"],["w","initial"]]]]],[["f","let"],["w","array:every?"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],[["f","if"],[["f","and"],[["f","length"],["w","arr"]],[["f","callback"],[["f","car"],["w","arr"]]]],[["f","iterate"],[["f","cdr"],["w","arr"]]],[["f","not"],[["f","length"],["w","arr"]]]]]],[["f","iterate"],["w","arr"]]]]],[["f","let"],["w","array:some?"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],[["f","if"],[["f","and"],[["f","length"],["w","arr"]],[["f","not"],[["f","callback"],[["f","car"],["w","arr"]]]]],[["f","iterate"],[["f","cdr"],["w","arr"]]],[["f","type"],[["f","length"],["w","arr"]],["w","boolean"]]]]],[["f","iterate"],["w","arr"]]]]],[["f","let"],["w","array:find"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","callback"],[["f","car"],["w","arr"]]],[["f","car"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]]]],[]]]],[["f","iterate"],["w","arr"]]]]],[["f","let"],["w","array:has?"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],[["f","when"],[["f","length"],["w","arr"]],[["f","if"],[["f","callback"],[["f","car"],["w","arr"]]],["a",1],[["f","iterate"],[["f","cdr"],["w","arr"]]]]]]],[["f","iterate"],["w","arr"]]]]],[["f","let"],["w","array:reverse"],[["f","lambda"],["w","arr"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","array:merge!"],[["f","array"],[["f","car"],["w","arr"]]],["w","out"]]],["w","out"]]]],[["f","iterate"],["w","arr"],[]]]]],[["f","let"],["w","math:range"],[["f","lambda"],["w","start"],["w","end"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","out"],["w","count"],[["f","if"],[["f","<="],["w","count"],["w","end"]],[["f","iterate"],[["f","array:merge!"],["w","out"],[["f","array"],["w","count"]]],[["f","+"],["w","count"],["a",1]]],["w","out"]]]],[["f","iterate"],[],["w","start"]]]]],[["f","let"],["w","math:sequence"],[["f","lambda"],["w","arr"],[["f","do"],[["f","let"],["w","end"],[["f","length"],["w","arr"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","out"],["w","count"],[["f","if"],[["f","<"],[["f","length"],["w","out"]],["w","end"]],[["f","iterate"],[["f","array:merge!"],["w","out"],[["f","array"],["w","count"]]],[["f","+"],["w","count"],["a",1]]],["w","out"]]]],[["f","iterate"],[],["a",0]]]]],[["f","let"],["w","math:sequence-n"],[["f","lambda"],["w","n"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","out"],["w","count"],[["f","if"],[["f","<"],[["f","length"],["w","out"]],["w","n"]],[["f","iterate"],[["f","array:merge!"],["w","out"],[["f","array"],["w","count"]]],[["f","+"],["w","count"],["a",1]]],["w","out"]]]],[["f","iterate"],[],["a",0]]]]],[["f","let"],["w","array:unique"],[["f","lambda"],["w","arr"],[["f","pi"],[["f","let"],["w","sorted"],[["f","array:sort"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f",">"],["w","a"],["w","b"]]]]],[["f","array:zip"],[["f","math:sequence"],["w","sorted"]]],[["f","array:select"],[["f","lambda"],["w","x"],[["f","or"],[["f","not"],[["f","let"],["w","index"],[["f","car"],[["f","cdr"],["w","x"]]]]],[["f","not"],[["f","="],[["f","array:get"],["w","sorted"],[["f","-"],["w","index"],["a",1]]],[["f","array:get"],["w","sorted"],["w","index"]]]]]]],[["f","array:map"],["w","car"]]]]],[["f","let"],["w","array:for-range"],[["f","lambda"],["w","start"],["w","end"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],[["f","when"],[["f","<"],["w","i"],["w","end"]],[["f","do"],[["f","callback"],["w","i"]],[["f","iterate"],[["f","+"],["w","i"],["a",1]]]]]]],[["f","iterate"],["w","start"]]]]],[["f","let"],["w","array:traverse"],[["f","lambda"],["w","x"],["w","callback"],[["f","if"],[["f","atom?"],["w","x"]],[["f","callback"],["w","x"]],[["f","iterate"],["w","x"],[["f","lambda"],["w","y"],[["f","array:traverse"],["w","y"],["w","callback"]]]]]]],[["f","let"],["w","math:summation"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","+"],["w","a"],["w","b"]]],[["f","+"]]]]],[["f","let"],["w","math:product"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","*"],["w","a"],["w","b"]]],[["f","*"]]]]],[["f","let"],["w","math:maximum"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],["w","a"],["w","b"]],["w","a"],["w","b"]]],[["f","car"],["w","arr"]]]]],[["f","let"],["w","math:minimum"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","if"],[["f","<"],["w","a"],["w","b"]],["w","a"],["w","b"]]],[["f","car"],["w","arr"]]]]],[["f","let"],["w","math:max"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],["w","a"],["w","b"]],["w","a"],["w","b"]]]],[["f","let"],["w","math:min"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f","<"],["w","a"],["w","b"]],["w","a"],["w","b"]]]],[["f","let"],["w","array:count-of"],[["f","lambda"],["w","arr"],["w","callback"],[["f","pi"],["w","arr"],[["f","array:select"],["w","callback"]],[["f","length"]]]]],[["f","let"],["w","math:increment"],[["f","safety"],["w","lambda"],["w","i"],[["f","+"],["w","i"],["a",1]]]],[["f","let"],["w","math:floor"],[["f","safety"],["w","lambda"],["w","n"],[["f","|"],["w","n"],["a",0]]]],[["f","let"],["w","math:round"],[["f","safety"],["w","lambda"],["w","n"],[["f","|"],[["f","+"],["w","n"],["a",0.5]],["a",0]]]],[["f","let"],["w","array:empty?"],[["f","safety"],["w","lambda"],["w","arr"],[["f","not"],[["f","length"],["w","arr"]]]]],[["f","let"],["w","array:empty!"],[["f","safety"],["w","lambda"],["w","arr"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],[["f","if"],[["f","length"],["w","arr"]],[["f","do"],[["f","array:set!"],["w","arr"],["a",-1]],[["f","iterate"]]],["w","arr"]]]],[["f","iterate"]]]]],[["f","let"],["w","array:in-bounds?"],[["f","safety"],["w","lambda"],["w","arr"],["w","index"],[["f","and"],[["f","<"],["w","index"],[["f","length"],["w","arr"]]],[["f",">="],["w","index"],["a",0]]]]],[["f","let"],["w","math:largest-power"],[["f","safety"],["w","lambda"],["w","N"],[["f","do"],[["f","let"],["w","N1"],[["f","|"],["w","N"],[["f",">>"],["w","N"],["a",1]]]],[["f","let"],["w","N2"],[["f","|"],["w","N1"],[["f",">>"],["w","N1"],["a",2]]]],[["f","let"],["w","N3"],[["f","|"],["w","N2"],[["f",">>"],["w","N2"],["a",4]]]],[["f","let"],["w","N4"],[["f","|"],["w","N3"],[["f",">>"],["w","N3"],["a",8]]]],[["f",">>"],[["f","+"],["w","N4"],["a",1]],["a",1]]]]],[["f","let"],["w","math:set-bit"],[["f","safety"],["w","lambda"],["w","n"],["w","bit"],[["f","|"],["w","n"],[["f","<<"],["a",1],["w","bit"]]]]],[["f","let"],["w","math:clear-bit"],[["f","safety"],["w","lambda"],["w","n"],["w","bit"],[["f","&"],["w","n"],[["f","~"],[["f","<<"],["a",1],["w","bit"]]]]]],[["f","let"],["w","math:odd-bit?"],[["f","safety"],["w","lambda"],["w","n"],[["f","="],[["f","&"],["w","n"],["a",1]],["a",1]]]],[["f","let"],["w","math:average-bit"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f",">>"],[["f","+"],["w","a"],["w","b"]],["a",1]]]],[["f","let"],["w","math:toggle-bit"],[["f","safety"],["w","lambda"],["w","n"],["w","a"],["w","b"],[["f","^"],["w","a"],["w","b"],["w","n"]]]],[["f","let"],["w","math:same-sign-bit?"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f",">="],[["f","^"],["w","a"],["w","b"]],["a",0]]]],[["f","let"],["w","math:max-bit"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","-"],["w","a"],[["f","&"],[["f","-"],["w","a"],["w","b"]],[["f",">>"],[["f","-"],["w","a"],["w","b"]],["a",31]]]]]],[["f","let"],["w","math:min-bit"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","-"],["w","a"],[["f","&"],[["f","-"],["w","a"],["w","b"]],[["f",">>"],[["f","-"],["w","b"],["w","a"]],["a",31]]]]]],[["f","let"],["w","math:modulo-bit"],[["f","safety"],["w","lambda"],["w","numerator"],["w","divisor"],[["f","&"],["w","numerator"],[["f","-"],["w","divisor"],["a",1]]]]],[["f","let"],["w","math:n-one-bit?"],[["f","safety"],["w","lambda"],["w","N"],["w","nth"],[["f","type"],[["f","&"],["w","N"],[["f","<<"],["a",1],["w","nth"]]],["w","boolean"]]]],[["f","let"],["w","cast:string->chars"],[["f","safety"],["w","lambda"],["w","str"],[["f","type"],["w","str"],["w","array"]]]],[["f","let"],["w","cast:chars->string"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","x"],[["f","string:merge"],["w","a"],[["f","type"],["w","x"],["w","string"]]]],["a",""]]]],[["f","let"],["w","cast:string->number"],[["f","safety"],["w","lambda"],["w","str"],[["f","type"],["w","str"],["w","number"]]]],[["f","let"],["w","cast:number->string"],[["f","safety"],["w","lambda"],["w","n"],[["f","type"],["w","n"],["w","string"]]]],[["f","let"],["w","cast:strings->numbers"],[["f","lambda"],["w","arr"],[["f","array:map"],["w","arr"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","number"]]]]]],[["f","let"],["w","cast:numbers->strings"],[["f","lambda"],["w","arr"],[["f","array:map"],["w","arr"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","string"]]]]]],[["f","let"],["w","cast:string->char-codes"],[["f","lambda"],["w","str"],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","char-code"]]]]]]],[["f","let"],["w","cast:chars->char-codes"],[["f","lambda"],["w","arr"],[["f","pi"],["w","arr"],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","char-code"]]]]]]],[["f","let"],["w","cast:chars->numbers"],[["f","lambda"],["w","arr"],[["f","pi"],["w","arr"],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","number"]]]]]]],[["f","let"],["w","cast:char->number"],[["f","safety"],["w","lambda"],["w","ch"],[["f","type"],["w","ch"],["w","number"]]]],[["f","let"],["w","cast:char->char-code"],[["f","safety"],["w","lambda"],["w","ch"],[["f","type"],["w","ch"],["w","char-code"]]]],[["f","let"],["w","cast:char-code->char"],[["f","safety"],["w","lambda"],["w","ch"],[["f","type"],["w","ch"],["w","char"]]]],[["f","let"],["w","cast:char-codes->chars"],[["f","lambda"],["w","arr"],[["f","pi"],["w","arr"],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","char"]]]]]]],[["f","let"],["w","cast:char-codes->string"],[["f","lambda"],["w","arr"],[["f","pi"],["w","arr"],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","char"]]]],[["f","cast:chars->string"]]]]],[["f","let"],["w","math:square"],[["f","safety"],["w","lambda"],["w","x"],[["f","*"],["w","x"],["w","x"]]]],[["f","let"],["w","math:power"],[["f","lambda"],["w","base"],["w","exp"],[["f","if"],[["f","<"],["w","exp"],["a",0]],[["f","if"],[["f","="],["w","base"],["a",0]],[["f","throw"],["a","Attempting to divide by 0 in (math:power)"]],[["f","/"],[["f","*"],["w","base"],[["f","math:power"],["w","base"],[["f","-"],[["f","*"],["w","exp"],["a",-1]],["a",1]]]]]],[["f","cond"],[["f","="],["w","exp"],["a",0]],["a",1],[["f","="],["w","exp"],["a",1]],["w","base"],[["f","*"]],[["f","*"],["w","base"],[["f","math:power"],["w","base"],[["f","-"],["w","exp"],["a",1]]]]]]]],[["f","let"],["w","math:greatest-common-divisor"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let*"],["w","gcd"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f","="],["w","b"],["a",0]],["w","a"],[["f","gcd"],["w","b"],[["f","mod"],["w","a"],["w","b"]]]]]],[["f","gcd"],["w","a"],["w","b"]]]]],[["f","let"],["w","math:least-common-divisor"],[["f","lambda"],["w","a"],["w","b"],[["f","*"],["w","a"],["w","b"],[["f","/"],[["f","math:greatest-common-divisor"],["w","a"],["w","b"]]]]]],[["f","let"],["w","math:sqrt"],[["f","lambda"],["w","x"],[["f","do"],[["f","let"],["w","is-good-enough"],[["f","lambda"],["w","g"],["w","x"],[["f","<"],[["f","math:abs"],[["f","-"],[["f","math:square"],["w","g"]],["w","x"]]],["a",0.01]]]],[["f","let"],["w","improve-guess"],[["f","lambda"],["w","g"],["w","x"],[["f","math:average"],["w","g"],[["f","*"],["w","x"],[["f","/"],["w","g"]]]]]],[["f","let*"],["w","math:sqrt-iter"],[["f","lambda"],["w","g"],["w","x"],[["f","if"],[["f","is-good-enough"],["w","g"],["w","x"]],["w","g"],[["f","math:sqrt-iter"],[["f","improve-guess"],["w","g"],["w","x"]],["w","x"]]]]],[["f","math:sqrt-iter"],["a",1],["w","x"]]]]],[["f","let"],["w","math:circumference"],[["f","lambda"],["w","radius"],[["f","*"],["w","math:PI"],[["f","*"],["w","radius"],["a",2]]]]],[["f","let"],["w","math:hypotenuse"],[["f","lambda"],["w","a"],["w","b"],[["f","math:sqrt"],[["f","+"],[["f","*"],["w","a"],["w","a"]],[["f","*"],["w","b"],["w","b"]]]]]],[["f","let"],["w","math:abs"],[["f","safety"],["w","lambda"],["w","n"],[["f","-"],[["f","^"],["w","n"],[["f",">>"],["w","n"],["a",31]]],[["f",">>"],["w","n"],["a",31]]]]],[["f","let"],["w","math:nth-digit"],[["f","lambda"],["w","digit"],["w","n"],[["f","|"],[["f","mod"],[["f","/"],["w","digit"],[["f","math:power"],["a",10],[["f","-"],["w","n"],["a",1]]]],["a",10]],["a",0.5]]]],[["f","let"],["w","math:normalize"],[["f","safety"],["w","lambda"],["w","value"],["w","math:min"],["w","math:max"],[["f","*"],[["f","-"],["w","value"],["w","math:min"]],[["f","/"],[["f","-"],["w","math:max"],["w","math:min"]]]]]],[["f","let"],["w","math:linear-interpolation"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],["w","n"],[["f","+"],[["f","*"],[["f","-"],["a",1],["w","n"]],["w","a"]],[["f","*"],["w","n"],["w","b"]]]]],[["f","let"],["w","math:gauss-sum"],[["f","safety"],["w","lambda"],["w","n"],[["f","*"],["w","n"],[["f","+"],["w","n"],["a",1]],["a",0.5]]]],[["f","let"],["w","math:gauss-sum-sequance"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","*"],[["f","+"],["w","a"],["w","b"]],[["f","+"],[["f","-"],["w","b"],["w","a"]],["a",1]],["a",0.5]]]],[["f","let"],["w","math:clamp"],[["f","safety"],["w","lambda"],["w","x"],["w","limit"],[["f","if"],[["f",">"],["w","x"],["w","limit"]],["w","limit"],["w","x"]]]],[["f","let"],["w","math:odd?"],[["f","safety"],["w","lambda"],["w","x"],[["f","="],[["f","mod"],["w","x"],["a",2]],["a",1]]]],[["f","let"],["w","math:even?"],[["f","safety"],["w","lambda"],["w","x"],[["f","="],[["f","mod"],["w","x"],["a",2]],["a",0]]]],[["f","let"],["w","math:sign"],[["f","safety"],["w","lambda"],["w","n"],[["f","if"],[["f","<"],["w","n"],["a",0]],["a",-1],["a",1]]]],[["f","let"],["w","math:radians"],[["f","lambda"],["w","deg"],[["f","*"],["w","deg"],["w","math:PI"],[["f","/"],["a",180]]]]],[["f","let"],["w","math:average"],[["f","safety"],["w","lambda"],["w","x"],["w","y"],[["f","*"],[["f","+"],["w","x"],["w","y"]],["a",0.5]]]],[["f","let"],["w","math:euclidean-mod"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","mod"],[["f","+"],[["f","mod"],["w","a"],["w","b"]],["w","b"]],["w","b"]]]],[["f","let"],["w","math:euclidean-distance"],[["f","lambda"],["w","x1"],["w","y1"],["w","x2"],["w","y2"],[["f","do"],[["f","let"],["w","a"],[["f","-"],["w","x1"],["w","x2"]]],[["f","let"],["w","b"],[["f","-"],["w","y1"],["w","y2"]]],[["f","math:sqrt"],[["f","+"],[["f","*"],["w","a"],["w","a"]],[["f","*"],["w","b"],["w","b"]]]]]]],[["f","let"],["w","math:manhattan-distance"],[["f","lambda"],["w","x1"],["w","y1"],["w","x2"],["w","y2"],[["f","+"],[["f","math:abs"],[["f","-"],["w","x2"],["w","x1"]]],[["f","math:abs"],[["f","-"],["w","y2"],["w","y1"]]]]]],[["f","let"],["w","math:positive?"],[["f","safety"],["w","lambda"],["w","num"],[["f",">"],["w","num"],["a",0]]]],[["f","let"],["w","math:negative?"],[["f","safety"],["w","lambda"],["w","num"],[["f","<"],["w","num"],["a",0]]]],[["f","let"],["w","math:zero?"],[["f","safety"],["w","lambda"],["w","num"],[["f","="],["w","num"],["a",0]]]],[["f","let"],["w","math:divisible?"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","="],[["f","mod"],["w","a"],["w","b"]],["a",0]]]],[["f","let"],["w","math:ascending?"],[["f","lambda"],["w","a"],["w","b"],[["f",">"],["w","a"],["w","b"]]]],[["f","let"],["w","math:descending?"],[["f","lambda"],["w","a"],["w","b"],[["f","<"],["w","a"],["w","b"]]]],[["f","let"],["w","math:prime?"],[["f","lambda"],["w","n"],[["f","cond"],[["f","="],["w","n"],["a",1]],["a",0],[["f","<"],["w","n"],["a",0]],["a",0],[["f","*"]],[["f","do"],[["f","let*"],["w","iter"],[["f","lambda"],["w","i"],["w","end"],[["f","do"],[["f","let"],["w","is-prime"],[["f","not"],[["f","="],[["f","mod"],["w","n"],["w","i"]],["a",0]]]],[["f","if"],[["f","and"],[["f","<="],["w","i"],["w","end"]],["w","is-prime"]],[["f","iter"],[["f","+"],["w","i"],["a",1]],["w","end"]],["w","is-prime"]]]]],[["f","or"],[["f","="],["w","n"],["a",2]],[["f","iter"],["a",2],[["f","math:sqrt"],["w","n"]]]]]]]],[["f","let"],["w","array:slice"],[["f","lambda"],["w","arr"],["w","start"],["w","end"],[["f","do"],[["f","let"],["w","bounds"],[["f","-"],["w","end"],["w","start"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],["w","out"],[["f","if"],[["f","<"],["w","i"],["w","bounds"]],[["f","iterate"],[["f","+"],["w","i"],["a",1]],[["f","array:merge!"],["w","out"],[["f","array"],[["f","array:get"],["w","arr"],[["f","+"],["w","start"],["w","i"]]]]]],["w","out"]]]],[["f","iterate"],["a",0],[]]]]],[["f","let"],["w","array:binary-search"],[["f","lambda"],["w","arr"],["w","target"],[["f","do"],[["f","let*"],["w","search"],[["f","lambda"],["w","arr"],["w","target"],["w","start"],["w","end"],[["f","do"],[["f","when"],[["f","<="],["w","start"],["w","end"]],[["f","do"],[["f","let"],["w","index"],[["f","math:floor"],[["f","*"],[["f","+"],["w","start"],["w","end"]],["a",0.5]]]],[["f","let"],["w","current"],[["f","array:get"],["w","arr"],["w","index"]]],[["f","if"],[["f","="],["w","target"],["w","current"]],["w","target"],[["f","if"],[["f",">"],["w","current"],["w","target"]],[["f","search"],["w","arr"],["w","target"],["w","start"],[["f","-"],["w","index"],["a",1]]],[["f","search"],["w","arr"],["w","target"],[["f","+"],["w","index"],["a",1]],["w","end"]]]]]]]]],[["f","search"],["w","arr"],["w","target"],["a",0],[["f","length"],["w","arr"]]]]]],[["f","let"],["w","array:zip"],[["f","lambda"],["w","A"],["w","B"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","a"],["w","b"],["w","output"],[["f","if"],[["f","and"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","iterate"],[["f","cdr"],["w","a"]],[["f","cdr"],["w","b"]],[["f","array:merge!"],["w","output"],[["f","array"],[["f","array"],[["f","car"],["w","a"]],[["f","car"],["w","b"]]]]]],["w","output"]]]],[["f","iterate"],["w","A"],["w","B"],[]]]]],[["f","let"],["w","math:cartesian-product"],[["f","lambda"],["w","a"],["w","b"],[["f","array:fold"],["w","a"],[["f","lambda"],["w","p"],["w","x"],[["f","array:merge!"],["w","p"],[["f","array:map"],["w","b"],[["f","lambda"],["w","y"],[["f","array"],["w","x"],["w","y"]]]]]],[]]]],[["f","let"],["w","array:equal?"],[["f","lambda"],["w","a"],["w","b"],[["f","or"],[["f","and"],[["f","number?"],["w","a"]],[["f","number?"],["w","b"]],[["f","="],["w","a"],["w","b"]]],[["f","and"],[["f","string?"],["w","a"]],[["f","string?"],["w","b"]],[["f","string:equal?"],["w","a"],["w","b"]]],[["f","and"],[["f","array?"],["w","a"]],[["f","="],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","not"],[["f","array:some?"],[["f","math:sequence"],["w","a"]],[["f","lambda"],["w","i"],[["f","not"],[["f","array:equal?"],[["f","array:get"],["w","a"],["w","i"]],[["f","array:get"],["w","b"],["w","i"]]]]]]]]]]],[["f","let"],["w","array:join"],[["f","lambda"],["w","arr"],["w","delim"],[["f","array:fold"],[["f","array:zip"],["w","arr"],[["f","math:sequence"],["w","arr"]]],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","car"],[["f","cdr"],["w","b"]]],["a",0]],[["f","string:merge"],["w","a"],["w","delim"],[["f","type"],[["f","car"],["w","b"]],["w","string"]]],[["f","type"],[["f","car"],["w","b"]],["w","string"]]]],["a",""]]]],[["f","let"],["w","array:flat-one"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","lambda"],["w","a"],["w","b"],[["f","array:merge!"],["w","a"],["w","b"]]],[]]]],[["f","let"],["w","array:flat"],[["f","lambda"],["w","arr"],[["f","do"],[["f","let"],["w","flatten"],[["f","lambda"],["w","item"],[["f","if"],[["f","and"],[["f","array?"],["w","item"]],[["f","length"],["w","item"]]],[["f","array:fold"],["w","item"],[["f","lambda"],["w","a"],["w","b"],[["f","array:merge!"],["w","a"],[["f","flatten"],["w","b"]]]],[]],[["f","array"],["w","item"]]]]],[["f","flatten"],["w","arr"]]]]],[["f","let"],["w","array:sort"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","if"],[["f","<="],[["f","length"],["w","arr"]],["a",1]],["w","arr"],[["f","do"],[["f","let"],["w","pivot"],[["f","car"],["w","arr"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],["w","bounds"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","current"],[["f","array:get"],["w","arr"],["w","i"]]],[["f","let"],["w","predicate"],[["f","callback"],["w","current"],["w","pivot"]]],[["f","let"],["w","left"],[["f","if"],[["f","="],["w","predicate"],["a",0]],[["f","array:merge"],["w","a"],[["f","array"],["w","current"]]],["w","a"]]],[["f","let"],["w","right"],[["f","if"],[["f","="],["w","predicate"],["a",1]],[["f","array:merge"],["w","b"],[["f","array"],["w","current"]]],["w","b"]]],[["f","if"],[["f","<"],["w","i"],["w","bounds"]],[["f","iterate"],[["f","+"],["w","i"],["a",1]],["w","bounds"],["w","left"],["w","right"]],[["f","array"],["w","left"],["w","right"]]]]]],[["f","let"],["w","sorted"],[["f","iterate"],["a",1],[["f","-"],[["f","length"],["w","arr"]],["a",1]],[],[]]],[["f","let"],["w","left"],[["f","car"],["w","sorted"]]],[["f","let"],["w","right"],[["f","car"],[["f","cdr"],["w","sorted"]]]],[["f","array:merge"],[["f","array:sort"],["w","left"],["w","callback"]],[["f","array"],["w","pivot"]],[["f","array:sort"],["w","right"],["w","callback"]]]]]]]],[["f","let"],["w","array:set"],[["f","lambda"],["w","arr"],["w","index"],["w","item"],[["f","array:set!"],[["f","type"],["w","arr"],["w","array"]],["w","index"],["w","item"]]]],[["f","let"],["w","array:adjacent-difference"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let"],["w","len"],[["f","length"],["w","arr"]]],[["f","unless"],[["f","="],["w","len"],["a",1]],[["f","do"],[["f","array"],[["f","car"],["w","arr"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],["w","result"],[["f","if"],[["f","<"],["w","i"],["w","len"]],[["f","do"],[["f","iterate"],[["f","+"],["w","i"],["a",1]],[["f","array:set!"],["w","result"],["w","i"],[["f","callback"],[["f","array:get"],["w","arr"],[["f","-"],["w","i"],["a",1]]],[["f","array:get"],["w","arr"],["w","i"]]]]]],["w","result"]]]],[["f","iterate"],["a",1],["w","arr"]]],["w","arr"]]]]],[["f","let"],["w","array:adjacent-find"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let"],["w","len"],[["f","length"],["w","arr"]]],[["f","otherwise"],[["f","="],["w","len"],["a",1]],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],[["f","if"],[["f","<"],["w","i"],["w","len"]],[["f","if"],[["f","callback"],[["f","let"],["w","prev"],[["f","array:get"],["w","arr"],[["f","-"],["w","i"],["a",1]]]],[["f","let"],["w","current"],[["f","array:get"],["w","arr"],["w","i"]]]],["w","prev"],[["f","iterate"],[["f","+"],["w","i"],["a",1]]]],[]]]],[["f","iterate"],["a",1]]]]]]],[["f","let"],["w","array:adjacent"],[["f","lambda"],["w","arr"],["w","directions"],["w","y"],["w","x"],["w","callback"],[["f","array:for"],["w","directions"],[["f","lambda"],["w","dir"],[["f","do"],[["f","let"],["w","dy"],[["f","+"],[["f","car"],["w","dir"]],["w","y"]]],[["f","let"],["w","dx"],[["f","+"],[["f","car"],[["f","cdr"],["w","dir"]]],["w","x"]]],[["f","when"],[["f","and"],[["f","array:in-bounds?"],["w","arr"],["w","dy"]],[["f","array:in-bounds?"],[["f","array:get"],["w","arr"],["w","dy"]],["w","dx"]]],[["f","callback"],[["f","array:get"],[["f","array:get"],["w","arr"],["w","dy"]],["w","dx"]],["w","dir"]]]]]]]],[["f","let"],["w","array:partition"],[["f","lambda"],["w","arr"],["w","n"],[["f","array:fold"],[["f","array:zip"],["w","arr"],[["f","math:sequence"],["w","arr"]]],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","x"],[["f","car"],["w","b"]]],[["f","let"],["w","i"],[["f","car"],[["f","cdr"],["w","b"]]]],[["f","if"],[["f","mod"],["w","i"],["w","n"]],[["f","array:set!"],[["f","let"],["w","last-a"],[["f","array:get"],["w","a"],["a",-1]]],[["f","length"],["w","last-a"]],["w","x"]],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[["f","do"],[["f","let"],["w","mut-arr"],[]],[["f","array:set!"],["w","mut-arr"],[["f","length"],["w","mut-arr"]],["w","x"]]]]],["w","a"]]],[]]]],[["f","let"],["w","string:split"],[["f","lambda"],["w","str"],["w","delim"],[["f","do"],[["f","let"],["w","locals"],[]],[["f","let"],["w","delim-arr"],[["f","type"],["w","delim"],["w","array"]]],[["f","array:set!"],["w","locals"],[["f","length"],["w","locals"]],["w","delim-arr"]],[["f","array:set!"],["w","locals"],[["f","length"],["w","locals"]],[["f","type"],["w","str"],["w","array"]]],[["f","array:set!"],["w","locals"],[["f","length"],["w","locals"]],[["f","length"],["w","delim-arr"]]],[["f","array:set!"],["w","locals"],[["f","length"],["w","locals"]],["a",""]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","result"],["w","i"],["w","bounds"],[["f","if"],[["f","<"],[["f","if"],[["f","array:every?"],[["f","array:zip"],[["f","array:get"],["w","locals"],["a",0]],[["f","math:sequence"],["w","locals"]]],[["f","lambda"],["w","item"],[["f","do"],[["f","let"],["w","y"],[["f","car"],["w","item"]]],[["f","let"],["w","j"],[["f","car"],[["f","cdr"],["w","item"]]]],[["f","or"],[["f","<="],[["f","length"],[["f","array:get"],["w","locals"],["a",1]]],[["f","+"],["w","i"],["w","j"]]],[["f","="],[["f","type"],[["f","array:get"],[["f","array:get"],["w","locals"],["a",1]],[["f","+"],["w","i"],["w","j"]]],["w","char-code"]],[["f","type"],["w","y"],["w","char-code"]]]]]]],[["f","do"],[["f","array:set!"],["w","result"],[["f","length"],["w","result"]],[["f","array:get"],["w","locals"],["a",3]]],[["f","array:set!"],["w","locals"],["a",3],["a",""]],[["f","+"],["w","i"],[["f","array:get"],["w","locals"],["a",2]],["a",-1]]],[["f","do"],[["f","array:set!"],["w","locals"],["a",3],[["f","string:merge"],[["f","array:get"],["w","locals"],["a",3]],[["f","array:get"],[["f","array:get"],["w","locals"],["a",1]],["w","i"]]]],["w","i"]]],["w","bounds"]],[["f","iterate"],["w","result"],[["f","+"],["w","i"],["a",1]],["w","bounds"]],["w","result"]]]],[["f","array:set!"],[["f","let"],["w","iteration-result"],[["f","iterate"],[],["a",0],[["f","-"],[["f","length"],[["f","array:get"],["w","locals"],["a",1]]],["a",1]]]],[["f","length"],["w","iteration-result"]],[["f","array:get"],["w","locals"],["a",3]]]]]],[["f","let"],["w","array:shallow-copy"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","lambda"],["w","a"],["w","b"],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],["w","b"]]],[]]]],[["f","let"],["w","array:deep-copy"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","lambda"],["w","a"],["w","b"],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[["f","if"],[["f","array?"],["w","b"]],[["f","array:deep-copy"],["w","b"]],["w","b"]]]],[]]]],[["f","let"],["w","array:merge!"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","array:for"],["w","b"],[["f","lambda"],["w","x"],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],["w","x"]]]],["w","a"]]]],[["f","let"],["w","array:swap-remove!"],[["f","lambda"],["w","arr"],["w","i"],[["f","do"],[["f","array:set!"],["w","arr"],["w","i"],[["f","array:get"],["w","arr"],[["f","-"],[["f","length"],["w","arr"]],["a",1]]]],[["f","array:set!"],["w","arr"],["a",-1]]]]],[["f","let"],["w","array:index-of"],[["f","safety"],["w","lambda"],["w","arr"],["w","item"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","i"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","="],[["f","car"],["w","arr"]],["w","item"]],["w","i"],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","+"],["w","i"],["a",1]]]],["a",-1]]]],[["f","iterate"],["w","arr"],["a",0]]]]],[["f","let"],["w","string:index-of-char"],[["f","lambda"],["w","str"],["w","character"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","i"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","string:equal?"],[["f","car"],["w","arr"]],["w","character"]],["w","i"],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","+"],["w","i"],["a",1]]]],["a",-1]]]],[["f","iterate"],[["f","type"],["w","str"],["w","array"]],["a",0]]]]],[["f","let"],["w","string:match"],[["f","lambda"],["w","str"],["w","word"],[["f","do"],[["f","let"],["w","string-arr"],[["f","type"],["w","str"],["w","array"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","i"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","string:equal?"],[["f","pi"],["w","string-arr"],[["f","array:slice"],["w","i"],[["f","+"],["w","i"],[["f","length"],["w","word"]]]],[["f","array:join"],["a",""]]],["w","word"]],["w","i"],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","+"],["w","i"],["a",1]]]],["a",-1]]]],[["f","iterate"],["w","toArr"],["a",0]]]]],[["f","let"],["w","array:find-index"],[["f","safety"],["w","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","i"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","callback"],[["f","car"],["w","arr"]]],["w","i"],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","+"],["w","i"],["a",1]]]],["a",-1]]]],[["f","iterate"],["w","arr"],["a",0]]]]],[["f","let"],["w","array:remove"],[["f","lambda"],["w","arr"],["w","i"],[["f","array:fold"],["w","arr"],[["f","lambda"],["w","a"],["w","x"],[["f","do"],[["f","unless"],[["f","="],["w","x"],["w","i"]],[["f","array:merge!"],["w","a"],[["f","array"],["w","x"]]],["w","a"]]]],[]]]],[["f","let"],["w","array:pad-right"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","array:merge"],["w","b"],[["f","array"],[["f","-"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],["w","length"]]],[["f","array:merge"],["w","a"],[["f","array"],[["f","-"],[["f","length"],["w","b"]],[["f","length"],["w","a"]]],["w","length"]]]]]],[["f","let"],["w","array:pad-left"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","array:merge"],[["f","array"],[["f","-"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],["w","length"]],["w","b"]],[["f","array:merge"],[["f","array"],[["f","-"],[["f","length"],["w","b"]],[["f","length"],["w","a"]]],["w","length"]],["w","a"]]]]],[["f","let"],["w","array:pad-right!"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","array:merge!"],["w","b"],[["f","array"],[["f","-"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],["w","length"]]],[["f","array:merge!"],["w","a"],[["f","array"],[["f","-"],[["f","length"],["w","b"]],[["f","length"],["w","a"]]],["w","length"]]]]]],[["f","let"],["w","array:pad-left!"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","array:merge!"],[["f","array"],[["f","-"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],["w","length"]],["w","b"]],[["f","array:merge!"],[["f","array"],[["f","-"],[["f","length"],["w","b"]],[["f","length"],["w","a"]]],["w","length"]],["w","a"]]]]],[["f","let"],["w","string:greater?"],[["f","lambda"],["w","L"],["w","R"],[["f","otherwise"],[["f","string:equal?"],["w","L"],["w","R"]],[["f","do"],[["f","let"],["w","A"],[["f","cast:string->char-codes"],[["f","type"],["w","L"],["w","string"]]]],[["f","let"],["w","B"],[["f","cast:string->char-codes"],[["f","type"],["w","R"],["w","string"]]]],[["f","let"],["w","a"],[["f","if"],[["f","<"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],[["f","array:merge!"],["w","A"],[["f","array"],[["f","-"],[["f","length"],["w","B"]],[["f","length"],["w","A"]]],["w","length"]]],["w","A"]]],[["f","let"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],[["f","array:merge!"],["w","B"],[["f","array"],[["f","-"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],["w","length"]]],["w","B"]]],[["f","pi"],["w","a"],[["f","array:zip"],["w","b"]],[["f","array:fold"],[["f","lambda"],["w","acc"],["w","pair"],[["f","if"],[["f",">"],[["f","car"],["w","pair"]],[["f","car"],[["f","cdr"],["w","pair"]]]],["a",0],["w","acc"]]],["a",1]]]]]]],[["f","let"],["w","string:lesser?"],[["f","lambda"],["w","L"],["w","R"],[["f","otherwise"],[["f","string:equal?"],["w","L"],["w","R"]],[["f","do"],[["f","let"],["w","A"],[["f","cast:string->char-codes"],[["f","type"],["w","L"],["w","string"]]]],[["f","let"],["w","B"],[["f","cast:string->char-codes"],[["f","type"],["w","R"],["w","string"]]]],[["f","let"],["w","a"],[["f","if"],[["f","<"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],[["f","array:merge!"],["w","A"],[["f","array"],[["f","-"],[["f","length"],["w","B"]],[["f","length"],["w","A"]]],["w","length"]]],["w","A"]]],[["f","let"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],[["f","array:merge!"],["w","B"],[["f","array"],[["f","-"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],["w","length"]]],["w","B"]]],[["f","pi"],["w","a"],[["f","array:zip"],["w","b"]],[["f","array:fold"],[["f","lambda"],["w","acc"],["w","pair"],[["f","if"],[["f","<"],[["f","car"],["w","pair"]],[["f","car"],[["f","cdr"],["w","pair"]]]],["a",0],["w","acc"]]],["a",1]]]]]]],[["f","let"],["w","string:equal?"],[["f","lambda"],["w","L"],["w","R"],[["f","when"],[["f","="],[["f","length"],["w","L"]],[["f","length"],["w","R"]]],[["f","do"],[["f","let"],["w","a"],[["f","cast:string->char-codes"],[["f","type"],["w","R"],["w","string"]]]],[["f","let"],["w","b"],[["f","cast:string->char-codes"],[["f","type"],["w","L"],["w","string"]]]],[["f","pi"],["w","a"],[["f","array:zip"],["w","b"]],[["f","array:every?"],[["f","lambda"],["w","x"],[["f","="],[["f","car"],["w","x"]],[["f","car"],[["f","cdr"],["w","x"]]]]]]]]]]],[["f","let"],["w","new:set"],[["f","lambda"],["w","items"],[["f","set:add!"],[["f","array"],[],[],[],[]],["w","items"]]]],[["f","let"],["w","new:array"],[["f","safety"],["w","lambda"],["w","items"],[["f","type"],["w","items"],["w","array"]]]],[["f","let"],["w","new:list"],[["f","safety"],["w","lambda"],["w","value"],[["f","array"],[],["w","value"],[]]]],[["f","let"],["w","new:binary-tree"],[["f","safety"],["w","lambda"],["w","value"],[["f","do"],[["f","let"],["w","arr"],[]],[["f","array:set!"],["w","arr"],["a",0],["w","value"]],[["f","array:set!"],["w","arr"],["a",1],[]],[["f","array:set!"],["w","arr"],["a",2],[]],["w","arr"]]]],[["f","let"],["w","binary-tree:left"],[["f","safety"],["w","lambda"],["w","node"],[["f","array:get"],["w","node"],["a",1]]]],[["f","let"],["w","binary-tree:right"],[["f","safety"],["w","lambda"],["w","node"],[["f","array:get"],["w","node"],["a",2]]]],[["f","let"],["w","binary-tree:left!"],[["f","safety"],["w","lambda"],["w","tree"],["w","node"],[["f","array:set!"],["w","tree"],["a",1],["w","node"]]]],[["f","let"],["w","binary-tree:right!"],[["f","safety"],["w","lambda"],["w","tree"],["w","node"],[["f","array:set!"],["w","tree"],["a",2],["w","node"]]]],[["f","let"],["w","binary-tree:value"],[["f","safety"],["w","lambda"],["w","node"],[["f","car"],["w","node"]]]],[["f","let"],["w","set:index"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","prime-num"],["a",31]],[["f","let"],["w","key-arr"],[["f","type"],[["f","type"],["w","key"],["w","string"]],["w","array"]]],[["f","let"],["w","total"],[["f","array"],["a",0]]],[["f","let*"],["w","find-hash-index"],[["f","lambda"],["w","i"],["w","bounds"],[["f","do"],[["f","let"],["w","letter"],[["f","array:get"],["w","key-arr"],["w","i"]]],[["f","let"],["w","value"],[["f","-"],[["f","type"],["w","letter"],["w","char-code"]],["a",96]]],[["f","array:set!"],["w","total"],["a",0],[["f","math:euclidean-mod"],[["f","+"],[["f","*"],[["f","car"],["w","total"]],["w","prime-num"]],["w","value"]],[["f","length"],["w","table"]]]],[["f","if"],[["f","<"],["w","i"],["w","bounds"]],[["f","find-hash-index"],[["f","+"],["w","i"],["a",1]],["w","bounds"]],[["f","car"],["w","total"]]]]]],[["f","find-hash-index"],["a",0],[["f","if"],[["f","<"],[["f","-"],[["f","length"],["w","key-arr"]],["a",1]],["a",100]],[["f","-"],[["f","length"],["w","key-arr"]],["a",1]],["a",100]]]]]],[["f","let"],["w","set:add!"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","otherwise"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","array:set!"],["w","table"],["w","idx"],[["f","array"]]]],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","len"],[["f","length"],["w","current"]]],[["f","let"],["w","index"],[["f","if"],["w","len"],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","x"],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",-1]]],[["f","let"],["w","entry"],["w","key"]],[["f","if"],[["f","="],["w","index"],["a",-1]],[["f","array:set!"],["w","current"],[["f","length"],["w","current"]],["w","entry"]],[["f","array:set!"],["w","current"],["w","index"],["w","entry"]]],["w","table"]]]],[["f","let"],["w","set:remove!"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","otherwise"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","array:set!"],["w","table"],["w","idx"],[["f","Array"]]]],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","len"],[["f","length"],["w","current"]]],[["f","let"],["w","index"],[["f","if"],["w","len"],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","x"],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",-1]]],[["f","let"],["w","entry"],["w","key"]],[["f","otherwise"],[["f","="],["w","index"],["a",-1]],[["f","and"],[["f","array:set!"],["w","current"],["w","index"],[["f","array:get"],["w","current"],["a",-1]]],[["f","array:set!"],["w","current"],["a",-1]]]],["w","table"]]]],[["f","let"],["w","set:has?"],[["f","lambda"],["w","table"],["w","key"],[["f","and"],[["f","array:in-bounds?"],["w","table"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]]],[["f","and"],[["f","length"],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]]],[["f",">="],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","x"],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",0]]]]]],[["f","let"],["w","set:intersection"],[["f","lambda"],["w","a"],["w","b"],[["f","pi"],["w","b"],[["f","cast:table->array"]],[["f","array:fold"],[["f","lambda"],["w","out"],["w","element"],[["f","do"],[["f","when"],[["f","set:has?"],["w","a"],["w","element"]],[["f","set:add!"],["w","out"],["w","element"]]],["w","out"]]],[["f","array"],[],[],[],[],[]]]]]],[["f","let"],["w","set:difference"],[["f","lambda"],["w","a"],["w","b"],[["f","pi"],["w","a"],[["f","cast:table->array"]],[["f","array:fold"],[["f","lambda"],["w","out"],["w","element"],[["f","do"],[["f","when"],[["f","not"],[["f","set:has?"],["w","b"],["w","element"]]],[["f","set:add!"],["w","out"],["w","element"]]],["w","out"]]],[["f","array"],[],[],[],[],[]]]]]],[["f","let"],["w","set:xor"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","out"],[["f","array"],[],[],[],[],[]]],[["f","pi"],["w","a"],[["f","cast:table->array"]],[["f","array:for"],[["f","lambda"],["w","element"],[["f","when"],[["f","not"],[["f","set:has?"],["w","b"],["w","element"]]],[["f","set:add!"],["w","out"],["w","element"]]]]]],[["f","pi"],["w","b"],[["f","cast:table->array"]],[["f","array:for"],[["f","lambda"],["w","element"],[["f","when"],[["f","not"],[["f","set:has?"],["w","a"],["w","element"]]],[["f","set:add!"],["w","out"],["w","element"]]]]]],["w","out"]]]],[["f","let"],["w","set:union"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","out"],[["f","array"],[],[],[],[],[]]],[["f","pi"],["w","a"],[["f","cast:table->array"]],[["f","array:for"],[["f","lambda"],["w","element"],[["f","set:add!"],["w","out"],["w","element"]]]]],[["f","pi"],["w","b"],[["f","cast:table->array"]],[["f","array:for"],[["f","lambda"],["w","element"],[["f","set:add!"],["w","out"],["w","element"]]]]],["w","out"]]]],[["f","let"],["w","cast:table->array"],[["f","lambda"],["w","set"],[["f","array:select"],[["f","array:flat"],["w","set"]],["w","atom?"]]]],[["f","let"],["w","set:empty!"],[["f","lambda"],["w","table"],[["f","array:map"],["w","table"],["w","empty!"]]]],[["f","let"],["w","map:empty!"],[["f","lambda"],["w","table"],[["f","array:map"],["w","table"],["w","empty!"]]]],[["f","let"],["w","map:set!"],[["f","lambda"],["w","table"],["w","key"],["w","value"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","otherwise"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","array:set!"],["w","table"],["w","idx"],[]]],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","len"],[["f","length"],["w","current"]]],[["f","let"],["w","index"],[["f","if"],["w","len"],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],[["f","car"],["w","x"]],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",-1]]],[["f","let"],["w","entry"],[["f","array"],["w","key"],["w","value"]]],[["f","if"],[["f","="],["w","index"],["a",-1]],[["f","array:set!"],["w","current"],[["f","length"],["w","current"]],["w","entry"]],[["f","array:set!"],["w","current"],["w","index"],["w","entry"]]],["w","table"]]]],[["f","let"],["w","map:remove!"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","otherwise"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","array:set!"],["w","table"],["w","idx"],[]]],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","len"],[["f","length"],["w","current"]]],[["f","let"],["w","index"],[["f","if"],["w","len"],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],[["f","car"],["w","x"]],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",-1]]],[["f","otherwise"],[["f","="],["w","index"],["a",-1]],[["f","and"],[["f","array:set!"],["w","current"],["w","index"],[["f","array:get"],["w","current"],["a",-1]]],[["f","array:set!"],["w","current"],["a",-1]]]],["w","table"]]]],[["f","let"],["w","map:get"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","when"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","do"],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","found"],[["f","array:find"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","key"],["w","string"]],[["f","type"],[["f","array:get"],["w","x"],["a",0]],["w","string"]]]]]],[["f","when"],[["f","length"],["w","found"]],[["f","array:get"],["w","found"],["a",1]]]]]]]],[["f","let"],["w","cast:map->string"],[["f","lambda"],["w","table"],[["f","pi"],["w","table"],[["f","array:select"],["w","length"]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","array:join"],[["f","array:map"],["w","x"],[["f","lambda"],["w","y"],[["f","array:join"],["w","y"],["a"," -> "]]]],["a"," "]]]],[["f","array:join"],["a","\n"]]]]],[["f","let"],["w","map:has?"],[["f","lambda"],["w","table"],["w","key"],[["f","and"],[["f","array:in-bounds?"],["w","table"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]]],[["f","and"],[["f","length"],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]]],[["f",">="],[["f","array:find-index"],[["f","car"],["w","current"]],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","x"],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",0]]]]]],[["f","let"],["w","list:prev!"],[["f","safety"],["w","lambda"],["w","list"],["w","node"],[["f","array:set!"],["w","list"],["a",0],[["f","array:set!"],["w","node"],["a",2],["w","list"]]]]],[["f","let"],["w","list:next!"],[["f","safety"],["w","lambda"],["w","list"],["w","node"],[["f","array:set!"],["w","list"],["a",2],[["f","array:set!"],["w","node"],["a",0],["w","list"]]]]],[["f","let"],["w","list:prev"],[["f","safety"],["w","lambda"],["w","list"],[["f","array:get"],["w","list"],["a",0]]]],[["f","let"],["w","list:next"],[["f","safety"],["w","lambda"],["w","list"],[["f","array:get"],["w","list"],["a",2]]]],[["f","let"],["w","list:value"],[["f","lambda"],["w","node"],[["f","array:get"],["w","node"],["a",1]]]],[["f","let"],["w","array:rotate-right"],[["f","lambda"],["w","arr"],["w","n"],[["f","pi"],["w","arr"],[["f","array:zip"],[["f","math:sequence"],["w","arr"]]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","array:set!"],["w","a"],[["f","mod"],[["f","+"],[["f","car"],[["f","cdr"],["w","b"]]],["w","n"]],[["f","length"],["w","arr"]]],[["f","car"],["w","b"]]]],[["f","array"],[["f","length"],["w","arr"]],["w","length"]]]]]],[["f","let"],["w","array:rotate-left"],[["f","lambda"],["w","arr"],["w","n"],[["f","pi"],["w","arr"],[["f","array:zip"],[["f","math:sequence"],["w","arr"]]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","array:set!"],["w","a"],[["f","mod"],[["f","+"],[["f","car"],[["f","cdr"],["w","b"]]],[["f","-"],[["f","length"],["w","arr"]],["w","n"]]],[["f","length"],["w","arr"]]],[["f","car"],["w","b"]]]],[["f","array"],[["f","length"],["w","arr"]],["w","length"]]]]]],[["f","let"],["w","var:def"],[["f","safety"],["w","lambda"],["w","val"],[["f","array"],["w","val"]]]],[["f","let"],["w","var:get"],[["f","safety"],["w","lambda"],["w","variable"],[["f","car"],["w","variable"]]]],[["f","let"],["w","var:set!"],[["f","safety"],["w","lambda"],["w","variable"],["w","value"],[["f","array:set!"],["w","variable"],["a",0],["w","value"]]]],[["f","let"],["w","var:del!"],[["f","safety"],["w","lambda"],["w","variable"],[["f","array:set!"],["w","variable"],["a",-1]]]],[["f","let"],["w","array:first"],[["f","safety"],["w","lambda"],["w","arr"],[["f","array:get"],["w","arr"],["a",0]]]],[["f","let"],["w","array:last"],[["f","safety"],["w","lambda"],["w","arr"],[["f","array:get"],["w","arr"],["a",-1]]]],[["f","let"],["w","string:trim-left"],[["f","lambda"],["w","str"],[["f","do"],[["f","let"],["w","tr"],[["f","array"],["a",1]]],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f","and"],[["f","car"],["w","tr"]],[["f","string:equal?"],["w","b"],["a"," "]]],["w","a"],[["f","do"],[["f","when"],[["f","car"],["w","tr"]],[["f","array:set!"],["w","tr"],["a",0],["a",0]]],[["f","string:merge"],["w","a"],["w","b"]]]]],["a",""]]]]]],[["f","let"],["w","string:trim-right"],[["f","lambda"],["w","str"],[["f","do"],[["f","let"],["w","tr"],[["f","array"],["a",1]]],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:reverse"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f","and"],[["f","car"],["w","tr"]],[["f","string:equal?"],["w","b"],["a"," "]]],["w","a"],[["f","do"],[["f","when"],[["f","car"],["w","tr"]],[["f","array:set!"],["w","tr"],["a",0],["a",0]]],[["f","string:merge"],["w","b"],["w","a"]]]]],["a",""]]]]]],[["f","let"],["w","string:trim"],[["f","lambda"],["w","str"],[["f","pi"],["w","str"],[["f","string:trim-left"]],[["f","string:trim-right"]]]]],[["f","let"],["w","array:enumerate"],[["f","lambda"],["w","arr"],[["f","array:zip"],[["f","math:sequence"],["w","arr"]],["w","arr"]]]],[["f","let"],["w","string:lines"],[["f","lambda"],["w","str"],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","prev"],[["f","array:get"],["w","a"],["a",-1]]],[["f","if"],[["f","string:equal?"],["w","b"],["a","\n"]],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[]],[["f","array:set!"],["w","prev"],[["f","length"],["w","prev"]],["w","b"]]],["w","a"]]],[["f","array"],[]]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","array:join"],["w","x"],["a",""]]]]]]],[["f","let"],["w","string:words"],[["f","lambda"],["w","str"],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","prev"],[["f","array:get"],["w","a"],["a",-1]]],[["f","if"],[["f","string:equal?"],["w","b"],["a"," "]],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[]],[["f","array:set!"],["w","prev"],[["f","length"],["w","prev"]],["w","b"]]],["w","a"]]],[["f","array"],[]]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","array:join"],["w","x"],["a",""]]]]]]],[["f","let"],["w","string:seprator"],[["f","lambda"],["w","str"],["w","separator"],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","prev"],[["f","array:get"],["w","a"],["a",-1]]],[["f","if"],[["f","string:equal?"],["w","b"],["w","separator"]],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[]],[["f","array:set!"],["w","prev"],[["f","length"],["w","prev"]],["w","b"]]],["w","a"]]],[["f","array"],[]]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","array:join"],["w","x"],["a",""]]]]]]],[["f","let"],["w","new:brray"],[["f","lambda"],[["f","array"],[["f","array"],[]],[]]]],[["f","let"],["w","brray:offset-left"],[["f","lambda"],["w","q"],[["f","*"],[["f","-"],[["f","length"],[["f","array:get"],["w","q"],["a",0]]],["a",1]],["a",-1]]]],[["f","let"],["w","brray:offset-right"],[["f","lambda"],["w","q"],[["f","length"],[["f","array:get"],["w","q"],["a",1]]]]],[["f","let"],["w","brray:length"],[["f","lambda"],["w","q"],[["f","+"],[["f","length"],[["f","array:get"],["w","q"],["a",0]]],[["f","length"],[["f","array:get"],["w","q"],["a",1]]],["a",-1]]]],[["f","let"],["w","brray:empty?"],[["f","lambda"],["w","q"],[["f","not"],[["f","brray:length"],["w","q"]]]]],[["f","let"],["w","brray:empty!"],[["f","lambda"],["w","q"],[["f","do"],[["f","array:set!"],["w","q"],["a",0],[["f","array"],[]]],[["f","array:set!"],["w","q"],["a",1],[]],["w","q"]]]],[["f","let"],["w","brray:get"],[["f","lambda"],["w","q"],["w","offset"],[["f","do"],[["f","let"],["w","offset-index"],[["f","+"],["w","offset"],[["f","brray:offset-left"],["w","q"]]]],[["f","let"],["w","index"],[["f","if"],[["f","<"],["w","offset-index"],["a",0]],[["f","*"],["w","offset-index"],["a",-1]],["w","offset-index"]]],[["f","if"],[["f",">="],["w","offset-index"],["a",0]],[["f","array:get"],[["f","array:get"],["w","q"],["a",1]],["w","index"]],[["f","array:get"],[["f","array:get"],["w","q"],["a",0]],["w","index"]]]]]],[["f","let"],["w","brray:set!"],[["f","lambda"],["w","q"],["w","index"],["w","value"],[["f","do"],[["f","let"],["w","offset"],[["f","+"],["w","offset"],[["f","brray:offset-left"],["w","q"]]]],[["f","if"],[["f",">="],["w","offset"],["a",0]],[["f","array:set!"],[["f","array:get"],["w","q"],["a",1]],["w","offset"],["w","value"]],[["f","array:set!"],[["f","array:get"],["w","q"],["a",0]],[["f","*"],["w","offset"],["a",-1]],["w","value"]]],["w","q"]]]],[["f","let"],["w","brray:add-to-left!"],[["f","lambda"],["w","q"],["w","item"],[["f","array:set!"],[["f","let"],["w","c"],[["f","array:get"],["w","q"],["a",0]]],[["f","length"],["w","c"]],["w","item"]]]],[["f","let"],["w","brray:add-to-right!"],[["f","lambda"],["w","q"],["w","item"],[["f","array:set!"],[["f","let"],["w","c"],[["f","array:get"],["w","q"],["a",1]]],[["f","length"],["w","c"]],["w","item"]]]],[["f","let"],["w","brray:remove-from-left!"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","len"],[["f","brray:length"],["w","q"]]],[["f","when"],["w","len"],[["f","cond"],[["f","="],["w","len"],["a",1]],[["f","brray:empty!"],["w","q"]],[["f",">"],[["f","length"],[["f","array:get"],["w","q"],["a",0]]],["a",0]],[["f","array:set!"],[["f","array:get"],["w","q"],["a",0]],["a",-1]]]]]]],[["f","let"],["w","brray:remove-from-right!"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","len"],[["f","brray:length"],["w","q"]]],[["f","when"],["w","len"],[["f","cond"],[["f","="],["w","len"],["a",1]],[["f","brray:empty!"],["w","q"]],[["f",">"],[["f","length"],[["f","array:get"],["w","q"],["a",1]]],["a",0]],[["f","array:set!"],[["f","array:get"],["w","q"],["a",1]],["a",-1]]]]]]],[["f","let"],["w","brray:iter"],[["f","lambda"],["w","q"],["w","callback"],[["f","do"],[["f","let*"],["w","iter"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","callback"],[["f","brray:get"],["w","q"],["w","index"]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","iter"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","iter"],["a",0],[["f","brray:length"],["w","q"]]]]]],[["f","let"],["w","brray:map"],[["f","lambda"],["w","q"],["w","callback"],[["f","do"],[["f","let"],["w","result"],[["f","new:brray"]]],[["f","let"],["w","len"],[["f","brray:length"],["w","q"]]],[["f","let"],["w","half"],[["f","math:floor"],[["f","*"],["w","len"],["a",0.5]]]],[["f","let*"],["w","left"],[["f","lambda"],["w","index"],[["f","do"],[["f","brray:add-to-left!"],["w","result"],[["f","callback"],[["f","brray:get"],["w","q"],["w","index"]]]],[["f","when"],[["f",">"],["w","index"],["a",0]],[["f","left"],[["f","-"],["w","index"],["a",1]]]]]]],[["f","left"],[["f","-"],["w","half"],["a",1]]],[["f","let*"],["w","rigth"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","brray:add-to-right!"],["w","result"],[["f","callback"],[["f","brray:get"],["w","q"],["w","index"]]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","rigth"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","rigth"],["w","half"],[["f","-"],["w","len"],["a",1]]],["w","result"]]]],[["f","let"],["w","cast:brray->array"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","out"],[]],[["f","let*"],["w","iter"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","array:set!"],["w","out"],[["f","length"],["w","out"]],[["f","brray:get"],["w","q"],["w","index"]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","iter"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","iter"],["a",0],[["f","-"],[["f","brray:length"],["w","q"]],["a",1]]],["w","out"]]]],[["f","let"],["w","brray:balance?"],[["f","lambda"],["w","q"],[["f","="],[["f","+"],[["f","brray:offset-right"],["w","q"]],[["f","brray:offset-left"],["w","q"]]],["a",0]]]],[["f","let"],["w","brray:balance!"],[["f","lambda"],["w","q"],[["f","if"],[["f","brray:balance?"],["w","q"]],["w","q"],[["f","do"],[["f","let"],["w","initial"],[["f","cast:brray->array"],["w","q"]]],[["f","brray:empty!"],["w","q"]],[["f","let"],["w","half"],[["f","math:floor"],[["f","*"],[["f","length"],["w","initial"]],["a",0.5]]]],[["f","let*"],["w","left"],[["f","lambda"],["w","index"],[["f","do"],[["f","brray:add-to-left!"],["w","q"],[["f","array:get"],["w","initial"],["w","index"]]],[["f","when"],[["f",">"],["w","index"],["a",0]],[["f","left"],[["f","-"],["w","index"],["a",1]]]]]]],[["f","left"],[["f","-"],["w","half"],["a",1]]],[["f","let*"],["w","rigth"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","brray:add-to-right!"],["w","q"],[["f","array:get"],["w","initial"],["w","index"]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","rigth"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","rigth"],["w","half"],[["f","-"],[["f","length"],["w","initial"]],["a",1]]],["w","q"]]]]],[["f","let"],["w","brray:append!"],[["f","lambda"],["w","q"],["w","item"],[["f","do"],[["f","brray:add-to-right!"],["w","q"],["w","item"]],["w","q"]]]],[["f","let"],["w","brray:prepend!"],[["f","lambda"],["w","q"],["w","item"],[["f","do"],[["f","brray:add-to-left!"],["w","q"],["w","item"]],["w","q"]]]],[["f","let"],["w","brray:head!"],[["f","lambda"],["w","q"],[["f","do"],[["f","when"],[["f","="],[["f","brray:offset-right"],["w","q"]],["a",0]],[["f","brray:balance!"],["w","q"]]],[["f","brray:remove-from-right!"],["w","q"]],["w","q"]]]],[["f","let"],["w","brray:tail!"],[["f","lambda"],["w","q"],[["f","do"],[["f","when"],[["f","="],[["f","brray:offset-left"],["w","q"]],["a",0]],[["f","brray:balance!"],["w","q"]]],[["f","brray:remove-from-left!"],["w","q"]],["w","q"]]]],[["f","let"],["w","brray:first"],[["f","lambda"],["w","q"],[["f","brray:get"],["w","q"],["a",0]]]],[["f","let"],["w","brray:last"],[["f","lambda"],["w","q"],[["f","brray:get"],["w","q"],[["f","-"],[["f","brray:length"],["w","q"]],["a",1]]]]],[["f","let"],["w","brray:pop-right!"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","last"],[["f","brray:last"],["w","q"]]],[["f","brray:head!"],["w","q"]],["w","last"]]]],[["f","let"],["w","brray:pop-left!"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","first"],[["f","brray:first"],["w","q"]]],[["f","brray:tail!"],["w","q"]],["w","first"]]]],[["f","let"],["w","brray:rotate-left!"],[["f","lambda"],["w","q"],["w","n"],[["f","do"],[["f","let"],["w","N"],[["f","mod"],["w","n"],[["f","brray:length"],["w","q"]]]],[["f","let*"],["w","iter"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","when"],[["f","="],[["f","brray:offset-left"],["w","q"]],["a",0]],[["f","brray:balance!"],["w","q"]]],[["f","brray:add-to-right!"],["w","q"],[["f","brray:first"],["w","q"]]],[["f","brray:remove-from-left!"],["w","q"]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","iter"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","iter"],["a",0],["w","N"]],["w","q"]]]],[["f","let"],["w","brray:rotate-right!"],[["f","lambda"],["w","q"],["w","n"],[["f","do"],[["f","let"],["w","N"],[["f","mod"],["w","n"],[["f","brray:length"],["w","q"]]]],[["f","let*"],["w","iter"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","when"],[["f","="],[["f","brray:offset-right"],["w","q"]],["a",0]],[["f","brray:balance!"],["w","q"]]],[["f","brray:add-to-left!"],["w","q"],[["f","brray:last"],["w","q"]]],[["f","brray:remove-from-right!"],["w","q"]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","iter"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","iter"],["a",0],["w","N"]],["w","q"]]]],[["f","let"],["w","cast:array->brray"],[["f","lambda"],["w","initial"],[["f","do"],[["f","let"],["w","q"],[["f","new:brray"]]],[["f","let"],["w","half"],[["f","math:floor"],[["f","*"],[["f","length"],["w","initial"]],["a",0.5]]]],[["f","let*"],["w","left"],[["f","lambda"],["w","index"],[["f","do"],[["f","brray:add-to-left!"],["w","q"],[["f","array:get"],["w","initial"],["w","index"]]],[["f","when"],[["f",">"],["w","index"],["a",0]],[["f","left"],[["f","-"],["w","index"],["a",1]]]]]]],[["f","left"],[["f","-"],["w","half"],["a",1]]],[["f","let*"],["w","rigth"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","brray:add-to-right!"],["w","q"],[["f","array:get"],["w","initial"],["w","index"]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","rigth"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","rigth"],["w","half"],[["f","-"],[["f","length"],["w","initial"]],["a",1]]],["w","q"]]]],[["f","let"],["w","brray:slice"],[["f","lambda"],["w","entity"],["w","s"],["w","e"],[["f","do"],[["f","let"],["w","len"],[["f","brray:length"],["w","entity"]]],[["f","let"],["w","start"],[["f","if"],[["f","<"],["w","s"],["a",0]],[["f","math:max"],[["f","+"],["w","len"],["w","s"]],["a",0]],[["f","math:min"],["w","s"],["w","len"]]]],[["f","let"],["w","end"],[["f","if"],[["f","<"],["w","e"],["a",0]],[["f","math:max"],[["f","+"],["w","len"],["w","e"]],["a",0]],[["f","math:min"],["w","e"],["w","len"]]]],[["f","let"],["w","slice"],[["f","new:brray"]]],[["f","let"],["w","slice-len"],[["f","math:max"],[["f","-"],["w","end"],["w","start"]],["a",0]]],[["f","let"],["w","half"],[["f","math:floor"],[["f","*"],["w","slice-len"],["a",0.5]]]],[["f","let*"],["w","left"],[["f","lambda"],["w","index"],[["f","do"],[["f","brray:add-to-left!"],["w","slice"],[["f","brray:get"],["w","entity"],[["f","+"],["w","start"],["w","index"]]]],[["f","when"],[["f",">"],["w","index"],["a",0]],[["f","left"],[["f","-"],["w","index"],["a",1]]]]]]],[["f","left"],[["f","-"],["w","half"],["a",1]]],[["f","let*"],["w","rigth"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","brray:add-to-right!"],["w","slice"],[["f","brray:get"],["w","entity"],[["f","+"],["w","start"],["w","index"]]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","rigth"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","rigth"],["w","half"],[["f","-"],["w","slice-len"],["a",1]]],["w","slice"]]]],[["f","let"],["w","date:add-seconds"],[["f","lambda"],["w","date-time"],["w","seconds"],[["f","+"],["w","date-time"],[["f","*"],["w","seconds"],["a",1000]]]]],[["f","let"],["w","date:add-minutes"],[["f","lambda"],["w","date-time"],["w","minutes"],[["f","+"],["w","date-time"],[["f","*"],["w","minutes"],["a",1000],["a",60]]]]],[["f","let"],["w","date:add-hours"],[["f","lambda"],["w","date-time"],["w","hours"],[["f","+"],["w","date-time"],[["f","*"],["w","hours"],["a",1000],["a",60],["a",60]]]]],[["f","let"],["w","date:add-days"],[["f","lambda"],["w","date-time"],["w","days"],[["f","+"],["w","date-time"],[["f","*"],["w","days"],["a",1000],["a",60],["a",60],["a",24]]]]],[["f","let"],["w","date:add-months"],[["f","lambda"],["w","date-time"],["w","months"],[["f","+"],["w","date-time"],[["f","*"],["w","months"],["a",1000],["a",60],["a",60],["a",24],["a",30]]]]],[["f","let"],["w","date:add-years"],[["f","lambda"],["w","date-time"],["w","years"],[["f","+"],["w","date-time"],[["f","*"],["w","years"],["a",1000],["a",60],["a",60],["a",24],["a",365]]]]],[["f","let"],["w","date:sub-seconds"],[["f","lambda"],["w","date-time"],["w","seconds"],[["f","-"],["w","date-time"],[["f","*"],["w","seconds"],["a",1000]]]]],[["f","let"],["w","date:sub-minutes"],[["f","lambda"],["w","date-time"],["w","minutes"],[["f","-"],["w","date-time"],[["f","*"],["w","minutes"],["a",1000],["a",60]]]]],[["f","let"],["w","date:sub-hours"],[["f","lambda"],["w","date-time"],["w","hours"],[["f","-"],["w","date-time"],[["f","*"],["w","hours"],["a",1000],["a",60],["a",60]]]]],[["f","let"],["w","date:sub-days"],[["f","lambda"],["w","date-time"],["w","days"],[["f","-"],["w","date-time"],[["f","*"],["w","days"],["a",1000],["a",60],["a",60],["a",24]]]]],[["f","let"],["w","date:sub-months"],[["f","lambda"],["w","date-time"],["w","months"],[["f","-"],["w","date-time"],[["f","*"],["w","months"],["a",1000],["a",60],["a",60],["a",24],["a",30]]]]],[["f","let"],["w","date:sub-years"],[["f","lambda"],["w","date-time"],["w","years"],[["f","-"],["w","date-time"],[["f","*"],["w","years"],["a",1000],["a",60],["a",60],["a",24],["a",365]]]]],[["f","let"],["w","math:permutations"],[["f","lambda"],["w","xs"],[["f","unless"],[["f","length"],["w","xs"]],[["f","array"],[]],[["f","pi"],["w","xs"],[["f","array:flat-one"]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","pi"],["w","xs"],[["f","array:exclude"],[["f","lambda"],["w","y"],[["f","="],["w","x"],["w","y"]]]],[["f","math:permutations"]],[["f","array:map"],[["f","lambda"],["w","vs"],[["f","array:fold"],["w","vs"],[["f","lambda"],["w","a"],["w","b"],[["f","array:merge!"],["w","a"],["w","b"]]],[["f","array"],["w","x"]]]]]]]]]]]]]
1
+ export default [[["f","let"],["w","math:E"],["a",2.718281828459045]],[["f","let"],["w","math:PI"],["a",3.141592653589793]],[["f","let*"],["w","array:for"],[["f","lambda"],["w","arr"],["w","callback"],[["f","when"],[["f","length"],["w","arr"]],[["f","do"],[["f","callback"],[["f","car"],["w","arr"]]],[["f","array:for"],[["f","cdr"],["w","arr"]],["w","callback"]]]]]],[["f","let"],["w","array:map"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","array:merge!"],["w","out"],[["f","array"],[["f","callback"],[["f","car"],["w","arr"]]]]]],["w","out"]]]],[["f","iterate"],["w","arr"],[]]]]],[["f","let"],["w","array:select"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","if"],[["f","callback"],[["f","car"],["w","arr"]]],[["f","array:merge!"],["w","out"],[["f","array"],[["f","car"],["w","arr"]]]],["w","out"]]],["w","out"]]]],[["f","iterate"],["w","arr"],[]]]]],[["f","let"],["w","array:exclude"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","if"],[["f","not"],[["f","callback"],[["f","car"],["w","arr"]]]],[["f","array:merge!"],["w","out"],[["f","array"],[["f","car"],["w","arr"]]]],["w","out"]]],["w","out"]]]],[["f","iterate"],["w","arr"],[]]]]],[["f","let"],["w","array:fold"],[["f","lambda"],["w","arr"],["w","callback"],["w","initial"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","callback"],["w","out"],[["f","car"],["w","arr"]]]],["w","out"]]]],[["f","iterate"],["w","arr"],["w","initial"]]]]],[["f","let"],["w","array:every?"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],[["f","if"],[["f","and"],[["f","length"],["w","arr"]],[["f","callback"],[["f","car"],["w","arr"]]]],[["f","iterate"],[["f","cdr"],["w","arr"]]],[["f","not"],[["f","length"],["w","arr"]]]]]],[["f","iterate"],["w","arr"]]]]],[["f","let"],["w","array:some?"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],[["f","if"],[["f","and"],[["f","length"],["w","arr"]],[["f","not"],[["f","callback"],[["f","car"],["w","arr"]]]]],[["f","iterate"],[["f","cdr"],["w","arr"]]],[["f","type"],[["f","length"],["w","arr"]],["w","boolean"]]]]],[["f","iterate"],["w","arr"]]]]],[["f","let"],["w","array:find"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","callback"],[["f","car"],["w","arr"]]],[["f","car"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]]]],[]]]],[["f","iterate"],["w","arr"]]]]],[["f","let"],["w","array:has?"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],[["f","when"],[["f","length"],["w","arr"]],[["f","if"],[["f","callback"],[["f","car"],["w","arr"]]],["a",1],[["f","iterate"],[["f","cdr"],["w","arr"]]]]]]],[["f","iterate"],["w","arr"]]]]],[["f","let"],["w","array:reverse"],[["f","lambda"],["w","arr"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","out"],[["f","if"],[["f","length"],["w","arr"]],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","array:merge!"],[["f","array"],[["f","car"],["w","arr"]]],["w","out"]]],["w","out"]]]],[["f","iterate"],["w","arr"],[]]]]],[["f","let"],["w","math:range"],[["f","lambda"],["w","start"],["w","end"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","out"],["w","count"],[["f","if"],[["f","<="],["w","count"],["w","end"]],[["f","iterate"],[["f","array:merge!"],["w","out"],[["f","array"],["w","count"]]],[["f","+"],["w","count"],["a",1]]],["w","out"]]]],[["f","iterate"],[],["w","start"]]]]],[["f","let"],["w","math:sequence"],[["f","lambda"],["w","arr"],[["f","do"],[["f","let"],["w","end"],[["f","length"],["w","arr"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","out"],["w","count"],[["f","if"],[["f","<"],[["f","length"],["w","out"]],["w","end"]],[["f","iterate"],[["f","array:merge!"],["w","out"],[["f","array"],["w","count"]]],[["f","+"],["w","count"],["a",1]]],["w","out"]]]],[["f","iterate"],[],["a",0]]]]],[["f","let"],["w","math:sequence-n"],[["f","lambda"],["w","n"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","out"],["w","count"],[["f","if"],[["f","<"],[["f","length"],["w","out"]],["w","n"]],[["f","iterate"],[["f","array:merge!"],["w","out"],[["f","array"],["w","count"]]],[["f","+"],["w","count"],["a",1]]],["w","out"]]]],[["f","iterate"],[],["a",0]]]]],[["f","let"],["w","array:unique"],[["f","lambda"],["w","arr"],[["f","pi"],[["f","let"],["w","sorted"],[["f","array:sort"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f",">"],["w","a"],["w","b"]]]]],[["f","array:zip"],[["f","math:sequence"],["w","sorted"]]],[["f","array:select"],[["f","lambda"],["w","x"],[["f","or"],[["f","not"],[["f","let"],["w","index"],[["f","car"],[["f","cdr"],["w","x"]]]]],[["f","not"],[["f","="],[["f","array:get"],["w","sorted"],[["f","-"],["w","index"],["a",1]]],[["f","array:get"],["w","sorted"],["w","index"]]]]]]],[["f","array:map"],["w","car"]]]]],[["f","let"],["w","array:for-range"],[["f","lambda"],["w","start"],["w","end"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],[["f","when"],[["f","<"],["w","i"],["w","end"]],[["f","do"],[["f","callback"],["w","i"]],[["f","iterate"],[["f","+"],["w","i"],["a",1]]]]]]],[["f","iterate"],["w","start"]]]]],[["f","let"],["w","array:traverse"],[["f","lambda"],["w","x"],["w","callback"],[["f","if"],[["f","atom?"],["w","x"]],[["f","callback"],["w","x"]],[["f","iterate"],["w","x"],[["f","lambda"],["w","y"],[["f","array:traverse"],["w","y"],["w","callback"]]]]]]],[["f","let"],["w","math:summation"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","+"],["w","a"],["w","b"]]],[["f","+"]]]]],[["f","let"],["w","math:product"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","*"],["w","a"],["w","b"]]],[["f","*"]]]]],[["f","let"],["w","math:maximum"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],["w","a"],["w","b"]],["w","a"],["w","b"]]],[["f","car"],["w","arr"]]]]],[["f","let"],["w","math:minimum"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","if"],[["f","<"],["w","a"],["w","b"]],["w","a"],["w","b"]]],[["f","car"],["w","arr"]]]]],[["f","let"],["w","math:max"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],["w","a"],["w","b"]],["w","a"],["w","b"]]]],[["f","let"],["w","math:min"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f","<"],["w","a"],["w","b"]],["w","a"],["w","b"]]]],[["f","let"],["w","array:count-of"],[["f","lambda"],["w","arr"],["w","callback"],[["f","pi"],["w","arr"],[["f","array:select"],["w","callback"]],[["f","length"]]]]],[["f","let"],["w","math:increment"],[["f","safety"],["w","lambda"],["w","i"],[["f","+"],["w","i"],["a",1]]]],[["f","let"],["w","math:floor"],[["f","safety"],["w","lambda"],["w","n"],[["f","|"],["w","n"],["a",0]]]],[["f","let"],["w","math:round"],[["f","safety"],["w","lambda"],["w","n"],[["f","|"],[["f","+"],["w","n"],["a",0.5]],["a",0]]]],[["f","let"],["w","array:empty?"],[["f","safety"],["w","lambda"],["w","arr"],[["f","not"],[["f","length"],["w","arr"]]]]],[["f","let"],["w","array:empty!"],[["f","safety"],["w","lambda"],["w","arr"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],[["f","if"],[["f","length"],["w","arr"]],[["f","do"],[["f","array:set!"],["w","arr"],["a",-1]],[["f","iterate"]]],["w","arr"]]]],[["f","iterate"]]]]],[["f","let"],["w","array:in-bounds?"],[["f","safety"],["w","lambda"],["w","arr"],["w","index"],[["f","and"],[["f","<"],["w","index"],[["f","length"],["w","arr"]]],[["f",">="],["w","index"],["a",0]]]]],[["f","let"],["w","math:largest-power"],[["f","safety"],["w","lambda"],["w","N"],[["f","do"],[["f","let"],["w","N1"],[["f","|"],["w","N"],[["f",">>"],["w","N"],["a",1]]]],[["f","let"],["w","N2"],[["f","|"],["w","N1"],[["f",">>"],["w","N1"],["a",2]]]],[["f","let"],["w","N3"],[["f","|"],["w","N2"],[["f",">>"],["w","N2"],["a",4]]]],[["f","let"],["w","N4"],[["f","|"],["w","N3"],[["f",">>"],["w","N3"],["a",8]]]],[["f",">>"],[["f","+"],["w","N4"],["a",1]],["a",1]]]]],[["f","let"],["w","math:set-bit"],[["f","safety"],["w","lambda"],["w","n"],["w","bit"],[["f","|"],["w","n"],[["f","<<"],["a",1],["w","bit"]]]]],[["f","let"],["w","math:clear-bit"],[["f","safety"],["w","lambda"],["w","n"],["w","bit"],[["f","&"],["w","n"],[["f","~"],[["f","<<"],["a",1],["w","bit"]]]]]],[["f","let"],["w","math:odd-bit?"],[["f","safety"],["w","lambda"],["w","n"],[["f","="],[["f","&"],["w","n"],["a",1]],["a",1]]]],[["f","let"],["w","math:average-bit"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f",">>"],[["f","+"],["w","a"],["w","b"]],["a",1]]]],[["f","let"],["w","math:toggle-bit"],[["f","safety"],["w","lambda"],["w","n"],["w","a"],["w","b"],[["f","^"],["w","a"],["w","b"],["w","n"]]]],[["f","let"],["w","math:same-sign-bit?"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f",">="],[["f","^"],["w","a"],["w","b"]],["a",0]]]],[["f","let"],["w","math:max-bit"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","-"],["w","a"],[["f","&"],[["f","-"],["w","a"],["w","b"]],[["f",">>"],[["f","-"],["w","a"],["w","b"]],["a",31]]]]]],[["f","let"],["w","math:min-bit"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","-"],["w","a"],[["f","&"],[["f","-"],["w","a"],["w","b"]],[["f",">>"],[["f","-"],["w","b"],["w","a"]],["a",31]]]]]],[["f","let"],["w","math:modulo-bit"],[["f","safety"],["w","lambda"],["w","numerator"],["w","divisor"],[["f","&"],["w","numerator"],[["f","-"],["w","divisor"],["a",1]]]]],[["f","let"],["w","math:n-one-bit?"],[["f","safety"],["w","lambda"],["w","N"],["w","nth"],[["f","type"],[["f","&"],["w","N"],[["f","<<"],["a",1],["w","nth"]]],["w","boolean"]]]],[["f","let"],["w","cast:string->chars"],[["f","safety"],["w","lambda"],["w","str"],[["f","type"],["w","str"],["w","array"]]]],[["f","let"],["w","cast:chars->string"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","safety"],["w","lambda"],["w","a"],["w","x"],[["f","string:merge"],["w","a"],[["f","type"],["w","x"],["w","string"]]]],["a",""]]]],[["f","let"],["w","cast:string->number"],[["f","safety"],["w","lambda"],["w","str"],[["f","type"],["w","str"],["w","number"]]]],[["f","let"],["w","cast:number->string"],[["f","safety"],["w","lambda"],["w","n"],[["f","type"],["w","n"],["w","string"]]]],[["f","let"],["w","cast:strings->numbers"],[["f","lambda"],["w","arr"],[["f","array:map"],["w","arr"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","number"]]]]]],[["f","let"],["w","cast:numbers->strings"],[["f","lambda"],["w","arr"],[["f","array:map"],["w","arr"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","string"]]]]]],[["f","let"],["w","cast:string->char-codes"],[["f","lambda"],["w","str"],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","char-code"]]]]]]],[["f","let"],["w","cast:chars->char-codes"],[["f","lambda"],["w","arr"],[["f","pi"],["w","arr"],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","char-code"]]]]]]],[["f","let"],["w","cast:chars->numbers"],[["f","lambda"],["w","arr"],[["f","pi"],["w","arr"],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","number"]]]]]]],[["f","let"],["w","cast:char->number"],[["f","safety"],["w","lambda"],["w","ch"],[["f","type"],["w","ch"],["w","number"]]]],[["f","let"],["w","cast:char->char-code"],[["f","safety"],["w","lambda"],["w","ch"],[["f","type"],["w","ch"],["w","char-code"]]]],[["f","let"],["w","cast:char-code->char"],[["f","safety"],["w","lambda"],["w","ch"],[["f","type"],["w","ch"],["w","char"]]]],[["f","let"],["w","cast:char-codes->chars"],[["f","lambda"],["w","arr"],[["f","pi"],["w","arr"],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","char"]]]]]]],[["f","let"],["w","cast:char-codes->string"],[["f","lambda"],["w","arr"],[["f","pi"],["w","arr"],[["f","array:map"],[["f","safety"],["w","lambda"],["w","x"],[["f","type"],["w","x"],["w","char"]]]],[["f","cast:chars->string"]]]]],[["f","let"],["w","math:square"],[["f","safety"],["w","lambda"],["w","x"],[["f","*"],["w","x"],["w","x"]]]],[["f","let"],["w","math:power"],[["f","lambda"],["w","base"],["w","exp"],[["f","if"],[["f","<"],["w","exp"],["a",0]],[["f","if"],[["f","="],["w","base"],["a",0]],[["f","throw"],["a","Attempting to divide by 0 in (math:power)"]],[["f","/"],[["f","*"],["w","base"],[["f","math:power"],["w","base"],[["f","-"],[["f","*"],["w","exp"],["a",-1]],["a",1]]]]]],[["f","cond"],[["f","="],["w","exp"],["a",0]],["a",1],[["f","="],["w","exp"],["a",1]],["w","base"],[["f","*"]],[["f","*"],["w","base"],[["f","math:power"],["w","base"],[["f","-"],["w","exp"],["a",1]]]]]]]],[["f","let"],["w","math:greatest-common-divisor"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let*"],["w","gcd"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f","="],["w","b"],["a",0]],["w","a"],[["f","gcd"],["w","b"],[["f","mod"],["w","a"],["w","b"]]]]]],[["f","gcd"],["w","a"],["w","b"]]]]],[["f","let"],["w","math:least-common-divisor"],[["f","lambda"],["w","a"],["w","b"],[["f","*"],["w","a"],["w","b"],[["f","/"],[["f","math:greatest-common-divisor"],["w","a"],["w","b"]]]]]],[["f","let"],["w","math:sqrt"],[["f","lambda"],["w","x"],[["f","do"],[["f","let"],["w","is-good-enough"],[["f","lambda"],["w","g"],["w","x"],[["f","<"],[["f","math:abs"],[["f","-"],[["f","math:square"],["w","g"]],["w","x"]]],["a",0.01]]]],[["f","let"],["w","improve-guess"],[["f","lambda"],["w","g"],["w","x"],[["f","math:average"],["w","g"],[["f","*"],["w","x"],[["f","/"],["w","g"]]]]]],[["f","let*"],["w","math:sqrt-iter"],[["f","lambda"],["w","g"],["w","x"],[["f","if"],[["f","is-good-enough"],["w","g"],["w","x"]],["w","g"],[["f","math:sqrt-iter"],[["f","improve-guess"],["w","g"],["w","x"]],["w","x"]]]]],[["f","math:sqrt-iter"],["a",1],["w","x"]]]]],[["f","let"],["w","math:circumference"],[["f","lambda"],["w","radius"],[["f","*"],["w","math:PI"],[["f","*"],["w","radius"],["a",2]]]]],[["f","let"],["w","math:hypotenuse"],[["f","lambda"],["w","a"],["w","b"],[["f","math:sqrt"],[["f","+"],[["f","*"],["w","a"],["w","a"]],[["f","*"],["w","b"],["w","b"]]]]]],[["f","let"],["w","math:abs"],[["f","safety"],["w","lambda"],["w","n"],[["f","-"],[["f","^"],["w","n"],[["f",">>"],["w","n"],["a",31]]],[["f",">>"],["w","n"],["a",31]]]]],[["f","let"],["w","math:nth-digit"],[["f","lambda"],["w","digit"],["w","n"],[["f","|"],[["f","mod"],[["f","/"],["w","digit"],[["f","math:power"],["a",10],[["f","-"],["w","n"],["a",1]]]],["a",10]],["a",0.5]]]],[["f","let"],["w","math:normalize"],[["f","safety"],["w","lambda"],["w","value"],["w","math:min"],["w","math:max"],[["f","*"],[["f","-"],["w","value"],["w","math:min"]],[["f","/"],[["f","-"],["w","math:max"],["w","math:min"]]]]]],[["f","let"],["w","math:linear-interpolation"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],["w","n"],[["f","+"],[["f","*"],[["f","-"],["a",1],["w","n"]],["w","a"]],[["f","*"],["w","n"],["w","b"]]]]],[["f","let"],["w","math:gauss-sum"],[["f","safety"],["w","lambda"],["w","n"],[["f","*"],["w","n"],[["f","+"],["w","n"],["a",1]],["a",0.5]]]],[["f","let"],["w","math:gauss-sum-sequance"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","*"],[["f","+"],["w","a"],["w","b"]],[["f","+"],[["f","-"],["w","b"],["w","a"]],["a",1]],["a",0.5]]]],[["f","let"],["w","math:clamp"],[["f","safety"],["w","lambda"],["w","x"],["w","limit"],[["f","if"],[["f",">"],["w","x"],["w","limit"]],["w","limit"],["w","x"]]]],[["f","let"],["w","math:odd?"],[["f","safety"],["w","lambda"],["w","x"],[["f","="],[["f","mod"],["w","x"],["a",2]],["a",1]]]],[["f","let"],["w","math:even?"],[["f","safety"],["w","lambda"],["w","x"],[["f","="],[["f","mod"],["w","x"],["a",2]],["a",0]]]],[["f","let"],["w","math:sign"],[["f","safety"],["w","lambda"],["w","n"],[["f","if"],[["f","<"],["w","n"],["a",0]],["a",-1],["a",1]]]],[["f","let"],["w","math:radians"],[["f","lambda"],["w","deg"],[["f","*"],["w","deg"],["w","math:PI"],[["f","/"],["a",180]]]]],[["f","let"],["w","math:average"],[["f","safety"],["w","lambda"],["w","x"],["w","y"],[["f","*"],[["f","+"],["w","x"],["w","y"]],["a",0.5]]]],[["f","let"],["w","math:euclidean-mod"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","mod"],[["f","+"],[["f","mod"],["w","a"],["w","b"]],["w","b"]],["w","b"]]]],[["f","let"],["w","math:euclidean-distance"],[["f","lambda"],["w","x1"],["w","y1"],["w","x2"],["w","y2"],[["f","do"],[["f","let"],["w","a"],[["f","-"],["w","x1"],["w","x2"]]],[["f","let"],["w","b"],[["f","-"],["w","y1"],["w","y2"]]],[["f","math:sqrt"],[["f","+"],[["f","*"],["w","a"],["w","a"]],[["f","*"],["w","b"],["w","b"]]]]]]],[["f","let"],["w","math:manhattan-distance"],[["f","lambda"],["w","x1"],["w","y1"],["w","x2"],["w","y2"],[["f","+"],[["f","math:abs"],[["f","-"],["w","x2"],["w","x1"]]],[["f","math:abs"],[["f","-"],["w","y2"],["w","y1"]]]]]],[["f","let"],["w","math:positive?"],[["f","safety"],["w","lambda"],["w","num"],[["f",">"],["w","num"],["a",0]]]],[["f","let"],["w","math:negative?"],[["f","safety"],["w","lambda"],["w","num"],[["f","<"],["w","num"],["a",0]]]],[["f","let"],["w","math:zero?"],[["f","safety"],["w","lambda"],["w","num"],[["f","="],["w","num"],["a",0]]]],[["f","let"],["w","math:divisible?"],[["f","safety"],["w","lambda"],["w","a"],["w","b"],[["f","="],[["f","mod"],["w","a"],["w","b"]],["a",0]]]],[["f","let"],["w","math:ascending?"],[["f","lambda"],["w","a"],["w","b"],[["f",">"],["w","a"],["w","b"]]]],[["f","let"],["w","math:descending?"],[["f","lambda"],["w","a"],["w","b"],[["f","<"],["w","a"],["w","b"]]]],[["f","let"],["w","math:prime?"],[["f","lambda"],["w","n"],[["f","cond"],[["f","="],["w","n"],["a",1]],["a",0],[["f","<"],["w","n"],["a",0]],["a",0],[["f","*"]],[["f","do"],[["f","let*"],["w","iter"],[["f","lambda"],["w","i"],["w","end"],[["f","do"],[["f","let"],["w","is-prime"],[["f","not"],[["f","="],[["f","mod"],["w","n"],["w","i"]],["a",0]]]],[["f","if"],[["f","and"],[["f","<="],["w","i"],["w","end"]],["w","is-prime"]],[["f","iter"],[["f","+"],["w","i"],["a",1]],["w","end"]],["w","is-prime"]]]]],[["f","or"],[["f","="],["w","n"],["a",2]],[["f","iter"],["a",2],[["f","math:sqrt"],["w","n"]]]]]]]],[["f","let"],["w","array:slice"],[["f","lambda"],["w","arr"],["w","start"],["w","end"],[["f","do"],[["f","let"],["w","bounds"],[["f","-"],["w","end"],["w","start"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],["w","out"],[["f","if"],[["f","<"],["w","i"],["w","bounds"]],[["f","iterate"],[["f","+"],["w","i"],["a",1]],[["f","array:merge!"],["w","out"],[["f","array"],[["f","array:get"],["w","arr"],[["f","+"],["w","start"],["w","i"]]]]]],["w","out"]]]],[["f","iterate"],["a",0],[]]]]],[["f","let"],["w","array:binary-search"],[["f","lambda"],["w","arr"],["w","target"],[["f","do"],[["f","let*"],["w","search"],[["f","lambda"],["w","arr"],["w","target"],["w","start"],["w","end"],[["f","do"],[["f","when"],[["f","<="],["w","start"],["w","end"]],[["f","do"],[["f","let"],["w","index"],[["f","math:floor"],[["f","*"],[["f","+"],["w","start"],["w","end"]],["a",0.5]]]],[["f","let"],["w","current"],[["f","array:get"],["w","arr"],["w","index"]]],[["f","if"],[["f","="],["w","target"],["w","current"]],["w","target"],[["f","if"],[["f",">"],["w","current"],["w","target"]],[["f","search"],["w","arr"],["w","target"],["w","start"],[["f","-"],["w","index"],["a",1]]],[["f","search"],["w","arr"],["w","target"],[["f","+"],["w","index"],["a",1]],["w","end"]]]]]]]]],[["f","search"],["w","arr"],["w","target"],["a",0],[["f","length"],["w","arr"]]]]]],[["f","let"],["w","array:zip"],[["f","lambda"],["w","A"],["w","B"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","a"],["w","b"],["w","output"],[["f","if"],[["f","and"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","iterate"],[["f","cdr"],["w","a"]],[["f","cdr"],["w","b"]],[["f","array:merge!"],["w","output"],[["f","array"],[["f","array"],[["f","car"],["w","a"]],[["f","car"],["w","b"]]]]]],["w","output"]]]],[["f","iterate"],["w","A"],["w","B"],[]]]]],[["f","let"],["w","math:cartesian-product"],[["f","lambda"],["w","a"],["w","b"],[["f","array:fold"],["w","a"],[["f","lambda"],["w","p"],["w","x"],[["f","array:merge!"],["w","p"],[["f","array:map"],["w","b"],[["f","lambda"],["w","y"],[["f","array"],["w","x"],["w","y"]]]]]],[]]]],[["f","let"],["w","array:equal?"],[["f","lambda"],["w","a"],["w","b"],[["f","or"],[["f","and"],[["f","number?"],["w","a"]],[["f","number?"],["w","b"]],[["f","="],["w","a"],["w","b"]]],[["f","and"],[["f","string?"],["w","a"]],[["f","string?"],["w","b"]],[["f","string:equal?"],["w","a"],["w","b"]]],[["f","and"],[["f","array?"],["w","a"]],[["f","="],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","not"],[["f","array:some?"],[["f","math:sequence"],["w","a"]],[["f","lambda"],["w","i"],[["f","not"],[["f","array:equal?"],[["f","array:get"],["w","a"],["w","i"]],[["f","array:get"],["w","b"],["w","i"]]]]]]]]]]],[["f","let"],["w","array:join"],[["f","lambda"],["w","arr"],["w","delim"],[["f","array:fold"],[["f","array:zip"],["w","arr"],[["f","math:sequence"],["w","arr"]]],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","car"],[["f","cdr"],["w","b"]]],["a",0]],[["f","string:merge"],["w","a"],["w","delim"],[["f","type"],[["f","car"],["w","b"]],["w","string"]]],[["f","type"],[["f","car"],["w","b"]],["w","string"]]]],["a",""]]]],[["f","let"],["w","array:flat-one"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","lambda"],["w","a"],["w","b"],[["f","array:merge!"],["w","a"],[["f","if"],[["f","array?"],["w","b"]],["w","b"],[["f","array"],["w","b"]]]]],[]]]],[["f","let"],["w","array:flat"],[["f","lambda"],["w","arr"],[["f","do"],[["f","let"],["w","flatten"],[["f","lambda"],["w","item"],[["f","if"],[["f","and"],[["f","array?"],["w","item"]],[["f","length"],["w","item"]]],[["f","array:fold"],["w","item"],[["f","lambda"],["w","a"],["w","b"],[["f","array:merge!"],["w","a"],[["f","flatten"],["w","b"]]]],[]],[["f","array"],["w","item"]]]]],[["f","flatten"],["w","arr"]]]]],[["f","let"],["w","array:sort"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","if"],[["f","<="],[["f","length"],["w","arr"]],["a",1]],["w","arr"],[["f","do"],[["f","let"],["w","pivot"],[["f","car"],["w","arr"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],["w","bounds"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","current"],[["f","array:get"],["w","arr"],["w","i"]]],[["f","let"],["w","predicate"],[["f","callback"],["w","current"],["w","pivot"]]],[["f","let"],["w","left"],[["f","if"],[["f","="],["w","predicate"],["a",0]],[["f","array:merge"],["w","a"],[["f","array"],["w","current"]]],["w","a"]]],[["f","let"],["w","right"],[["f","if"],[["f","="],["w","predicate"],["a",1]],[["f","array:merge"],["w","b"],[["f","array"],["w","current"]]],["w","b"]]],[["f","if"],[["f","<"],["w","i"],["w","bounds"]],[["f","iterate"],[["f","+"],["w","i"],["a",1]],["w","bounds"],["w","left"],["w","right"]],[["f","array"],["w","left"],["w","right"]]]]]],[["f","let"],["w","sorted"],[["f","iterate"],["a",1],[["f","-"],[["f","length"],["w","arr"]],["a",1]],[],[]]],[["f","let"],["w","left"],[["f","car"],["w","sorted"]]],[["f","let"],["w","right"],[["f","car"],[["f","cdr"],["w","sorted"]]]],[["f","array:merge"],[["f","array:sort"],["w","left"],["w","callback"]],[["f","array"],["w","pivot"]],[["f","array:sort"],["w","right"],["w","callback"]]]]]]]],[["f","let"],["w","array:set"],[["f","lambda"],["w","arr"],["w","index"],["w","item"],[["f","array:set!"],[["f","type"],["w","arr"],["w","array"]],["w","index"],["w","item"]]]],[["f","let"],["w","array:adjacent-difference"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let"],["w","len"],[["f","length"],["w","arr"]]],[["f","unless"],[["f","="],["w","len"],["a",1]],[["f","do"],[["f","array"],[["f","car"],["w","arr"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],["w","result"],[["f","if"],[["f","<"],["w","i"],["w","len"]],[["f","do"],[["f","iterate"],[["f","+"],["w","i"],["a",1]],[["f","array:set!"],["w","result"],["w","i"],[["f","callback"],[["f","array:get"],["w","arr"],[["f","-"],["w","i"],["a",1]]],[["f","array:get"],["w","arr"],["w","i"]]]]]],["w","result"]]]],[["f","iterate"],["a",1],["w","arr"]]],["w","arr"]]]]],[["f","let"],["w","array:adjacent-find"],[["f","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let"],["w","len"],[["f","length"],["w","arr"]]],[["f","otherwise"],[["f","="],["w","len"],["a",1]],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","i"],[["f","if"],[["f","<"],["w","i"],["w","len"]],[["f","if"],[["f","callback"],[["f","let"],["w","prev"],[["f","array:get"],["w","arr"],[["f","-"],["w","i"],["a",1]]]],[["f","let"],["w","current"],[["f","array:get"],["w","arr"],["w","i"]]]],["w","prev"],[["f","iterate"],[["f","+"],["w","i"],["a",1]]]],[]]]],[["f","iterate"],["a",1]]]]]]],[["f","let"],["w","array:adjacent"],[["f","lambda"],["w","arr"],["w","directions"],["w","y"],["w","x"],["w","callback"],[["f","array:for"],["w","directions"],[["f","lambda"],["w","dir"],[["f","do"],[["f","let"],["w","dy"],[["f","+"],[["f","car"],["w","dir"]],["w","y"]]],[["f","let"],["w","dx"],[["f","+"],[["f","car"],[["f","cdr"],["w","dir"]]],["w","x"]]],[["f","when"],[["f","and"],[["f","array:in-bounds?"],["w","arr"],["w","dy"]],[["f","array:in-bounds?"],[["f","array:get"],["w","arr"],["w","dy"]],["w","dx"]]],[["f","callback"],[["f","array:get"],[["f","array:get"],["w","arr"],["w","dy"]],["w","dx"]],["w","dir"]]]]]]]],[["f","let"],["w","array:partition"],[["f","lambda"],["w","arr"],["w","n"],[["f","array:fold"],[["f","array:zip"],["w","arr"],[["f","math:sequence"],["w","arr"]]],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","x"],[["f","car"],["w","b"]]],[["f","let"],["w","i"],[["f","car"],[["f","cdr"],["w","b"]]]],[["f","if"],[["f","mod"],["w","i"],["w","n"]],[["f","array:set!"],[["f","let"],["w","last-a"],[["f","array:get"],["w","a"],["a",-1]]],[["f","length"],["w","last-a"]],["w","x"]],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[["f","do"],[["f","let"],["w","mut-arr"],[]],[["f","array:set!"],["w","mut-arr"],[["f","length"],["w","mut-arr"]],["w","x"]]]]],["w","a"]]],[]]]],[["f","let"],["w","string:split"],[["f","lambda"],["w","str"],["w","delim"],[["f","do"],[["f","let"],["w","locals"],[]],[["f","let"],["w","delim-arr"],[["f","type"],["w","delim"],["w","array"]]],[["f","array:set!"],["w","locals"],[["f","length"],["w","locals"]],["w","delim-arr"]],[["f","array:set!"],["w","locals"],[["f","length"],["w","locals"]],[["f","type"],["w","str"],["w","array"]]],[["f","array:set!"],["w","locals"],[["f","length"],["w","locals"]],[["f","length"],["w","delim-arr"]]],[["f","array:set!"],["w","locals"],[["f","length"],["w","locals"]],["a",""]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","result"],["w","i"],["w","bounds"],[["f","if"],[["f","<"],[["f","if"],[["f","array:every?"],[["f","array:zip"],[["f","array:get"],["w","locals"],["a",0]],[["f","math:sequence"],["w","locals"]]],[["f","lambda"],["w","item"],[["f","do"],[["f","let"],["w","y"],[["f","car"],["w","item"]]],[["f","let"],["w","j"],[["f","car"],[["f","cdr"],["w","item"]]]],[["f","or"],[["f","<="],[["f","length"],[["f","array:get"],["w","locals"],["a",1]]],[["f","+"],["w","i"],["w","j"]]],[["f","="],[["f","type"],[["f","array:get"],[["f","array:get"],["w","locals"],["a",1]],[["f","+"],["w","i"],["w","j"]]],["w","char-code"]],[["f","type"],["w","y"],["w","char-code"]]]]]]],[["f","do"],[["f","array:set!"],["w","result"],[["f","length"],["w","result"]],[["f","array:get"],["w","locals"],["a",3]]],[["f","array:set!"],["w","locals"],["a",3],["a",""]],[["f","+"],["w","i"],[["f","array:get"],["w","locals"],["a",2]],["a",-1]]],[["f","do"],[["f","array:set!"],["w","locals"],["a",3],[["f","string:merge"],[["f","array:get"],["w","locals"],["a",3]],[["f","array:get"],[["f","array:get"],["w","locals"],["a",1]],["w","i"]]]],["w","i"]]],["w","bounds"]],[["f","iterate"],["w","result"],[["f","+"],["w","i"],["a",1]],["w","bounds"]],["w","result"]]]],[["f","array:set!"],[["f","let"],["w","iteration-result"],[["f","iterate"],[],["a",0],[["f","-"],[["f","length"],[["f","array:get"],["w","locals"],["a",1]]],["a",1]]]],[["f","length"],["w","iteration-result"]],[["f","array:get"],["w","locals"],["a",3]]]]]],[["f","let"],["w","array:shallow-copy"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","lambda"],["w","a"],["w","b"],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],["w","b"]]],[]]]],[["f","let"],["w","array:deep-copy"],[["f","lambda"],["w","arr"],[["f","array:fold"],["w","arr"],[["f","lambda"],["w","a"],["w","b"],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[["f","if"],[["f","array?"],["w","b"]],[["f","array:deep-copy"],["w","b"]],["w","b"]]]],[]]]],[["f","let"],["w","array:merge!"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","array:for"],["w","b"],[["f","lambda"],["w","x"],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],["w","x"]]]],["w","a"]]]],[["f","let"],["w","array:swap-remove!"],[["f","lambda"],["w","arr"],["w","i"],[["f","do"],[["f","array:set!"],["w","arr"],["w","i"],[["f","array:get"],["w","arr"],[["f","-"],[["f","length"],["w","arr"]],["a",1]]]],[["f","array:set!"],["w","arr"],["a",-1]]]]],[["f","let"],["w","array:index-of"],[["f","safety"],["w","lambda"],["w","arr"],["w","item"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","i"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","="],[["f","car"],["w","arr"]],["w","item"]],["w","i"],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","+"],["w","i"],["a",1]]]],["a",-1]]]],[["f","iterate"],["w","arr"],["a",0]]]]],[["f","let"],["w","string:index-of-char"],[["f","lambda"],["w","str"],["w","character"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","i"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","string:equal?"],[["f","car"],["w","arr"]],["w","character"]],["w","i"],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","+"],["w","i"],["a",1]]]],["a",-1]]]],[["f","iterate"],[["f","type"],["w","str"],["w","array"]],["a",0]]]]],[["f","let"],["w","string:match"],[["f","lambda"],["w","str"],["w","word"],[["f","do"],[["f","let"],["w","string-arr"],[["f","type"],["w","str"],["w","array"]]],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","i"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","string:equal?"],[["f","pi"],["w","string-arr"],[["f","array:slice"],["w","i"],[["f","+"],["w","i"],[["f","length"],["w","word"]]]],[["f","array:join"],["a",""]]],["w","word"]],["w","i"],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","+"],["w","i"],["a",1]]]],["a",-1]]]],[["f","iterate"],["w","toArr"],["a",0]]]]],[["f","let"],["w","array:find-index"],[["f","safety"],["w","lambda"],["w","arr"],["w","callback"],[["f","do"],[["f","let*"],["w","iterate"],[["f","lambda"],["w","arr"],["w","i"],[["f","if"],[["f","length"],["w","arr"]],[["f","if"],[["f","callback"],[["f","car"],["w","arr"]]],["w","i"],[["f","iterate"],[["f","cdr"],["w","arr"]],[["f","+"],["w","i"],["a",1]]]],["a",-1]]]],[["f","iterate"],["w","arr"],["a",0]]]]],[["f","let"],["w","array:remove"],[["f","lambda"],["w","arr"],["w","i"],[["f","array:fold"],["w","arr"],[["f","lambda"],["w","a"],["w","x"],[["f","do"],[["f","unless"],[["f","="],["w","x"],["w","i"]],[["f","array:merge!"],["w","a"],[["f","array"],["w","x"]]],["w","a"]]]],[]]]],[["f","let"],["w","array:pad-right"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","array:merge"],["w","b"],[["f","array"],[["f","-"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],["w","length"]]],[["f","array:merge"],["w","a"],[["f","array"],[["f","-"],[["f","length"],["w","b"]],[["f","length"],["w","a"]]],["w","length"]]]]]],[["f","let"],["w","array:pad-left"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","array:merge"],[["f","array"],[["f","-"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],["w","length"]],["w","b"]],[["f","array:merge"],[["f","array"],[["f","-"],[["f","length"],["w","b"]],[["f","length"],["w","a"]]],["w","length"]],["w","a"]]]]],[["f","let"],["w","array:pad-right!"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","array:merge!"],["w","b"],[["f","array"],[["f","-"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],["w","length"]]],[["f","array:merge!"],["w","a"],[["f","array"],[["f","-"],[["f","length"],["w","b"]],[["f","length"],["w","a"]]],["w","length"]]]]]],[["f","let"],["w","array:pad-left!"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],[["f","array:merge!"],[["f","array"],[["f","-"],[["f","length"],["w","a"]],[["f","length"],["w","b"]]],["w","length"]],["w","b"]],[["f","array:merge!"],[["f","array"],[["f","-"],[["f","length"],["w","b"]],[["f","length"],["w","a"]]],["w","length"]],["w","a"]]]]],[["f","let"],["w","string:greater?"],[["f","lambda"],["w","L"],["w","R"],[["f","otherwise"],[["f","string:equal?"],["w","L"],["w","R"]],[["f","do"],[["f","let"],["w","A"],[["f","cast:string->char-codes"],[["f","type"],["w","L"],["w","string"]]]],[["f","let"],["w","B"],[["f","cast:string->char-codes"],[["f","type"],["w","R"],["w","string"]]]],[["f","let"],["w","a"],[["f","if"],[["f","<"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],[["f","array:merge!"],["w","A"],[["f","array"],[["f","-"],[["f","length"],["w","B"]],[["f","length"],["w","A"]]],["w","length"]]],["w","A"]]],[["f","let"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],[["f","array:merge!"],["w","B"],[["f","array"],[["f","-"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],["w","length"]]],["w","B"]]],[["f","pi"],["w","a"],[["f","array:zip"],["w","b"]],[["f","array:fold"],[["f","lambda"],["w","acc"],["w","pair"],[["f","if"],[["f",">"],[["f","car"],["w","pair"]],[["f","car"],[["f","cdr"],["w","pair"]]]],["a",0],["w","acc"]]],["a",1]]]]]]],[["f","let"],["w","string:lesser?"],[["f","lambda"],["w","L"],["w","R"],[["f","otherwise"],[["f","string:equal?"],["w","L"],["w","R"]],[["f","do"],[["f","let"],["w","A"],[["f","cast:string->char-codes"],[["f","type"],["w","L"],["w","string"]]]],[["f","let"],["w","B"],[["f","cast:string->char-codes"],[["f","type"],["w","R"],["w","string"]]]],[["f","let"],["w","a"],[["f","if"],[["f","<"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],[["f","array:merge!"],["w","A"],[["f","array"],[["f","-"],[["f","length"],["w","B"]],[["f","length"],["w","A"]]],["w","length"]]],["w","A"]]],[["f","let"],["w","b"],[["f","if"],[["f",">"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],[["f","array:merge!"],["w","B"],[["f","array"],[["f","-"],[["f","length"],["w","A"]],[["f","length"],["w","B"]]],["w","length"]]],["w","B"]]],[["f","pi"],["w","a"],[["f","array:zip"],["w","b"]],[["f","array:fold"],[["f","lambda"],["w","acc"],["w","pair"],[["f","if"],[["f","<"],[["f","car"],["w","pair"]],[["f","car"],[["f","cdr"],["w","pair"]]]],["a",0],["w","acc"]]],["a",1]]]]]]],[["f","let"],["w","string:equal?"],[["f","lambda"],["w","L"],["w","R"],[["f","when"],[["f","="],[["f","length"],["w","L"]],[["f","length"],["w","R"]]],[["f","do"],[["f","let"],["w","a"],[["f","cast:string->char-codes"],["w","R"]]],[["f","let"],["w","b"],[["f","cast:string->char-codes"],["w","L"]]],[["f","pi"],["w","a"],[["f","array:zip"],["w","b"]],[["f","array:every?"],[["f","lambda"],["w","x"],[["f","="],[["f","car"],["w","x"]],[["f","car"],[["f","cdr"],["w","x"]]]]]]]]]]],[["f","let"],["w","new:set"],[["f","lambda"],["w","items"],[["f","set:add!"],[["f","array"],[],[],[],[]],["w","items"]]]],[["f","let"],["w","new:array"],[["f","safety"],["w","lambda"],["w","items"],[["f","type"],["w","items"],["w","array"]]]],[["f","let"],["w","new:list"],[["f","safety"],["w","lambda"],["w","value"],[["f","array"],[],["w","value"],[]]]],[["f","let"],["w","new:binary-tree"],[["f","safety"],["w","lambda"],["w","value"],[["f","do"],[["f","let"],["w","arr"],[]],[["f","array:set!"],["w","arr"],["a",0],["w","value"]],[["f","array:set!"],["w","arr"],["a",1],[]],[["f","array:set!"],["w","arr"],["a",2],[]],["w","arr"]]]],[["f","let"],["w","binary-tree:left"],[["f","safety"],["w","lambda"],["w","node"],[["f","array:get"],["w","node"],["a",1]]]],[["f","let"],["w","binary-tree:right"],[["f","safety"],["w","lambda"],["w","node"],[["f","array:get"],["w","node"],["a",2]]]],[["f","let"],["w","binary-tree:left!"],[["f","safety"],["w","lambda"],["w","tree"],["w","node"],[["f","array:set!"],["w","tree"],["a",1],["w","node"]]]],[["f","let"],["w","binary-tree:right!"],[["f","safety"],["w","lambda"],["w","tree"],["w","node"],[["f","array:set!"],["w","tree"],["a",2],["w","node"]]]],[["f","let"],["w","binary-tree:value"],[["f","safety"],["w","lambda"],["w","node"],[["f","car"],["w","node"]]]],[["f","let"],["w","set:index"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","prime-num"],["a",31]],[["f","let"],["w","key-arr"],[["f","type"],[["f","type"],["w","key"],["w","string"]],["w","array"]]],[["f","let"],["w","total"],[["f","array"],["a",0]]],[["f","let*"],["w","find-hash-index"],[["f","lambda"],["w","i"],["w","bounds"],[["f","do"],[["f","let"],["w","letter"],[["f","array:get"],["w","key-arr"],["w","i"]]],[["f","let"],["w","value"],[["f","-"],[["f","type"],["w","letter"],["w","char-code"]],["a",96]]],[["f","array:set!"],["w","total"],["a",0],[["f","math:euclidean-mod"],[["f","+"],[["f","*"],[["f","car"],["w","total"]],["w","prime-num"]],["w","value"]],[["f","length"],["w","table"]]]],[["f","if"],[["f","<"],["w","i"],["w","bounds"]],[["f","find-hash-index"],[["f","+"],["w","i"],["a",1]],["w","bounds"]],[["f","car"],["w","total"]]]]]],[["f","find-hash-index"],["a",0],[["f","if"],[["f","<"],[["f","-"],[["f","length"],["w","key-arr"]],["a",1]],["a",100]],[["f","-"],[["f","length"],["w","key-arr"]],["a",1]],["a",100]]]]]],[["f","let"],["w","set:add!"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","otherwise"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","array:set!"],["w","table"],["w","idx"],[["f","array"]]]],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","len"],[["f","length"],["w","current"]]],[["f","let"],["w","index"],[["f","if"],["w","len"],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","x"],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",-1]]],[["f","let"],["w","entry"],["w","key"]],[["f","if"],[["f","="],["w","index"],["a",-1]],[["f","array:set!"],["w","current"],[["f","length"],["w","current"]],["w","entry"]],[["f","array:set!"],["w","current"],["w","index"],["w","entry"]]],["w","table"]]]],[["f","let"],["w","set:remove!"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","otherwise"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","array:set!"],["w","table"],["w","idx"],[["f","Array"]]]],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","len"],[["f","length"],["w","current"]]],[["f","let"],["w","index"],[["f","if"],["w","len"],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","x"],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",-1]]],[["f","let"],["w","entry"],["w","key"]],[["f","otherwise"],[["f","="],["w","index"],["a",-1]],[["f","and"],[["f","array:set!"],["w","current"],["w","index"],[["f","array:get"],["w","current"],["a",-1]]],[["f","array:set!"],["w","current"],["a",-1]]]],["w","table"]]]],[["f","let"],["w","set:has?"],[["f","lambda"],["w","table"],["w","key"],[["f","and"],[["f","array:in-bounds?"],["w","table"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]]],[["f","and"],[["f","length"],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]]],[["f",">="],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","x"],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",0]]]]]],[["f","let"],["w","set:intersection"],[["f","lambda"],["w","a"],["w","b"],[["f","pi"],["w","b"],[["f","cast:table->array"]],[["f","array:fold"],[["f","lambda"],["w","out"],["w","element"],[["f","do"],[["f","when"],[["f","set:has?"],["w","a"],["w","element"]],[["f","set:add!"],["w","out"],["w","element"]]],["w","out"]]],[["f","array"],[],[],[],[],[]]]]]],[["f","let"],["w","set:difference"],[["f","lambda"],["w","a"],["w","b"],[["f","pi"],["w","a"],[["f","cast:table->array"]],[["f","array:fold"],[["f","lambda"],["w","out"],["w","element"],[["f","do"],[["f","when"],[["f","not"],[["f","set:has?"],["w","b"],["w","element"]]],[["f","set:add!"],["w","out"],["w","element"]]],["w","out"]]],[["f","array"],[],[],[],[],[]]]]]],[["f","let"],["w","set:xor"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","out"],[["f","array"],[],[],[],[],[]]],[["f","pi"],["w","a"],[["f","cast:table->array"]],[["f","array:for"],[["f","lambda"],["w","element"],[["f","when"],[["f","not"],[["f","set:has?"],["w","b"],["w","element"]]],[["f","set:add!"],["w","out"],["w","element"]]]]]],[["f","pi"],["w","b"],[["f","cast:table->array"]],[["f","array:for"],[["f","lambda"],["w","element"],[["f","when"],[["f","not"],[["f","set:has?"],["w","a"],["w","element"]]],[["f","set:add!"],["w","out"],["w","element"]]]]]],["w","out"]]]],[["f","let"],["w","set:union"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","out"],[["f","array"],[],[],[],[],[]]],[["f","pi"],["w","a"],[["f","cast:table->array"]],[["f","array:for"],[["f","lambda"],["w","element"],[["f","set:add!"],["w","out"],["w","element"]]]]],[["f","pi"],["w","b"],[["f","cast:table->array"]],[["f","array:for"],[["f","lambda"],["w","element"],[["f","set:add!"],["w","out"],["w","element"]]]]],["w","out"]]]],[["f","let"],["w","cast:table->array"],[["f","lambda"],["w","set"],[["f","array:select"],[["f","array:flat"],["w","set"]],["w","atom?"]]]],[["f","let"],["w","set:empty!"],[["f","lambda"],["w","table"],[["f","array:map"],["w","table"],["w","empty!"]]]],[["f","let"],["w","map:empty!"],[["f","lambda"],["w","table"],[["f","array:map"],["w","table"],["w","empty!"]]]],[["f","let"],["w","map:set!"],[["f","lambda"],["w","table"],["w","key"],["w","value"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","otherwise"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","array:set!"],["w","table"],["w","idx"],[]]],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","len"],[["f","length"],["w","current"]]],[["f","let"],["w","index"],[["f","if"],["w","len"],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],[["f","car"],["w","x"]],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",-1]]],[["f","let"],["w","entry"],[["f","array"],["w","key"],["w","value"]]],[["f","if"],[["f","="],["w","index"],["a",-1]],[["f","array:set!"],["w","current"],[["f","length"],["w","current"]],["w","entry"]],[["f","array:set!"],["w","current"],["w","index"],["w","entry"]]],["w","table"]]]],[["f","let"],["w","map:remove!"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","otherwise"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","array:set!"],["w","table"],["w","idx"],[]]],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","len"],[["f","length"],["w","current"]]],[["f","let"],["w","index"],[["f","if"],["w","len"],[["f","array:find-index"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],[["f","car"],["w","x"]],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",-1]]],[["f","otherwise"],[["f","="],["w","index"],["a",-1]],[["f","and"],[["f","array:set!"],["w","current"],["w","index"],[["f","array:get"],["w","current"],["a",-1]]],[["f","array:set!"],["w","current"],["a",-1]]]],["w","table"]]]],[["f","let"],["w","map:get"],[["f","lambda"],["w","table"],["w","key"],[["f","do"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]],[["f","when"],[["f","array:in-bounds?"],["w","table"],["w","idx"]],[["f","do"],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]],[["f","let"],["w","found"],[["f","array:find"],["w","current"],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","key"],["w","string"]],[["f","type"],[["f","array:get"],["w","x"],["a",0]],["w","string"]]]]]],[["f","when"],[["f","length"],["w","found"]],[["f","array:get"],["w","found"],["a",1]]]]]]]],[["f","let"],["w","cast:map->string"],[["f","lambda"],["w","table"],[["f","pi"],["w","table"],[["f","array:select"],["w","length"]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","array:join"],[["f","array:map"],["w","x"],[["f","lambda"],["w","y"],[["f","array:join"],["w","y"],["a"," -> "]]]],["a"," "]]]],[["f","array:join"],["a","\n"]]]]],[["f","let"],["w","map:has?"],[["f","lambda"],["w","table"],["w","key"],[["f","and"],[["f","array:in-bounds?"],["w","table"],[["f","let"],["w","idx"],[["f","set:index"],["w","table"],["w","key"]]]],[["f","and"],[["f","length"],[["f","let"],["w","current"],[["f","array:get"],["w","table"],["w","idx"]]]],[["f",">="],[["f","array:find-index"],[["f","car"],["w","current"]],[["f","lambda"],["w","x"],[["f","string:equal?"],[["f","type"],["w","x"],["w","string"]],[["f","type"],["w","key"],["w","string"]]]]],["a",0]]]]]],[["f","let"],["w","list:prev!"],[["f","safety"],["w","lambda"],["w","list"],["w","node"],[["f","array:set!"],["w","list"],["a",0],[["f","array:set!"],["w","node"],["a",2],["w","list"]]]]],[["f","let"],["w","list:next!"],[["f","safety"],["w","lambda"],["w","list"],["w","node"],[["f","array:set!"],["w","list"],["a",2],[["f","array:set!"],["w","node"],["a",0],["w","list"]]]]],[["f","let"],["w","list:prev"],[["f","safety"],["w","lambda"],["w","list"],[["f","array:get"],["w","list"],["a",0]]]],[["f","let"],["w","list:next"],[["f","safety"],["w","lambda"],["w","list"],[["f","array:get"],["w","list"],["a",2]]]],[["f","let"],["w","list:value"],[["f","lambda"],["w","node"],[["f","array:get"],["w","node"],["a",1]]]],[["f","let"],["w","array:rotate-right"],[["f","lambda"],["w","arr"],["w","n"],[["f","pi"],["w","arr"],[["f","array:zip"],[["f","math:sequence"],["w","arr"]]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","array:set!"],["w","a"],[["f","mod"],[["f","+"],[["f","car"],[["f","cdr"],["w","b"]]],["w","n"]],[["f","length"],["w","arr"]]],[["f","car"],["w","b"]]]],[["f","array"],[["f","length"],["w","arr"]],["w","length"]]]]]],[["f","let"],["w","array:rotate-left"],[["f","lambda"],["w","arr"],["w","n"],[["f","pi"],["w","arr"],[["f","array:zip"],[["f","math:sequence"],["w","arr"]]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","array:set!"],["w","a"],[["f","mod"],[["f","+"],[["f","car"],[["f","cdr"],["w","b"]]],[["f","-"],[["f","length"],["w","arr"]],["w","n"]]],[["f","length"],["w","arr"]]],[["f","car"],["w","b"]]]],[["f","array"],[["f","length"],["w","arr"]],["w","length"]]]]]],[["f","let"],["w","var:def"],[["f","safety"],["w","lambda"],["w","val"],[["f","array"],["w","val"]]]],[["f","let"],["w","var:get"],[["f","safety"],["w","lambda"],["w","variable"],[["f","car"],["w","variable"]]]],[["f","let"],["w","var:set!"],[["f","safety"],["w","lambda"],["w","variable"],["w","value"],[["f","array:set!"],["w","variable"],["a",0],["w","value"]]]],[["f","let"],["w","var:del!"],[["f","safety"],["w","lambda"],["w","variable"],[["f","array:set!"],["w","variable"],["a",-1]]]],[["f","let"],["w","array:first"],[["f","safety"],["w","lambda"],["w","arr"],[["f","array:get"],["w","arr"],["a",0]]]],[["f","let"],["w","array:last"],[["f","safety"],["w","lambda"],["w","arr"],[["f","array:get"],["w","arr"],["a",-1]]]],[["f","let"],["w","string:trim-left"],[["f","lambda"],["w","str"],[["f","do"],[["f","let"],["w","tr"],[["f","array"],["a",1]]],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f","and"],[["f","car"],["w","tr"]],[["f","string:equal?"],["w","b"],["a"," "]]],["w","a"],[["f","do"],[["f","when"],[["f","car"],["w","tr"]],[["f","array:set!"],["w","tr"],["a",0],["a",0]]],[["f","string:merge"],["w","a"],["w","b"]]]]],["a",""]]]]]],[["f","let"],["w","string:trim-right"],[["f","lambda"],["w","str"],[["f","do"],[["f","let"],["w","tr"],[["f","array"],["a",1]]],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:reverse"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","if"],[["f","and"],[["f","car"],["w","tr"]],[["f","string:equal?"],["w","b"],["a"," "]]],["w","a"],[["f","do"],[["f","when"],[["f","car"],["w","tr"]],[["f","array:set!"],["w","tr"],["a",0],["a",0]]],[["f","string:merge"],["w","b"],["w","a"]]]]],["a",""]]]]]],[["f","let"],["w","string:trim"],[["f","lambda"],["w","str"],[["f","pi"],["w","str"],[["f","string:trim-left"]],[["f","string:trim-right"]]]]],[["f","let"],["w","array:enumerate"],[["f","lambda"],["w","arr"],[["f","array:zip"],[["f","math:sequence"],["w","arr"]],["w","arr"]]]],[["f","let"],["w","string:lines"],[["f","lambda"],["w","str"],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","prev"],[["f","array:get"],["w","a"],["a",-1]]],[["f","if"],[["f","string:equal?"],["w","b"],["a","\n"]],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[]],[["f","array:set!"],["w","prev"],[["f","length"],["w","prev"]],["w","b"]]],["w","a"]]],[["f","array"],[]]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","array:join"],["w","x"],["a",""]]]]]]],[["f","let"],["w","string:words"],[["f","lambda"],["w","str"],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","prev"],[["f","array:get"],["w","a"],["a",-1]]],[["f","if"],[["f","string:equal?"],["w","b"],["a"," "]],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[]],[["f","array:set!"],["w","prev"],[["f","length"],["w","prev"]],["w","b"]]],["w","a"]]],[["f","array"],[]]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","array:join"],["w","x"],["a",""]]]]]]],[["f","let"],["w","string:separator"],[["f","lambda"],["w","str"],["w","separator"],[["f","pi"],["w","str"],[["f","type"],["w","array"]],[["f","array:fold"],[["f","lambda"],["w","a"],["w","b"],[["f","do"],[["f","let"],["w","prev"],[["f","array:get"],["w","a"],["a",-1]]],[["f","if"],[["f","string:equal?"],["w","b"],["w","separator"]],[["f","array:set!"],["w","a"],[["f","length"],["w","a"]],[]],[["f","array:set!"],["w","prev"],[["f","length"],["w","prev"]],["w","b"]]],["w","a"]]],[["f","array"],[]]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","array:join"],["w","x"],["a",""]]]]]]],[["f","let"],["w","new:brray"],[["f","lambda"],[["f","array"],[["f","array"],[]],[]]]],[["f","let"],["w","brray:offset-left"],[["f","lambda"],["w","q"],[["f","*"],[["f","-"],[["f","length"],[["f","array:get"],["w","q"],["a",0]]],["a",1]],["a",-1]]]],[["f","let"],["w","brray:offset-right"],[["f","lambda"],["w","q"],[["f","length"],[["f","array:get"],["w","q"],["a",1]]]]],[["f","let"],["w","brray:length"],[["f","lambda"],["w","q"],[["f","+"],[["f","length"],[["f","array:get"],["w","q"],["a",0]]],[["f","length"],[["f","array:get"],["w","q"],["a",1]]],["a",-1]]]],[["f","let"],["w","brray:empty?"],[["f","lambda"],["w","q"],[["f","not"],[["f","brray:length"],["w","q"]]]]],[["f","let"],["w","brray:empty!"],[["f","lambda"],["w","q"],[["f","do"],[["f","array:set!"],["w","q"],["a",0],[["f","array"],[]]],[["f","array:set!"],["w","q"],["a",1],[]],["w","q"]]]],[["f","let"],["w","brray:get"],[["f","lambda"],["w","q"],["w","offset"],[["f","do"],[["f","let"],["w","offset-index"],[["f","+"],["w","offset"],[["f","brray:offset-left"],["w","q"]]]],[["f","let"],["w","index"],[["f","if"],[["f","<"],["w","offset-index"],["a",0]],[["f","*"],["w","offset-index"],["a",-1]],["w","offset-index"]]],[["f","if"],[["f",">="],["w","offset-index"],["a",0]],[["f","array:get"],[["f","array:get"],["w","q"],["a",1]],["w","index"]],[["f","array:get"],[["f","array:get"],["w","q"],["a",0]],["w","index"]]]]]],[["f","let"],["w","brray:set!"],[["f","lambda"],["w","q"],["w","index"],["w","value"],[["f","do"],[["f","let"],["w","offset"],[["f","+"],["w","offset"],[["f","brray:offset-left"],["w","q"]]]],[["f","if"],[["f",">="],["w","offset"],["a",0]],[["f","array:set!"],[["f","array:get"],["w","q"],["a",1]],["w","offset"],["w","value"]],[["f","array:set!"],[["f","array:get"],["w","q"],["a",0]],[["f","*"],["w","offset"],["a",-1]],["w","value"]]],["w","q"]]]],[["f","let"],["w","brray:add-to-left!"],[["f","lambda"],["w","q"],["w","item"],[["f","array:set!"],[["f","let"],["w","c"],[["f","array:get"],["w","q"],["a",0]]],[["f","length"],["w","c"]],["w","item"]]]],[["f","let"],["w","brray:add-to-right!"],[["f","lambda"],["w","q"],["w","item"],[["f","array:set!"],[["f","let"],["w","c"],[["f","array:get"],["w","q"],["a",1]]],[["f","length"],["w","c"]],["w","item"]]]],[["f","let"],["w","brray:remove-from-left!"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","len"],[["f","brray:length"],["w","q"]]],[["f","when"],["w","len"],[["f","cond"],[["f","="],["w","len"],["a",1]],[["f","brray:empty!"],["w","q"]],[["f",">"],[["f","length"],[["f","array:get"],["w","q"],["a",0]]],["a",0]],[["f","array:set!"],[["f","array:get"],["w","q"],["a",0]],["a",-1]]]]]]],[["f","let"],["w","brray:remove-from-right!"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","len"],[["f","brray:length"],["w","q"]]],[["f","when"],["w","len"],[["f","cond"],[["f","="],["w","len"],["a",1]],[["f","brray:empty!"],["w","q"]],[["f",">"],[["f","length"],[["f","array:get"],["w","q"],["a",1]]],["a",0]],[["f","array:set!"],[["f","array:get"],["w","q"],["a",1]],["a",-1]]]]]]],[["f","let"],["w","brray:iter"],[["f","lambda"],["w","q"],["w","callback"],[["f","do"],[["f","let*"],["w","iter"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","callback"],[["f","brray:get"],["w","q"],["w","index"]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","iter"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","iter"],["a",0],[["f","brray:length"],["w","q"]]]]]],[["f","let"],["w","brray:map"],[["f","lambda"],["w","q"],["w","callback"],[["f","do"],[["f","let"],["w","result"],[["f","new:brray"]]],[["f","let"],["w","len"],[["f","brray:length"],["w","q"]]],[["f","let"],["w","half"],[["f","math:floor"],[["f","*"],["w","len"],["a",0.5]]]],[["f","let*"],["w","left"],[["f","lambda"],["w","index"],[["f","do"],[["f","brray:add-to-left!"],["w","result"],[["f","callback"],[["f","brray:get"],["w","q"],["w","index"]]]],[["f","when"],[["f",">"],["w","index"],["a",0]],[["f","left"],[["f","-"],["w","index"],["a",1]]]]]]],[["f","left"],[["f","-"],["w","half"],["a",1]]],[["f","let*"],["w","rigth"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","brray:add-to-right!"],["w","result"],[["f","callback"],[["f","brray:get"],["w","q"],["w","index"]]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","rigth"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","rigth"],["w","half"],[["f","-"],["w","len"],["a",1]]],["w","result"]]]],[["f","let"],["w","cast:brray->array"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","out"],[]],[["f","let*"],["w","iter"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","array:set!"],["w","out"],[["f","length"],["w","out"]],[["f","brray:get"],["w","q"],["w","index"]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","iter"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","iter"],["a",0],[["f","-"],[["f","brray:length"],["w","q"]],["a",1]]],["w","out"]]]],[["f","let"],["w","brray:balance?"],[["f","lambda"],["w","q"],[["f","="],[["f","+"],[["f","brray:offset-right"],["w","q"]],[["f","brray:offset-left"],["w","q"]]],["a",0]]]],[["f","let"],["w","brray:balance!"],[["f","lambda"],["w","q"],[["f","if"],[["f","brray:balance?"],["w","q"]],["w","q"],[["f","do"],[["f","let"],["w","initial"],[["f","cast:brray->array"],["w","q"]]],[["f","brray:empty!"],["w","q"]],[["f","let"],["w","half"],[["f","math:floor"],[["f","*"],[["f","length"],["w","initial"]],["a",0.5]]]],[["f","let*"],["w","left"],[["f","lambda"],["w","index"],[["f","do"],[["f","brray:add-to-left!"],["w","q"],[["f","array:get"],["w","initial"],["w","index"]]],[["f","when"],[["f",">"],["w","index"],["a",0]],[["f","left"],[["f","-"],["w","index"],["a",1]]]]]]],[["f","left"],[["f","-"],["w","half"],["a",1]]],[["f","let*"],["w","rigth"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","brray:add-to-right!"],["w","q"],[["f","array:get"],["w","initial"],["w","index"]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","rigth"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","rigth"],["w","half"],[["f","-"],[["f","length"],["w","initial"]],["a",1]]],["w","q"]]]]],[["f","let"],["w","brray:append!"],[["f","lambda"],["w","q"],["w","item"],[["f","do"],[["f","brray:add-to-right!"],["w","q"],["w","item"]],["w","q"]]]],[["f","let"],["w","brray:prepend!"],[["f","lambda"],["w","q"],["w","item"],[["f","do"],[["f","brray:add-to-left!"],["w","q"],["w","item"]],["w","q"]]]],[["f","let"],["w","brray:head!"],[["f","lambda"],["w","q"],[["f","do"],[["f","when"],[["f","="],[["f","brray:offset-right"],["w","q"]],["a",0]],[["f","brray:balance!"],["w","q"]]],[["f","brray:remove-from-right!"],["w","q"]],["w","q"]]]],[["f","let"],["w","brray:tail!"],[["f","lambda"],["w","q"],[["f","do"],[["f","when"],[["f","="],[["f","brray:offset-left"],["w","q"]],["a",0]],[["f","brray:balance!"],["w","q"]]],[["f","brray:remove-from-left!"],["w","q"]],["w","q"]]]],[["f","let"],["w","brray:first"],[["f","lambda"],["w","q"],[["f","brray:get"],["w","q"],["a",0]]]],[["f","let"],["w","brray:last"],[["f","lambda"],["w","q"],[["f","brray:get"],["w","q"],[["f","-"],[["f","brray:length"],["w","q"]],["a",1]]]]],[["f","let"],["w","brray:pop-right!"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","last"],[["f","brray:last"],["w","q"]]],[["f","brray:head!"],["w","q"]],["w","last"]]]],[["f","let"],["w","brray:pop-left!"],[["f","lambda"],["w","q"],[["f","do"],[["f","let"],["w","first"],[["f","brray:first"],["w","q"]]],[["f","brray:tail!"],["w","q"]],["w","first"]]]],[["f","let"],["w","brray:rotate-left!"],[["f","lambda"],["w","q"],["w","n"],[["f","do"],[["f","let"],["w","N"],[["f","mod"],["w","n"],[["f","brray:length"],["w","q"]]]],[["f","let*"],["w","iter"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","when"],[["f","="],[["f","brray:offset-left"],["w","q"]],["a",0]],[["f","brray:balance!"],["w","q"]]],[["f","brray:add-to-right!"],["w","q"],[["f","brray:first"],["w","q"]]],[["f","brray:remove-from-left!"],["w","q"]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","iter"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","iter"],["a",0],["w","N"]],["w","q"]]]],[["f","let"],["w","brray:rotate-right!"],[["f","lambda"],["w","q"],["w","n"],[["f","do"],[["f","let"],["w","N"],[["f","mod"],["w","n"],[["f","brray:length"],["w","q"]]]],[["f","let*"],["w","iter"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","when"],[["f","="],[["f","brray:offset-right"],["w","q"]],["a",0]],[["f","brray:balance!"],["w","q"]]],[["f","brray:add-to-left!"],["w","q"],[["f","brray:last"],["w","q"]]],[["f","brray:remove-from-right!"],["w","q"]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","iter"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","iter"],["a",0],["w","N"]],["w","q"]]]],[["f","let"],["w","cast:array->brray"],[["f","lambda"],["w","initial"],[["f","do"],[["f","let"],["w","q"],[["f","new:brray"]]],[["f","let"],["w","half"],[["f","math:floor"],[["f","*"],[["f","length"],["w","initial"]],["a",0.5]]]],[["f","let*"],["w","left"],[["f","lambda"],["w","index"],[["f","do"],[["f","brray:add-to-left!"],["w","q"],[["f","array:get"],["w","initial"],["w","index"]]],[["f","when"],[["f",">"],["w","index"],["a",0]],[["f","left"],[["f","-"],["w","index"],["a",1]]]]]]],[["f","left"],[["f","-"],["w","half"],["a",1]]],[["f","let*"],["w","rigth"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","brray:add-to-right!"],["w","q"],[["f","array:get"],["w","initial"],["w","index"]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","rigth"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","rigth"],["w","half"],[["f","-"],[["f","length"],["w","initial"]],["a",1]]],["w","q"]]]],[["f","let"],["w","brray:slice"],[["f","lambda"],["w","entity"],["w","s"],["w","e"],[["f","do"],[["f","let"],["w","len"],[["f","brray:length"],["w","entity"]]],[["f","let"],["w","start"],[["f","if"],[["f","<"],["w","s"],["a",0]],[["f","math:max"],[["f","+"],["w","len"],["w","s"]],["a",0]],[["f","math:min"],["w","s"],["w","len"]]]],[["f","let"],["w","end"],[["f","if"],[["f","<"],["w","e"],["a",0]],[["f","math:max"],[["f","+"],["w","len"],["w","e"]],["a",0]],[["f","math:min"],["w","e"],["w","len"]]]],[["f","let"],["w","slice"],[["f","new:brray"]]],[["f","let"],["w","slice-len"],[["f","math:max"],[["f","-"],["w","end"],["w","start"]],["a",0]]],[["f","let"],["w","half"],[["f","math:floor"],[["f","*"],["w","slice-len"],["a",0.5]]]],[["f","let*"],["w","left"],[["f","lambda"],["w","index"],[["f","do"],[["f","brray:add-to-left!"],["w","slice"],[["f","brray:get"],["w","entity"],[["f","+"],["w","start"],["w","index"]]]],[["f","when"],[["f",">"],["w","index"],["a",0]],[["f","left"],[["f","-"],["w","index"],["a",1]]]]]]],[["f","left"],[["f","-"],["w","half"],["a",1]]],[["f","let*"],["w","rigth"],[["f","lambda"],["w","index"],["w","bounds"],[["f","do"],[["f","brray:add-to-right!"],["w","slice"],[["f","brray:get"],["w","entity"],[["f","+"],["w","start"],["w","index"]]]],[["f","when"],[["f","<"],["w","index"],["w","bounds"]],[["f","rigth"],[["f","+"],["w","index"],["a",1]],["w","bounds"]]]]]],[["f","rigth"],["w","half"],[["f","-"],["w","slice-len"],["a",1]]],["w","slice"]]]],[["f","let"],["w","date:add-seconds"],[["f","lambda"],["w","date-time"],["w","seconds"],[["f","+"],["w","date-time"],[["f","*"],["w","seconds"],["a",1000]]]]],[["f","let"],["w","date:add-minutes"],[["f","lambda"],["w","date-time"],["w","minutes"],[["f","+"],["w","date-time"],[["f","*"],["w","minutes"],["a",1000],["a",60]]]]],[["f","let"],["w","date:add-hours"],[["f","lambda"],["w","date-time"],["w","hours"],[["f","+"],["w","date-time"],[["f","*"],["w","hours"],["a",1000],["a",60],["a",60]]]]],[["f","let"],["w","date:add-days"],[["f","lambda"],["w","date-time"],["w","days"],[["f","+"],["w","date-time"],[["f","*"],["w","days"],["a",1000],["a",60],["a",60],["a",24]]]]],[["f","let"],["w","date:add-months"],[["f","lambda"],["w","date-time"],["w","months"],[["f","+"],["w","date-time"],[["f","*"],["w","months"],["a",1000],["a",60],["a",60],["a",24],["a",30]]]]],[["f","let"],["w","date:add-years"],[["f","lambda"],["w","date-time"],["w","years"],[["f","+"],["w","date-time"],[["f","*"],["w","years"],["a",1000],["a",60],["a",60],["a",24],["a",365]]]]],[["f","let"],["w","date:sub-seconds"],[["f","lambda"],["w","date-time"],["w","seconds"],[["f","-"],["w","date-time"],[["f","*"],["w","seconds"],["a",1000]]]]],[["f","let"],["w","date:sub-minutes"],[["f","lambda"],["w","date-time"],["w","minutes"],[["f","-"],["w","date-time"],[["f","*"],["w","minutes"],["a",1000],["a",60]]]]],[["f","let"],["w","date:sub-hours"],[["f","lambda"],["w","date-time"],["w","hours"],[["f","-"],["w","date-time"],[["f","*"],["w","hours"],["a",1000],["a",60],["a",60]]]]],[["f","let"],["w","date:sub-days"],[["f","lambda"],["w","date-time"],["w","days"],[["f","-"],["w","date-time"],[["f","*"],["w","days"],["a",1000],["a",60],["a",60],["a",24]]]]],[["f","let"],["w","date:sub-months"],[["f","lambda"],["w","date-time"],["w","months"],[["f","-"],["w","date-time"],[["f","*"],["w","months"],["a",1000],["a",60],["a",60],["a",24],["a",30]]]]],[["f","let"],["w","date:sub-years"],[["f","lambda"],["w","date-time"],["w","years"],[["f","-"],["w","date-time"],[["f","*"],["w","years"],["a",1000],["a",60],["a",60],["a",24],["a",365]]]]],[["f","let"],["w","math:permutations"],[["f","lambda"],["w","xs"],[["f","unless"],[["f","length"],["w","xs"]],[["f","array"],[]],[["f","pi"],["w","xs"],[["f","array:flat-one"]],[["f","array:map"],[["f","lambda"],["w","x"],[["f","pi"],["w","xs"],[["f","array:exclude"],[["f","lambda"],["w","y"],[["f","="],["w","x"],["w","y"]]]],[["f","math:permutations"]],[["f","array:map"],[["f","lambda"],["w","vs"],[["f","array:fold"],["w","vs"],[["f","lambda"],["w","a"],["w","b"],[["f","array:merge!"],["w","a"],["w","b"]]],[["f","array"],["w","x"]]]]]]]]]]]]]
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.26",
5
+ "version": "1.0.28",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/compiler.js CHANGED
@@ -321,6 +321,7 @@ const compile = (tree, Variables) => {
321
321
  case KEYWORDS.ATOM:
322
322
  case KEYWORDS.TEST_CASE:
323
323
  case KEYWORDS.TEST_BED:
324
+ case KEYWORDS.DOC:
324
325
  return ''
325
326
  default: {
326
327
  const camelCased = lispToJavaScriptVariableName(token)
package/src/enums.js CHANGED
@@ -77,4 +77,5 @@ export const KEYWORDS = {
77
77
  SERIALISE: 'serialise',
78
78
 
79
79
  SET_ARRAY: 'array:set!',
80
+ DOC: 'fez-manual',
80
81
  }
@@ -0,0 +1,91 @@
1
+ import {
2
+ APPLY,
3
+ ATOM,
4
+ PLACEHOLDER,
5
+ KEYWORDS,
6
+ TYPE,
7
+ VALUE,
8
+ WORD,
9
+ } from './enums.js'
10
+ import { isLeaf, parse } from './parser.js'
11
+ import { removeNoCode } from './utils.js'
12
+ const tops = []
13
+ const indent = (level) => ' '.repeat(level)
14
+ const singleArg = (Arguments) => (Arguments.length === 0 ? '' : ' ')
15
+ const traverse = (exp, level = 0) => {
16
+ if (!exp) return ''
17
+ const [first, ...Arguments] = !isLeaf(exp) ? exp : [exp]
18
+ if (first == undefined) return '()'
19
+ const token = first[VALUE]
20
+ if (first[TYPE] === APPLY) {
21
+ switch (token) {
22
+ case KEYWORDS.BLOCK: {
23
+ if (Arguments.length > 1) {
24
+ return `(${token} ${Arguments.map((x) =>
25
+ traverse(x, ++level).toString()
26
+ ).join(' ')})`
27
+ } else {
28
+ return traverse(Arguments[0], ++level).toString()
29
+ }
30
+ }
31
+ case KEYWORDS.ARRAY_TYPE:
32
+ case KEYWORDS.FUNCTION_TYPE:
33
+ case KEYWORDS.STRING_TYPE:
34
+ case KEYWORDS.NUMBER_TYPE:
35
+ case KEYWORDS.BOOLEAN_TYPE:
36
+ case KEYWORDS.CHAR_CODE_TYPE:
37
+ case KEYWORDS.ARRAY_TYPE:
38
+ case KEYWORDS.CHAR_CODE_TYPE:
39
+ case KEYWORDS.CHAR_TYPE:
40
+ case KEYWORDS.CALL_FUNCTION:
41
+ case KEYWORDS.DEFINE_VARIABLE:
42
+ return `(${token}${singleArg(Arguments)}${Arguments.map((x) =>
43
+ traverse(x).toString()
44
+ ).join(' ')})`
45
+ // case KEYWORDS.CALL_FUNCTION:
46
+ // case KEYWORDS.DEFINE_VARIABLE:
47
+ // return `\n${indent(level)}(${token}${singleArg(
48
+ // Arguments
49
+ // )}${Arguments.map((x) => traverse(x, ++level)).join(' ')})`
50
+ default: {
51
+ return `\n${indent(level)}(${token}${singleArg(
52
+ Arguments
53
+ )}${Arguments.map((x) => traverse(x, ++level)).join(' ')})`
54
+ }
55
+ }
56
+ } else if (first[TYPE] === ATOM) {
57
+ return typeof first[VALUE] === 'string'
58
+ ? `"${first[VALUE]}"`
59
+ : first[VALUE].toString()
60
+ } else if (first[TYPE] === WORD) return token
61
+ }
62
+
63
+ export const format = (AST) => {
64
+ tops.length = 0
65
+ const formatted = AST.map((exp) => traverse(exp, 0)).join('\n')
66
+ return `${tops.join('\n').replace(/\n\s*\n\s*\n/g, '')}\n${formatted.replace(
67
+ /\n\s*\n\s*\n/g,
68
+ ''
69
+ )}`
70
+ }
71
+
72
+ export const formatWithPreservedComments = (source) => {
73
+ const commentIdentifier = '(array "_comment_"'
74
+ const value = source
75
+ .split('\n')
76
+ .map((x) =>
77
+ x.trim()[0] === ';' ? `${commentIdentifier} "${x.replace(';', '')}")` : x
78
+ )
79
+ .join('\n')
80
+
81
+ return format(parse(removeNoCode(value)))
82
+ .split('\n')
83
+ .map((x) => {
84
+ if (x.includes(commentIdentifier)) {
85
+ const str = x.replace(commentIdentifier, '')
86
+ return `;${str.substring(2, str.length - 2)}`
87
+ } else return x
88
+ })
89
+ .join('\n')
90
+ .trim()
91
+ }
package/src/parser.js CHANGED
@@ -41,7 +41,7 @@ export const parse = (source) => {
41
41
  export const stringify = (ast) => {
42
42
  if (ast == undefined) return '()'
43
43
  else if (typeof ast === 'object')
44
- if (!isLeaf(ast))
44
+ if (Array.isArray(ast))
45
45
  return ast.length ? `(array ${ast.map(stringify).join(' ')})` : '()'
46
46
  else
47
47
  return `(array ${ast
package/src/tokeniser.js CHANGED
@@ -1,3 +1,4 @@
1
+ import std from '../lib/baked/std.js'
1
2
  import { TYPE, VALUE, WORD, KEYWORDS, APPLY } from './enums.js'
2
3
  import { evaluate } from './interpreter.js'
3
4
  import { stringify } from './parser.js'
@@ -1094,4 +1095,35 @@ const keywords = {
1094
1095
  },
1095
1096
  }
1096
1097
  keywords[KEYWORDS.NOT_COMPILED_BLOCK] = keywords[KEYWORDS.BLOCK]
1098
+ keywords[KEYWORDS.DOC] = (args, env) => {
1099
+ if (args.length !== 1)
1100
+ throw new RangeError(
1101
+ `Invalid number of arguments to (${KEYWORDS.DOC}) (= 1 required) (${
1102
+ KEYWORDS.DOC
1103
+ } ${stringifyArgs(args)})`
1104
+ )
1105
+ const lib = evaluate(args[0], env)
1106
+ const kw = Object.keys(env).map((x) => [x])
1107
+ const standard = std.map(([_, [_0, name], [_1, ...arg]]) => {
1108
+ const args = arg
1109
+ .slice(0, -1)
1110
+ .map((x) => x[VALUE])
1111
+ .filter((x) => x !== 'lambda')
1112
+
1113
+ return [name, ...args]
1114
+ })
1115
+ const all = [...kw, ...standard]
1116
+ switch (lib) {
1117
+ case '*':
1118
+ return all.map((x) => `(${x.join(' ')})`)
1119
+ case 'keywords':
1120
+ return kw.map((x) => `(${x.join(' ')})`)
1121
+ case 'std':
1122
+ return standard.map((x) => `(${x.join(' ')})`)
1123
+ default:
1124
+ return all
1125
+ .filter((name) => name[0].includes(lib))
1126
+ .map((x) => `(${x.join(' ')})`)
1127
+ }
1128
+ }
1097
1129
  export { keywords }
package/src/utils.js CHANGED
@@ -245,6 +245,38 @@ export const deepRename = (name, newName, tree) => {
245
245
  deepRename(name, newName, leaf)
246
246
  }
247
247
  }
248
+
249
+ export const compress = (source) => {
250
+ let { result, occurance } = source.split('').reduce(
251
+ (acc, item) => {
252
+ if (item === ')') acc.occurance++
253
+ else {
254
+ if (acc.occurance < 3) {
255
+ acc.result += ')'.repeat(acc.occurance)
256
+ acc.occurance = 0
257
+ } else {
258
+ acc.result += '·' + acc.occurance
259
+ acc.occurance = 0
260
+ }
261
+ acc.result += item
262
+ }
263
+ return acc
264
+ },
265
+ { result: '', occurance: 0 }
266
+ )
267
+ if (occurance > 0) result += '·' + occurance
268
+ return result
269
+ }
270
+ export const decompress = (raw) => {
271
+ const suffix = [...new Set(raw.match(/·+?\d+/g))]
272
+ const runes = suffix.reduce(
273
+ (acc, m) => acc.split(m).join(')'.repeat(parseInt(m.substring(1)))),
274
+ raw
275
+ )
276
+ let result = ''
277
+ for (const tok of runes) result += tok
278
+ return result
279
+ }
248
280
  export const lispToJavaScriptVariableName = (name) =>
249
281
  toCamelCase(
250
282
  arrowToTo(