2p: Serialization
+cue
+cueAccepts
Produces
Source
++ cue
~/ %cue
|= a=@
^- *
=+ b=0
=+ m=`(map @ *)`~
=< q
|- ^- [p=@ q=* r=(map @ *)]
?: =(0 (cut 0 [b 1] a))
=+ c=(rub +(b) a)
[+(p.c) q.c (~(put by m) b q.c)]
=+ c=(add 2 b)
?: =(0 (cut 0 [+(b) 1] a))
=+ u=$(b c)
=+ v=$(b (add p.u c), m r.u)
=+ w=[q.u q.v]
[(add 2 (add p.u p.v)) w (~(put by r.v) b w)]
=+ d=(rub c a)
[(add 2 p.d) (need (~(get by m) q.d)) m]Examples
+jam
+jamAccepts
Produces
Source
Examples
+mat
+matAccepts
Produces
Source
Examples
Discussion
+rub
+rubAccepts
Produces
Source
Examples
Discussion
Last updated