apl: array model + scalar primitives Phase 2 (+82 tests)
Implement lib/apl/runtime.sx — APL array model and scalar primitive library:
- make-array/apl-scalar/apl-vector/enclose/disclose constructors
- array-rank/scalar?/array-ref accessors; apl-io=1 (⎕IO default)
- broadcast-monadic/broadcast-dyadic engine (scalar↔scalar, scalar↔array, array↔array)
- Arithmetic: + - × ÷ ⌈ ⌊ * ⍟ | ! ○ (all monadic+dyadic per APL convention)
- Comparison: < ≤ = ≥ > ≠ (return 0/1)
- Logical: ~ ∧ ∨ ⍱ ⍲
- Shape: ⍴ (apl-shape), , (apl-ravel), ≢ (apl-tally), ≡ (apl-depth)
- ⍳ (apl-iota) with ⎕IO=1 — vector 1..n
82 tests in lib/apl/tests/scalar.sx covering all primitive groups;
includes lists-eq helper for ListRef-aware comparison.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>