on bfaa358 help sign in
40 lines 626 B history raw
1### `++skim`
3Suffix
5Cycles through the members of a list `a`, passing them to a gate `b` and
6producing a list of all of the members that produce `%.y`. Inverse of
7`++skip`.
9Accepts
10-------
12`b` is a gate that accepts one argument and produces a boolean.
14Produces
15--------
17A boolean
19Source
20------
22 ++ skim :: only
23 ~/ %skim
24 |* {a/(list) b/$-(* ?)}
25 |-
26 ^+ a
27 ?~ a ~
28 ?:((b i.a) [i.a $(a t.a)] $(a t.a))
31Examples
32--------
34 ~zod/try=> =a |=(a/@ (gth a 1))
35 ~zod/try=> (skim (limo [0 1 2 3 ~]) a)
36 [i=2 t=[i=3 t=~]]
40***