on 492ae2f help sign in
40 lines 563 B history raw
1### `++slug`
3Use gate to parse delimited list
5Parser modifier: By composing with a gate, parse a delimited `++list` of
6matches.
8Accepts
9-------
11`bus` is a `++rule`.
13`fel` is a `++rule`.
15Produces
16--------
18A `++rule`.
20Source
21------
23 ++ slug
24 |* raq/_|*({a/* b/*} [a b])
25 |* {bus/rule fel/rule}
26 ;~((comp raq) fel (stir +<+.raq raq ;~(pfix bus fel)))
27 ::
30Examples
31--------
33 ~zod/try=> (scan "20+5+110" ((slug add) lus dem))
34 135
35 ~zod/try=> `@t`(scan "a b c" ((slug |=(a/[@ @t] (cat 3 a))) ace alp))
36 'abc'
40***