4,494
edits
(→Documentation: BQN) |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
== Examples == | == Examples == | ||
< | <syntaxhighlight lang=apl> | ||
+\⍳5 ⍝ plus-scan over range of integers from 1 to 5 | +\⍳5 ⍝ plus-scan over range of integers from 1 to 5 | ||
1 3 6 10 15 | 1 3 6 10 15 | ||
</ | </syntaxhighlight> | ||
== Applications == | == Applications == | ||
Removing disconnected trailing 1s from a [[boolean]] mask: | Removing disconnected trailing 1s from a [[boolean]] mask: | ||
< | <syntaxhighlight lang=apl> | ||
mask←1 1 1 1 0 1 1 0 0 1 | mask←1 1 1 1 0 1 1 0 0 1 | ||
mask | mask | ||
Line 18: | Line 18: | ||
∧\mask ⍝ and-scan mask | ∧\mask ⍝ and-scan mask | ||
1 1 1 1 0 0 0 0 0 0 | 1 1 1 1 0 0 0 0 0 0 | ||
</ | </syntaxhighlight> | ||
== External links == | == External links == | ||
=== Lessons === | === Lessons === |