apl: ⍸ where — monadic indices-of-truthy + dyadic interval-index
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 51s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 51s
- apl-where (monadic): ravel scan, filter non-zero, +⎕IO offsets - apl-interval-index (dyadic): count of breaks ≤ y; broadcasts over scalar or vector Y - Wired into apl-monadic-fn / apl-dyadic-fn cond chains - +10 pipeline tests covering both arities, ⎕IO offsetting, edge cases (empty mask, all-truthy, y below/above all breaks) - pipeline 109/109
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
((= g "⍕") apl-quad-fmt)
|
||||
((= g "⎕FMT") apl-quad-fmt)
|
||||
((= g "⎕←") apl-quad-print)
|
||||
((= g "⍸") apl-where)
|
||||
(else (error "no monadic fn for glyph")))))
|
||||
|
||||
(define
|
||||
@@ -90,6 +91,7 @@
|
||||
((= g "⍉") apl-transpose-dyadic)
|
||||
((= g "⊢") (fn (a b) b))
|
||||
((= g "⊣") (fn (a b) a))
|
||||
((= g "⍸") apl-interval-index)
|
||||
(else (error "no dyadic fn for glyph")))))
|
||||
|
||||
(define
|
||||
|
||||
Reference in New Issue
Block a user