on 140ac0e help sign in
48 lines 1.0 kB history raw
1### `++plug`
3Parse to tuple
5Parsing composer: connects an `++edge` `vex` with a following `++rule` `sab`, producing
6a cell of both the results. See also: the monad applicator ;\~ for a
7more detailed explanation.
9Accepts
10-------
12`sab` is a `++rule`.
14`vex` is an `++edge`.
16Produces
17--------
21Source
22------
24 ++ plug :: first then second
25 ~/ %plug
26 |* {vex/edge sab/rule}
27 ?~ q.vex
28 vex
29 =+ yit=(sab q.u.q.vex)
30 =+ yur=(last p.vex p.yit)
31 ?~ q.yit
32 [p=yur q=q.yit]
33 [p=yur q=[~ u=[p=[p.u.q.vex p.u.q.yit] q=q.u.q.yit]]]
34 ::
36Examples
37--------
39 ~zod/try=> (scan "1..20" ;~(plug dem dot dot dem))
40 [q=1 ~~~. ~~~. q=20]
41 ~zod/try=> (scan "moke/~2014.1.1" ;~(plug sym fas nuck:so))
42 [1.701.539.693 ~~~2f. [% p=[p=~.da q=170.141.184.500.766.106.671.844.917.172.921.958.400]]]
43 ~zod/try=> ;;(,[@tas @t ~ %da @da] (scan "moke/~2014.1.1" ;~(plug sym fas nuck:so)))
44 [%moke '/' ~ %da ~2014.1.1]
48***