on cf70879 help sign in
48 lines 748 B history raw
1### `++wick`
3Coin format decode
5Unescape `++span` `~~` as `~` and `~-` as `_`.
7Accepts
8-------
10`a` is a an atom.
12Produces
13--------
15A `++span` `@ta`.
17Source
18------
20 ++ wick :: knot format
21 |= a/@
22 ^- (unit @ta)
23 =+ b=(rip 3 a)
24 =- ?^(b ~ (some (rap 3 (flop c))))
25 =| c/tape
26 |- ^- {b/tape c/tape}
27 ?~ b [~ c]
28 ?. =('~' i.b)
29 $(b t.b, c [i.b c])
30 ?~ t.b [b ~]
31 ?- i.t.b
32 $'~' $(b t.t.b, c ['~' c])
33 $'-' $(b t.t.b, c ['_' c])
34 @ [b ~]
35 ==
36 ::
38Examples
39--------
41 /~zod/try=> `@t`(wick '~-ams~~lop')
42 '_ams~lop'
43 /~zod/try=> `@t`(wick (wack '~20_sam~'))
44 '~20_sam~'
48***