Files
rose-ash/lib/apl/parser.sx
giles f5d3b1df19
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
apl: ⍵-rebind + primes.apl runs as-written (+4 tests)
Two changes wire the original primes idiom through:

1. Parser :glyph branch detects ⍵← / ⍺← and emits :assign-expr
   (was only :name-token before).
2. Eval-ast :name lookup checks env["⍵"]/env["⍺"] before falling
   back to env["omega"]/env["alpha"].  Inline ⍵-rebind binds
   under the glyph key directly.

apl-run "primes ← {(2=+⌿0=⍵∘.|⍵)/⍵←⍳⍵} ⋄ primes 50"
→ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47

primes.apl now runs as-written via apl-run-file + " ⋄ primes 30".
2026-05-07 23:19:45 +00:00

22 KiB