diff options
| -rw-r--r-- | doc/combinator.bqn | 4 | ||||
| -rw-r--r-- | doc/types.md | 2 | ||||
| -rw-r--r-- | docs/doc/functional.html | 20 | ||||
| -rw-r--r-- | docs/doc/primitive.html | 2 | ||||
| -rw-r--r-- | docs/repl.js | 6 | ||||
| -rw-r--r-- | docs/tutorial/combinator.html | 2 | ||||
| -rw-r--r-- | src/e.bqn | 4 | ||||
| -rw-r--r-- | svg.bqn | 24 |
8 files changed, 32 insertions, 32 deletions
diff --git a/doc/combinator.bqn b/doc/combinator.bqn index d088a622..62ad4c11 100644 --- a/doc/combinator.bqn +++ b/doc/combinator.bqn @@ -11,7 +11,7 @@ _trans ← {𝕗 At "transform=translate("∾(⊣∾","∾⊢)○FmtNum∾")"˙} Groups ← ("g"At"font-size=20px|text-anchor=middle")_trans˜⌜ rc ← At "class=code|stroke-width=1|rx=12" -rc ∾↩ (Pos⟨¯0.43×w,1⟩)∾"width"‿"height"≍˘FmtNum¨⟨0.86×w,h-55⟩ +rc ∾↩ (Pos⟨¯0.43×w,1⟩)∾"width"‿"height"≍˘FmtNum⟨0.86×w,h-55⟩ cc ← At "r=12|class=code|stroke-width=0" n ← Text∘‿2⥊⟨"y",FmtNum h-37, "fill","currentColor"⟩ case ← (¯1‿1×w÷4.6) ("g"At"font-size=21px|font-family=monospace")_trans¨ 25 @@ -54,7 +54,7 @@ DrawComp ← {𝕊𝕩:(names⊏˜comps⊐𝕩)𝕊𝕩; names 𝕊 spel: (< case Enc¨ ⊢)⎉1 ∾¨´ ⟨ (<lt Enc Highlight)¨ label path Connect¨¨⟜(vl⊏¨˜vv(⊐⌈≠∘⊣|⊒)¨⊢)○((0<≠¨¨path)/¨⊢) name - ("circle" Elt cc∾⟨"cx","cy"⟩≍˘FmtNum¨)¨¨ vp + ("circle" Elt cc∾⟨"cx","cy"⟩≍˘FmtNum)¨¨ vp vp Text∘Pos⊸Enc⟜Highlight¨¨ vv ⟩ ⟩ diff --git a/doc/types.md b/doc/types.md index 51a9b9f8..0d5ed602 100644 --- a/doc/types.md +++ b/doc/types.md @@ -20,7 +20,7 @@ p ← 64‿38 dim ← (2×p) + sh × d1 ← 128‿64 rp ← 8÷d1 Pos ↩ Pos d1⊸× -Size ← "width"‿"height" ≍˘ ·FmtNum¨ d1×⊢ +Size ← "width"‿"height" ≍˘ ·FmtNum d1×⊢ cl ← {"class"‿𝕩}¨ "purple"‿"bluegreen"‿"yellow" TP ← "text" Attr "dy"‿"0.32em"∾˜Pos⊘(∾⟜Pos) diff --git a/docs/doc/functional.html b/docs/doc/functional.html index 76dc6777..4a5b7495 100644 --- a/docs/doc/functional.html +++ b/docs/doc/functional.html @@ -12,28 +12,28 @@ <g font-size='18px' text-anchor='middle' fill='currentColor'> <text font-size='24' x='256' y='38'>"Functional programming"</text> <g transform='translate(240 252)' class='bluegreen'> - <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-220 -0a220 190 0 1 1 440 0a220 190 0 1 1 -440 0'/> - <path style='display:none' id='cat0' d='m-229 -0a229 199 0 1 1 458 0a229 199 0 1 1 -458 0'/> + <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-220 0a220 190 0 1 1 440 0a220 190 0 1 1 -440 0'/> + <path style='display:none' id='cat0' d='m-229 0a229 199 0 1 1 458 0a229 199 0 1 1 -458 0'/> <text font-size='16' stroke-width='0.4' dy='0.33em' class='bluegreen'><textPath href='#cat0' startOffset='13%'>First-class</textPath></text> </g> <g transform='translate(220 320)rotate(-34)' class='red'> - <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-130 -0a130 180 0 1 0 260 0a130 180 0 1 0 -260 0'/> - <path style='display:none' id='cat1' d='m-139 -0a139 189 0 1 0 278 0a139 189 0 1 0 -278 0'/> + <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-130 0a130 180 0 1 0 260 0a130 180 0 1 0 -260 0'/> + <path style='display:none' id='cat1' d='m-139 0a139 189 0 1 0 278 0a139 189 0 1 0 -278 0'/> <text font-size='16' stroke-width='0.4' dy='0.33em' class='red'><textPath href='#cat1' startOffset='13%'>Function-level</textPath></text> </g> <g transform='translate(310 360)rotate(12)' class='purple'> - <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-120 -0a120 90 0 1 0 240 0a120 90 0 1 0 -240 0'/> - <path style='display:none' id='cat2' d='m-129 -0a129 99 0 1 0 258 0a129 99 0 1 0 -258 0'/> + <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-120 0a120 90 0 1 0 240 0a120 90 0 1 0 -240 0'/> + <path style='display:none' id='cat2' d='m-129 0a129 99 0 1 0 258 0a129 99 0 1 0 -258 0'/> <text font-size='16' stroke-width='0.4' dy='0.33em' class='purple'><textPath href='#cat2' startOffset='43%'>Pure</textPath></text> </g> <g transform='translate(310 290)rotate(-23)' class='green'> - <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-110 -0a110 95 0 1 1 220 0a110 95 0 1 1 -220 0'/> - <path style='display:none' id='cat3' d='m-119 -0a119 104 0 1 1 238 0a119 104 0 1 1 -238 0'/> + <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-110 0a110 95 0 1 1 220 0a110 95 0 1 1 -220 0'/> + <path style='display:none' id='cat3' d='m-119 0a119 104 0 1 1 238 0a119 104 0 1 1 -238 0'/> <text font-size='16' stroke-width='0.4' dy='0.33em' class='green'><textPath href='#cat3' startOffset='19%'>Typed</textPath></text> </g> <g transform='translate(260 300)' class='yellow'> - <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-45 -0a45 45 0 1 1 90 0a45 45 0 1 1 -90 0'/> - <path style='display:none' id='cat4' d='m-54 -0a54 54 0 1 1 108 0a54 54 0 1 1 -108 0'/> + <path style='fill-opacity:0.2;stroke-opacity:0.8' stroke-width='3' d='m-45 0a45 45 0 1 1 90 0a45 45 0 1 1 -90 0'/> + <path style='display:none' id='cat4' d='m-54 0a54 54 0 1 1 108 0a54 54 0 1 1 -108 0'/> <text font-size='16' stroke-width='0.4' dy='0.33em' class='yellow'><textPath href='#cat4' startOffset='31%'>Dependently</textPath></text> </g> <text x='250' y='470'>APL</text> diff --git a/docs/doc/primitive.html b/docs/doc/primitive.html index 08b6a45b..79cb2171 100644 --- a/docs/doc/primitive.html +++ b/docs/doc/primitive.html @@ -393,7 +393,7 @@ </g> <g font-size='21px' font-family='monospace' transform='translate(60.87,25)'> <text dy='0.32em' y='155' font-size='19px'><tspan class='Value'>𝕨</tspan> <tspan class='Function'>𝔽</tspan><tspan class='Modifier'>˜</tspan> <tspan class='Value'>𝕩</tspan></text> - <path class='yellow' style='fill:none' stroke-width='2' d='M0 0C-40 28.5 -0 57 32 114'/> + <path class='yellow' style='fill:none' stroke-width='2' d='M0 0C-40 28.5 0 57 32 114'/> <path class='yellow' style='fill:none' stroke-width='2' d='M0 0C40 28.5 0 57 -32 114'/> <circle r='12' class='code' stroke-width='0' cx='0' cy='0'/> <circle r='12' class='code' stroke-width='0' cx='-32' cy='114'/> diff --git a/docs/repl.js b/docs/repl.js index b921e2cb..59bbc196 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -44,9 +44,9 @@ let exp=0, explain; if (doc.doexplain) doc.doexplain.onclick = () => { if (explain===undefined) { let drawEval = run( - new Uint8Array([0,19,22,0,0,11,22,0,1,11,14,15,1,22,0,2,11,14,0,16,0,11,0,57,19,22,0,3,11,14,15,2,22,0,4,11,14,21,0,4,0,42,0,21,0,50,0,79,8,7,9,22,0,5,11,14,15,3,22,0,6,11,14,15,4,22,0,7,11,14,15,5,22,0,8,11,14,21,0,8,0,42,21,0,8,0,21,0,73,19,7,0,21,9,0,24,0,57,19,15,6,3,3,0,54,0,16,0,5,0,58,19,8,22,0,9,11,14,0,45,15,7,7,0,21,0,83,19,22,0,10,11,14,0,57,0,55,21,0,10,0,48,0,11,8,8,0,21,9,0,51,0,21,8,22,0,11,11,14,15,8,22,0,12,11,14,0,42,21,0,8,7,0,41,0,22,7,0,90,0,91,3,2,19,22,0,13,11,14,21,0,11,0,48,21,0,7,8,22,0,14,11,14,15,9,22,0,15,11,14,0,64,0,65,3,2,22,0,16,11,14,0,58,0,57,3,2,0,2,21,0,16,17,22,0,17,11,14,0,58,0,59,3,2,0,3,21,0,16,17,0,0,0,60,0,66,3,2,17,22,0,18,11,14,0,63,22,0,19,11,14,0,94,21,0,12,16,22,0,20,11,14,0,95,21,0,12,16,22,0,21,11,14,0,97,21,0,12,0,96,17,22,0,22,11,14,0,98,21,0,12,0,96,17,22,0,23,11,14,0,99,21,0,12,0,96,17,22,0,24,11,14,0,100,21,0,12,0,96,17,22,0,25,11,14,0,101,0,102,0,21,0,63,0,25,16,0,0,0,72,17,17,0,103,0,104,0,105,0,106,0,107,0,108,0,109,0,110,0,111,0,112,0,21,0,76,17,0,21,0,89,17,0,113,0,114,3,14,0,20,0,48,0,58,3,2,17,0,28,16,0,41,0,11,7,16,22,0,26,22,0,27,4,2,11,14,0,115,0,116,0,117,0,118,0,119,0,120,0,121,3,7,0,21,22,0,26,13,14,15,10,21,0,27,7,22,0,28,11,14,21,0,26,0,42,15,11,7,16,22,0,29,11,14,0,124,22,0,30,11,14,0,127,0,128,1,0,129,1,0,130,1,3,4,0,42,0,126,0,51,0,21,8,0,21,0,125,19,7,16,22,0,31,11,14,15,12,22,0,32,11,25,0,57,0,18,21,0,2,17,0,56,0,17,0,40,0,20,7,0,57,0,58,3,2,19,0,51,0,40,0,42,0,24,0,21,0,78,19,0,21,0,23,19,7,7,8,8,22,0,3,11,14,21,0,1,21,1,1,0,50,21,1,0,0,32,0,52,21,0,3,8,9,0,21,0,50,0,11,8,0,42,0,57,7,19,8,16,25,21,0,1,0,20,16,0,60,0,48,0,38,8,0,11,0,20,9,0,19,0,42,21,0,0,7,0,21,9,3,4,0,54,0,16,0,5,0,59,19,8,16,25,0,80,21,0,2,0,81,3,3,0,21,16,22,0,3,11,14,0,82,21,0,2,0,23,0,83,0,33,21,0,2,17,0,32,16,17,0,81,3,3,0,21,16,22,0,4,11,14,21,0,1,21,1,3,16,22,0,5,11,14,21,0,4,21,0,5,0,56,0,11,0,48,0,20,8,8,0,49,15,13,21,0,1,21,0,5,0,56,21,1,5,8,16,7,8,21,0,3,17,0,21,16,25,0,80,21,0,1,0,84,3,3,0,21,16,25,21,0,1,0,16,16,0,14,0,60,17,0,38,16,14,21,0,1,0,62,0,51,0,11,8,0,9,0,11,0,50,0,61,8,19,16,0,38,16,14,0,63,22,0,3,11,0,40,0,4,7,0,59,17,22,0,4,11,14,15,14,22,0,5,11,14,21,0,1,0,7,16,0,0,21,0,4,0,2,0,58,17,0,3,16,17,22,0,6,11,0,5,16,22,0,7,11,14,0,85,0,29,0,60,0,11,21,0,1,17,17,21,0,7,21,0,5,0,19,0,6,0,57,19,0,44,0,4,7,21,0,3,19,0,5,9,0,0,0,57,19,7,16,0,0,0,72,17,21,0,7,0,1,21,0,6,17,0,2,21,0,4,17,0,5,16,0,86,21,0,5,0,59,7,0,29,0,50,0,2,0,48,0,27,0,52,0,47,0,10,7,8,8,8,9,0,0,0,72,19,0,21,0,87,19,3,2,0,54,0,11,0,50,0,60,8,8,16,3,3,0,21,16,25,21,0,1,14,0,60,0,38,16,25,21,0,2,0,88,21,0,1,0,89,3,4,0,21,16,25,15,15,22,0,3,11,14,21,0,1,21,0,3,0,75,7,16,0,42,21,0,3,0,74,7,7,16,0,42,21,1,10,7,0,21,9,0,51,0,21,8,0,53,0,12,8,21,0,2,17,25,21,0,1,21,1,6,0,93,21,0,2,21,1,9,16,3,2,21,1,11,0,92,17,17,25,0,33,0,50,21,0,1,0,21,16,8,0,30,21,0,1,0,42,0,13,7,16,0,47,0,0,7,16,19,25,0,123,0,21,21,0,1,17,0,21,0,122,17,25,21,0,2,22,0,3,22,0,4,22,0,5,22,0,6,22,0,7,4,5,11,14,0,131,1,0,132,1,0,133,1,0,134,1,3,4,0,40,0,1,7,0,72,17,22,0,8,22,0,9,22,0,10,22,0,11,4,4,11,14,15,16,22,0,12,11,14,21,0,3,21,0,6,3,2,0,42,0,29,0,50,21,0,12,8,7,16,0,42,0,24,7,0,60,0,66,3,2,17,22,0,13,22,0,14,4,2,11,14,21,0,9,0,31,21,0,13,17,22,0,15,11,0,14,0,66,17,22,0,16,11,14,21,0,12,0,29,16,0,40,0,29,0,50,21,0,16,8,0,52,0,18,0,0,0,57,19,0,40,0,31,7,21,0,3,19,8,7,22,0,15,13,14,21,0,10,0,31,21,0,13,17,0,32,0,50,0,66,8,0,52,0,57,8,16,22,0,17,11,14,21,0,15,0,1,21,0,17,17,0,47,0,0,7,16,22,0,18,11,14,21,0,18,0,32,0,66,17,0,14,0,57,17,0,38,16,14,21,0,15,0,11,0,60,17,22,0,19,11,0,2,0,50,0,2,0,50,21,0,17,8,0,47,0,0,7,9,8,16,22,0,20,11,14,21,0,17,0,8,21,0,15,17,0,29,16,0,31,0,50,0,34,0,0,21,0,18,0,51,0,31,8,19,0,30,0,49,0,31,0,50,0,30,8,8,21,0,18,0,24,0,66,17,19,8,16,22,0,21,11,14,21,0,19,0,8,16,0,23,0,50,0,13,8,21,0,21,17,22,0,22,11,14,21,0,1,15,17,21,0,7,17,22,0,23,22,0,24,22,0,25,4,3,11,14,21,0,21,15,18,16,0,13,0,56,0,40,0,31,7,8,16,0,40,0,31,7,21,0,25,0,31,21,0,22,0,47,0,0,7,16,0,40,0,1,7,0,57,17,17,17,0,24,0,66,17,22,0,26,11,14,0,68,0,21,21,0,26,17,22,0,27,11,14,21,0,21,0,18,0,22,0,31,19,21,0,16,0,1,21,0,27,17,0,31,21,0,21,17,0,13,21,0,26,17,0,15,21,0,22,17,0,29,16,17,22,0,28,11,14,21,0,20,0,22,21,0,27,17,0,0,0,69,0,70,3,2,17,0,2,21,1,16,17,0,28,16,0,42,21,1,8,7,16,0,31,21,0,28,17,0,46,0,40,0,41,0,27,0,51,0,21,8,0,42,0,21,7,0,137,1,19,0,21,9,0,48,0,11,8,7,7,7,16,22,0,29,11,14,21,0,20,0,31,21,0,21,0,29,21,0,22,17,17,0,42,0,22,0,2,21,1,16,19,0,0,21,1,18,19,0,48,21,1,13,21,1,11,0,138,1,19,8,7,21,0,25,17,22,0,30,11,14,21,1,17,0,2,0,58,0,60,3,2,17,0,0,21,0,1,0,13,16,21,0,20,0,45,0,6,7,16,0,0,0,58,17,3,2,0,2,21,1,16,17,17,22,0,31,11,14,21,0,31,0,42,21,1,8,7,16,0,41,0,22,7,0,140,1,0,141,1,3,2,17,0,21,21,1,17,0,1,16,21,1,13,16,17,0,21,21,1,21,17,21,1,14,0,139,1,17,0,11,16,21,0,23,21,1,6,0,138,1,17,0,11,16,21,0,29,0,42,0,19,0,11,0,49,0,22,8,0,143,1,19,0,21,21,1,20,19,21,1,14,0,142,1,19,7,16,21,0,24,0,42,0,21,7,0,19,0,42,21,1,6,7,21,0,30,19,0,49,0,11,0,49,0,22,8,8,0,42,0,32,0,50,0,57,8,7,19,16,0,42,21,1,6,7,21,1,24,21,1,25,3,2,17,21,1,6,21,1,23,17,3,4,0,42,0,20,7,16,0,21,16,21,1,6,21,1,22,17,21,1,15,21,1,19,0,2,0,58,17,0,0,21,0,31,17,0,39,0,58,7,0,3,0,40,0,1,7,19,0,40,0,1,7,21,1,17,0,0,21,1,19,17,19,0,40,0,21,7,0,18,19,0,50,0,6,0,50,0,71,0,60,3,2,8,8,16,17,25,21,0,2,21,0,4,21,0,1,3,3,25,21,0,1,0,25,9,0,56,21,1,3,0,51,0,3,0,48,0,5,8,8,8,0,7,21,1,3,19,0,27,9,25,0,37,0,50,0,14,0,50,21,0,1,8,0,1,0,50,0,8,0,2,0,47,0,0,7,19,8,9,8,25,21,1,3,0,19,0,2,0,12,0,50,0,13,8,19,0,40,0,31,7,0,18,19,21,1,8,17,22,0,0,11,14,21,1,3,0,67,0,51,0,11,8,16,0,27,0,52,0,2,0,47,0,6,7,9,0,26,9,0,50,0,13,0,48,0,25,8,0,0,0,57,19,8,8,0,1,0,13,19,16,0,13,0,51,0,21,8,16,22,0,1,11,14,0,59,0,25,16,15,19,16,0,0,0,57,17,22,0,2,11,14,21,0,2,0,11,0,50,0,13,0,48,0,25,8,8,16,0,45,0,9,7,16,0,38,16,14,0,19,0,32,0,66,19,0,14,0,60,19,0,56,15,20,8,22,0,3,11,14,21,0,2,0,42,0,60,7,0,21,0,57,19,21,0,3,0,13,0,51,0,21,8,19,0,23,0,13,19,16,25,21,0,2,22,0,3,22,0,4,22,0,5,22,0,6,22,0,7,4,5,11,14,21,2,27,0,13,16,22,0,8,11,14,21,0,1,0,31,21,0,6,17,21,2,28,16,0,14,0,50,21,0,8,8,0,2,0,1,19,0,0,0,19,19,21,0,4,0,0,0,59,17,0,0,21,0,8,17,17,0,40,0,31,7,21,2,29,17,22,0,9,11,14,21,0,7,0,42,0,135,1,7,16,22,0,10,11,14,21,0,9,0,21,21,0,10,17,22,0,11,11,14,0,63,0,0,0,77,17,0,14,21,0,1,17,0,29,16,22,0,12,11,14,21,0,1,0,31,0,50,21,0,12,8,0,52,0,136,1,0,31,21,0,6,0,35,21,0,12,17,17,8,16,22,0,1,12,14,21,0,1,0,33,21,2,30,17,22,0,13,11,0,12,0,50,0,13,8,21,2,30,17,22,0,14,11,0,8,16,0,29,16,22,0,15,11,14,21,0,13,0,29,21,0,14,17,0,40,0,31,7,21,2,31,17,0,40,0,21,7,22,0,11,13,14,0,57,0,1,21,0,6,17,0,21,21,0,7,17,0,21,21,0,14,0,29,16,17,0,29,21,0,11,0,42,0,13,7,16,17,0,21,21,0,15,17,0,30,16,22,0,16,11,14,21,0,11,0,21,16,0,21,21,0,1,0,31,21,0,15,17,17,0,31,21,0,16,17,22,0,17,11,14,0,57,0,21,21,2,31,0,42,0,13,7,16,17,0,31,21,0,13,17,22,0,18,11,14,21,0,17,0,29,0,50,0,13,0,48,0,25,8,0,12,21,0,18,0,45,0,0,7,16,19,0,31,21,0,16,19,8,16,22,0,19,11,14,21,0,9,21,0,7,0,0,0,57,17,0,44,0,29,7,0,23,21,0,1,0,13,16,19,0,47,0,0,7,9,0,49,0,12,0,2,0,18,19,8,21,0,6,17,0,40,0,1,7,0,57,17,0,29,21,0,18,17,0,40,0,37,7,21,0,19,17,21,0,10,3,3,0,12,16,0,28,16,0,41,0,11,7,16,22,0,20,11,14,21,1,14,0,29,21,1,22,17,0,33,21,0,6,17,22,0,21,11,14,21,0,17,21,0,20,0,31,21,0,21,17,0,58,0,3,21,0,7,0,0,21,0,6,17,17,0,31,21,0,21,17,3,3,25,21,0,1,0,30,16,22,0,3,11,0,40,0,31,7,21,0,1,17,22,0,4,11,14,21,1,13,0,13,16,0,25,16,0,31,0,50,21,0,4,0,36,16,8,0,52,21,1,11,0,31,21,1,13,17,0,31,21,0,4,17,0,14,21,0,4,0,34,16,17,0,40,0,29,7,21,0,3,17,8,16,25,21,1,0,0,13,16,0,25,16,21,0,1,0,56,21,1,1,0,51,0,31,8,8,16,0,12,16,0,2,0,48,0,46,0,0,7,8,21,1,0,0,43,0,14,7,21,0,1,17,17,25,21,0,1,0,31,0,50,21,0,2,0,29,21,0,1,17,8,0,52,0,42,0,57,7,8,16,21,1,3,21,0,2,0,40,0,31,7,16,17,25]) - ,[runtime[0],runtime[1],runtime[2],runtime[3],runtime[4],runtime[6],runtime[7],runtime[8],runtime[9],runtime[10],runtime[11],runtime[12],runtime[13],runtime[14],runtime[15],runtime[16],runtime[18],runtime[19],runtime[20],runtime[21],runtime[22],runtime[23],runtime[24],runtime[25],runtime[26],runtime[27],runtime[29],runtime[30],runtime[31],runtime[32],runtime[33],runtime[35],runtime[36],runtime[37],runtime[38],runtime[39],runtime[40],runtime[41],runtime[42],runtime[43],runtime[44],runtime[45],runtime[46],runtime[47],runtime[48],runtime[49],runtime[50],runtime[51],runtime[52],runtime[53],runtime[54],runtime[55],runtime[56],runtime[57],runtime[58],runtime[59],runtime[61],1,2,3,0,-Infinity,Infinity,10,10.84,24,-1,128,-1.25,0.5,0.1,512,'0',' ','=','|','\"',' - ,[[0,1,0,33],[0,0,522,4],[0,0,609,3],[0,0,652,6],[0,0,755,3],[0,0,768,8],[0,0,992,3],[0,0,1002,3],[0,0,1018,4],[0,0,1069,3],[1,1,1094,2],[0,0,1124,3],[0,0,1138,32],[1,0,2060,5],[1,1,2072,2],[1,1,2104,2],[0,1,2134,4],[0,0,2324,22],[0,0,2856,5],[0,0,2938,3],[0,0,2989,3]] + new Uint8Array([0,19,22,0,0,11,22,0,1,11,14,15,1,22,0,2,11,14,0,16,0,11,0,57,19,22,0,3,11,14,15,2,22,0,4,11,14,21,0,4,0,42,0,21,0,50,0,79,8,7,9,22,0,5,11,14,15,3,22,0,6,11,14,15,4,22,0,7,11,14,15,5,22,0,8,11,14,0,20,0,48,21,0,8,8,0,32,9,0,20,0,52,21,0,8,8,15,6,3,3,0,54,0,16,0,5,0,58,19,8,22,0,9,11,14,21,0,9,21,0,9,0,42,0,21,7,0,73,19,0,21,9,0,24,0,57,19,15,7,3,3,0,54,0,16,0,5,0,58,19,8,22,0,10,11,14,0,45,15,8,7,0,21,0,83,19,22,0,11,11,14,0,57,0,55,21,0,11,0,48,0,11,8,8,0,21,9,0,51,0,21,8,22,0,12,11,14,15,9,22,0,13,11,14,21,0,9,0,41,0,22,7,0,88,0,89,3,2,19,22,0,14,11,14,21,0,12,0,48,21,0,7,8,22,0,15,11,14,15,10,22,0,16,11,14,0,65,0,66,3,2,22,0,17,11,14,0,58,0,57,3,2,0,2,21,0,17,17,22,0,18,11,14,0,58,0,59,3,2,0,3,21,0,17,17,0,0,0,60,0,67,3,2,17,22,0,19,11,14,0,63,22,0,20,11,14,0,92,21,0,13,16,22,0,21,11,14,0,93,21,0,13,16,22,0,22,11,14,0,95,21,0,13,0,94,17,22,0,23,11,14,0,96,21,0,13,0,94,17,22,0,24,11,14,0,97,21,0,13,0,94,17,22,0,25,11,14,0,98,21,0,13,0,94,17,22,0,26,11,14,0,99,0,100,0,21,0,63,0,25,16,0,0,0,72,17,17,0,101,0,102,0,103,0,104,0,105,0,106,0,107,0,108,0,109,0,110,0,21,0,76,17,0,21,0,87,17,0,111,0,112,3,14,0,20,0,48,0,58,3,2,17,0,28,16,0,41,0,11,7,16,22,0,27,22,0,28,4,2,11,14,0,113,0,114,0,115,0,116,0,117,0,118,0,119,3,7,0,21,22,0,27,13,14,15,11,21,0,28,7,22,0,29,11,14,21,0,27,0,42,15,12,7,16,22,0,30,11,14,0,122,22,0,31,11,14,0,125,0,126,0,127,0,128,1,3,4,0,42,0,124,0,51,0,21,8,0,21,0,123,19,7,16,22,0,32,11,14,15,13,22,0,33,11,25,0,57,0,18,21,0,2,17,0,56,0,17,0,40,0,20,7,0,57,0,58,3,2,19,0,51,0,40,0,42,0,24,0,21,0,78,19,0,21,0,23,19,7,7,8,8,22,0,3,11,14,21,0,1,21,1,1,0,50,21,1,0,0,32,0,52,21,0,3,8,9,0,21,0,50,0,11,8,0,42,0,57,7,19,8,16,25,21,0,1,0,20,16,0,60,0,48,0,38,8,0,11,0,20,9,0,19,0,42,21,0,0,7,0,21,9,3,4,0,54,0,16,0,5,0,59,19,8,16,25,0,80,21,0,2,0,81,3,3,0,21,16,22,0,3,11,14,0,82,21,0,2,0,23,0,83,0,33,21,0,2,17,0,32,16,17,0,81,3,3,0,21,16,22,0,4,11,14,21,0,1,21,1,3,16,22,0,5,11,14,21,0,4,21,0,5,0,56,0,11,0,48,0,20,8,8,0,49,15,14,21,0,1,21,0,5,0,56,21,1,5,8,16,7,8,21,0,3,17,0,21,16,25,0,80,21,0,1,0,84,3,3,0,21,16,25,21,0,1,0,62,0,51,0,11,8,0,9,0,11,0,50,0,61,8,19,16,0,45,0,9,7,16,0,38,16,14,0,63,22,0,3,11,0,40,0,4,7,0,59,17,22,0,4,11,14,0,72,0,1,0,85,17,22,0,5,22,0,6,4,2,11,14,0,60,0,11,21,0,1,17,22,0,7,11,14,21,0,1,0,7,16,22,0,8,11,14,21,0,8,0,2,21,0,4,17,0,0,0,64,17,0,5,16,22,0,9,11,14,21,0,7,0,29,16,0,42,21,0,5,7,0,51,0,11,0,49,0,22,8,8,16,0,22,16,21,0,4,0,3,21,0,9,17,0,5,16,15,15,0,50,0,13,0,48,0,25,8,8,16,21,0,9,15,16,0,50,0,13,0,48,0,25,8,8,16,0,13,0,11,0,60,19,0,56,0,21,0,50,0,31,0,48,0,27,0,32,9,0,52,0,42,21,0,6,7,8,8,8,8,16,3,3,0,21,16,0,28,16,0,41,0,21,0,48,0,11,8,7,16,0,45,0,0,0,50,0,72,8,0,51,0,37,8,7,16,25,21,0,1,14,0,60,0,38,16,25,21,0,1,14,0,60,0,38,16,25,21,0,2,0,86,21,0,1,0,87,3,4,0,21,16,25,15,17,22,0,3,11,14,21,0,1,21,0,3,0,75,7,16,0,42,21,0,3,0,74,7,7,16,0,42,21,1,11,7,0,21,9,0,51,0,21,8,0,53,0,12,8,21,0,2,17,25,21,0,1,21,1,6,0,91,21,0,2,21,1,10,16,3,2,21,1,12,0,90,17,17,25,0,33,0,50,21,0,1,0,21,16,8,0,30,21,0,1,0,42,0,13,7,16,0,47,0,0,7,16,19,25,0,121,0,21,21,0,1,17,0,21,0,120,17,25,21,0,2,22,0,3,22,0,4,22,0,5,22,0,6,22,0,7,4,5,11,14,0,129,1,0,130,1,0,131,1,0,132,1,3,4,0,40,0,1,7,0,72,17,22,0,8,22,0,9,22,0,10,22,0,11,4,4,11,14,15,18,22,0,12,11,14,21,0,3,21,0,6,3,2,0,42,0,29,0,50,21,0,12,8,7,16,0,42,0,24,7,0,60,0,67,3,2,17,22,0,13,22,0,14,4,2,11,14,21,0,9,0,31,21,0,13,17,22,0,15,11,0,14,0,67,17,22,0,16,11,14,21,0,12,0,29,16,0,40,0,29,0,50,21,0,16,8,0,52,0,18,0,0,0,57,19,0,40,0,31,7,21,0,3,19,8,7,22,0,15,13,14,21,0,10,0,31,21,0,13,17,0,32,0,50,0,67,8,0,52,0,57,8,16,22,0,17,11,14,21,0,15,0,1,21,0,17,17,0,47,0,0,7,16,22,0,18,11,14,21,0,18,0,32,0,67,17,0,14,0,57,17,0,38,16,14,21,0,15,0,11,0,60,17,22,0,19,11,0,2,0,50,0,2,0,50,21,0,17,8,0,47,0,0,7,9,8,16,22,0,20,11,14,21,0,17,0,8,21,0,15,17,0,29,16,0,31,0,50,0,34,0,0,21,0,18,0,51,0,31,8,19,0,30,0,49,0,31,0,50,0,30,8,8,21,0,18,0,24,0,67,17,19,8,16,22,0,21,11,14,21,0,19,0,8,16,0,23,0,50,0,13,8,21,0,21,17,22,0,22,11,14,21,0,1,15,19,21,0,7,17,22,0,23,22,0,24,22,0,25,4,3,11,14,21,0,21,15,20,16,0,13,0,56,0,40,0,31,7,8,16,0,40,0,31,7,21,0,25,0,31,21,0,22,0,47,0,0,7,16,0,40,0,1,7,0,57,17,17,17,0,24,0,67,17,22,0,26,11,14,0,69,0,21,21,0,26,17,22,0,27,11,14,21,0,21,0,18,0,22,0,31,19,21,0,16,0,1,21,0,27,17,0,31,21,0,21,17,0,13,21,0,26,17,0,15,21,0,22,17,0,29,16,17,22,0,28,11,14,21,0,20,0,22,21,0,27,17,0,0,0,64,0,70,3,2,17,0,2,21,1,17,17,0,28,16,21,1,9,16,0,31,21,0,28,17,0,46,0,40,0,41,0,27,0,51,0,21,8,0,42,0,21,7,0,135,1,19,0,21,9,0,48,0,11,8,7,7,7,16,22,0,29,11,14,21,0,20,0,31,21,0,21,0,29,21,0,22,17,17,0,42,0,22,0,2,21,1,17,19,0,0,21,1,19,19,0,48,21,1,14,21,1,12,0,136,1,19,8,7,21,0,25,17,22,0,30,11,14,21,1,18,0,2,0,58,0,60,3,2,17,0,0,21,0,1,0,13,16,21,0,20,0,45,0,6,7,16,0,0,0,58,17,3,2,0,2,21,1,17,17,17,22,0,31,11,14,21,0,31,21,1,9,16,0,41,0,22,7,0,138,1,0,139,1,3,2,17,0,21,21,1,18,0,1,16,21,1,14,16,17,0,21,21,1,22,17,21,1,15,0,137,1,17,0,11,16,21,0,23,21,1,6,0,136,1,17,0,11,16,21,0,29,0,42,0,19,0,11,0,49,0,22,8,0,141,1,19,0,21,21,1,21,19,21,1,15,0,140,1,19,7,16,21,0,24,0,42,0,21,7,0,19,0,42,21,1,6,7,21,0,30,19,0,49,0,11,0,49,0,22,8,8,0,42,0,32,0,50,0,57,8,7,19,16,0,42,21,1,6,7,21,1,25,21,1,26,3,2,17,21,1,6,21,1,24,17,3,4,0,42,0,20,7,16,0,21,16,21,1,6,21,1,23,17,21,1,16,21,1,20,0,2,0,58,17,0,0,21,0,31,17,0,39,0,58,7,0,3,0,40,0,1,7,19,0,40,0,1,7,21,1,18,0,0,21,1,20,17,19,0,40,0,21,7,0,18,19,0,50,0,6,0,50,0,71,0,60,3,2,8,8,16,17,25,21,0,2,21,0,4,21,0,1,3,3,25,21,0,1,0,15,21,1,3,17,22,0,3,11,14,21,0,2,21,0,1,3,2,0,22,0,27,0,32,9,0,52,0,7,0,50,21,1,3,8,8,0,21,0,45,0,29,0,50,21,0,3,8,0,49,21,1,3,0,51,0,3,8,0,5,9,0,51,21,0,0,8,8,7,19,3,2,0,54,21,0,3,0,45,0,10,7,16,8,16,25,21,0,1,0,7,21,1,4,17,22,0,1,12,0,2,16,22,0,3,11,14,21,0,1,0,60,0,58,3,2,0,25,16,0,29,0,50,21,0,3,8,0,49,0,2,0,50,21,1,3,8,0,51,21,0,0,0,21,21,1,4,0,51,0,3,8,0,5,9,0,51,0,11,0,49,0,22,8,8,19,8,8,3,2,0,54,21,0,3,0,45,0,10,7,16,8,21,0,2,17,25,0,37,0,50,0,14,0,50,21,0,1,8,0,1,0,50,0,8,0,2,0,47,0,0,7,19,8,9,8,25,21,1,3,0,19,0,2,0,12,0,50,0,13,8,19,0,40,0,31,7,0,18,19,21,1,8,17,22,0,0,11,14,21,1,3,0,68,0,51,0,11,8,16,0,27,0,52,0,2,0,47,0,6,7,9,0,26,9,0,50,0,13,0,48,0,25,8,0,0,0,57,19,8,8,0,1,0,13,19,16,0,13,0,51,0,21,8,16,22,0,1,11,14,0,59,0,25,16,15,21,16,0,0,0,57,17,22,0,2,11,14,21,0,2,0,11,0,50,0,13,0,48,0,25,8,8,16,0,45,0,9,7,16,0,38,16,14,0,19,0,32,0,67,19,0,14,0,60,19,0,56,15,22,8,22,0,3,11,14,21,0,2,0,42,0,60,7,0,21,0,57,19,21,0,3,0,13,0,51,0,21,8,19,0,23,0,13,19,16,25,21,0,2,22,0,3,22,0,4,22,0,5,22,0,6,22,0,7,4,5,11,14,21,2,28,0,13,16,22,0,8,11,14,21,0,1,0,31,21,0,6,17,21,2,29,16,0,14,0,50,21,0,8,8,0,2,0,1,19,0,0,0,19,19,21,0,4,0,0,0,59,17,0,0,21,0,8,17,17,0,40,0,31,7,21,2,30,17,22,0,9,11,14,21,0,7,0,42,0,133,1,7,16,22,0,10,11,14,21,0,9,0,21,21,0,10,17,22,0,11,11,14,0,63,0,0,0,77,17,0,14,21,0,1,17,0,29,16,22,0,12,11,14,21,0,1,0,31,0,50,21,0,12,8,0,52,0,134,1,0,31,21,0,6,0,35,21,0,12,17,17,8,16,22,0,1,12,14,21,0,1,0,33,21,2,31,17,22,0,13,11,0,12,0,50,0,13,8,21,2,31,17,22,0,14,11,0,8,16,0,29,16,22,0,15,11,14,21,0,13,0,29,21,0,14,17,0,40,0,31,7,21,2,32,17,0,40,0,21,7,22,0,11,13,14,0,57,0,1,21,0,6,17,0,21,21,0,7,17,0,21,21,0,14,0,29,16,17,0,29,21,0,11,0,42,0,13,7,16,17,0,21,21,0,15,17,0,30,16,22,0,16,11,14,21,0,11,0,21,16,0,21,21,0,1,0,31,21,0,15,17,17,0,31,21,0,16,17,22,0,17,11,14,0,57,0,21,21,2,32,0,42,0,13,7,16,17,0,31,21,0,13,17,22,0,18,11,14,21,0,17,0,29,0,50,0,13,0,48,0,25,8,0,12,21,0,18,0,45,0,0,7,16,19,0,31,21,0,16,19,8,16,22,0,19,11,14,21,0,9,21,0,7,0,0,0,57,17,0,44,0,29,7,0,23,21,0,1,0,13,16,19,0,47,0,0,7,9,0,49,0,12,0,2,0,18,19,8,21,0,6,17,0,40,0,1,7,0,57,17,0,29,21,0,18,17,0,40,0,37,7,21,0,19,17,21,0,10,3,3,0,12,16,0,28,16,0,41,0,11,7,16,22,0,20,11,14,21,1,14,0,29,21,1,22,17,0,33,21,0,6,17,22,0,21,11,14,21,0,17,21,0,20,0,31,21,0,21,17,0,58,0,3,21,0,7,0,0,21,0,6,17,17,0,31,21,0,21,17,3,3,25,21,0,1,0,30,16,22,0,3,11,0,40,0,31,7,21,0,1,17,22,0,4,11,14,21,1,13,0,13,16,0,25,16,0,31,0,50,21,0,4,0,36,16,8,0,52,21,1,11,0,31,21,1,13,17,0,31,21,0,4,17,0,14,21,0,4,0,34,16,17,0,40,0,29,7,21,0,3,17,8,16,25,21,1,0,0,13,16,0,25,16,21,0,1,0,56,21,1,1,0,51,0,31,8,8,16,0,12,16,0,2,0,48,0,46,0,0,7,8,21,1,0,0,43,0,14,7,21,0,1,17,17,25,21,0,1,0,31,0,50,21,0,2,0,29,21,0,1,17,8,0,52,0,42,0,57,7,8,16,21,1,3,21,0,2,0,40,0,31,7,16,17,25]) + ,[runtime[0],runtime[1],runtime[2],runtime[3],runtime[4],runtime[6],runtime[7],runtime[8],runtime[9],runtime[10],runtime[11],runtime[12],runtime[13],runtime[14],runtime[15],runtime[16],runtime[18],runtime[19],runtime[20],runtime[21],runtime[22],runtime[23],runtime[24],runtime[25],runtime[26],runtime[27],runtime[29],runtime[30],runtime[31],runtime[32],runtime[33],runtime[35],runtime[36],runtime[37],runtime[38],runtime[39],runtime[40],runtime[41],runtime[42],runtime[43],runtime[44],runtime[45],runtime[46],runtime[47],runtime[48],runtime[49],runtime[50],runtime[51],runtime[52],runtime[53],runtime[54],runtime[55],runtime[56],runtime[57],runtime[58],runtime[59],runtime[61],1,2,3,0,-Infinity,Infinity,10,0.5,10.84,24,-1,128,-1.25,0.1,512,'0',' ','=','|','\"',' + ,[[0,1,0,34],[0,0,555,4],[0,0,642,3],[0,0,685,6],[0,0,788,3],[0,0,801,10],[0,0,1052,3],[0,0,1062,3],[0,0,1072,3],[0,0,1088,4],[0,0,1139,3],[1,1,1164,2],[0,0,1194,3],[0,0,1208,32],[1,0,2124,5],[0,0,2136,4],[0,0,2226,4],[1,1,2327,2],[0,1,2357,4],[0,0,2547,22],[0,0,3079,5],[0,0,3161,3],[0,0,3212,3]] ); explain = (s,c) => { doc.explain.innerHTML = s?drawEval(s,c).map(l=>l.join("")).join("\n"):''; diff --git a/docs/tutorial/combinator.html b/docs/tutorial/combinator.html index 58cd4bf6..09f971f4 100644 --- a/docs/tutorial/combinator.html +++ b/docs/tutorial/combinator.html @@ -122,7 +122,7 @@ </g> <g font-size='21px' font-family='monospace' transform='translate(60.87,25)'> <text dy='0.32em' y='155' font-size='19px'><tspan class='Value'>𝕨</tspan> <tspan class='Function'>𝔽</tspan><tspan class='Modifier'>˜</tspan> <tspan class='Value'>𝕩</tspan></text> - <path class='yellow' style='fill:none' stroke-width='2' d='M0 0C-40 28.5 -0 57 32 114'/> + <path class='yellow' style='fill:none' stroke-width='2' d='M0 0C-40 28.5 0 57 32 114'/> <path class='yellow' style='fill:none' stroke-width='2' d='M0 0C40 28.5 0 57 -32 114'/> <circle r='12' class='code' stroke-width='0' cx='0' cy='0'/> <circle r='12' class='code' stroke-width='0' cx='-32' cy='114'/> @@ -84,11 +84,11 @@ Explain ← { je←j∾¯1.25 q←(/k≤j≠p⊏je-la) (⊏≍⊣) p - pd ← <∘(∾"M VH"∾¨∾⟜⌽)˘˜˝ q ⊏ FmtNum¨ ⍉wh×0.5‿0.1+je≍d + pd ← <∘(∾"M VH"∾¨∾⟜⌽)˘˜˝ q ⊏ FmtNum ⍉wh×0.5‿0.1+je≍d tp ← ii ("text" Attr Pos)∘(to+wh×≍)¨ (k/p)⊏d dim← (wh×⟨≠𝕩,2+⌈´d⟩)+2‿0×pad (512‿0⊸⌈⊸(⊣∾˜(t+pad)-˜-˜÷2˙)dim+2×t) SVG gr Enc ∾⥊¨⟨ - <"rect" Elt rc∾(Pos-pad)∾"width"‿"height"≍˘FmtNum¨dim + <"rect" Elt rc∾(Pos-pad)∾"width"‿"height"≍˘FmtNum dim <"text" Enc src ("path" Elt ps∾"d"≍○<⊢)¨ pd gt Enc ⟨gb,gf⟩ Enc¨ (1⊸⊑¨ ≍○<○(tp Enc¨⊢) ∾¨) toks @@ -19,19 +19,19 @@ Enc ← { } Void ← {∾⟨"<",𝕩,"/>"⟩} -FmtNum ← { - ! 0=≡𝕩 - ! (¯∞⊸< ∧ <⟜∞) 𝕩 - d ← 3 ⋆˜ b←10 # Base 10, up to 3 decimals - _base ← {⌽b|⌊∘÷⟜b⍟(↕𝔽)} # 𝔽 is the number of digits - fl ← ⌊ abs ← (÷2×d) + |𝕩 - ∾ ⟨ - (𝕩<0) / "-" - '0' + (1+·⌊b⋆⁼1⌈⊢)_base fl - 0⊸<◶""‿("." ∾ '0' + · ∨`⌾⌽∘×⊸/ 3 _base) ⌊ d × abs-fl +FmtNums ← { + ! ∧´ (¯∞⊸< ∧ <⟜∞) 𝕩 + k←3⋆˜b←10 + m‿p←"-."-'0' + s←𝕩<0⋄a←|𝕩⋄v←⌊0.5+k×a + ⊔⟜('0'⊸+)´<∘∾˘⍉∾⟨ + ≍≍○<⟜(m¨)/s + ↕∘≠⊸{f←b≤𝕩⋄(∨´f)◶⟨≍,𝕊⟜(⌊÷⟜b)○(f⊸/)´∾b⊸|⌾(⊑⌽)⟩𝕨‿𝕩}⌊v÷k + p¨⌾(⊑⌽)∘⊏⊸∾⍟(0<≠)↕∘≠⊸{f←×𝕩↩k|𝕩⋄𝕨(∨´f)◶⟨↕0‿2,(≍○<⟜(⌊÷⟜k)∾𝕊)⟜(b⊸×)○(f⊸/)⟩𝕩}v ⟩ } -Fmt ← (2⌊≡)◶FmtNum‿(1↓·∾(' '∾FmtNum)¨)‿{𝕩⋄!0} +FmtNum ← (2⌊≡)◶(⊑FmtNums∘⥊)‿(FmtNums⌾⥊)‿{𝕩⋄!0} +Fmt ← (2⌊≡)◶FmtNum‿(1↓·∾' '∾¨FmtNum)‿{𝕩⋄!0} At1 ← " " ∾ {∾⟨𝕨,"='",𝕩,"'"⟩}´ Attr ← ∾⟜(∾ <∘At1⎉1) @@ -39,7 +39,7 @@ At ← { _s ← {((+`׬)⊸-𝕗⊸=)⊸⊔} 𝕨 >⊘(∾⟜(∾At1¨)) '='_s¨ '|'_s 𝕩 } -Pos ← ⟨"x","y"⟩ ≍˘ FmtNum¨ +Pos ← ⟨"x","y"⟩ ≍˘ FmtNum Elt ← Void∘Attr SVG ← { |
