on 492ae2f help sign in
60 lines 1.1 kB history raw
1### `++slay`
3Parse span to coin
5Parses a span `txt` to the unit of a `++coin`.
7Accepts
8-------
10Produces
11--------
13`txt` is a `@ta`.
15Source
16------
18 ++ slay
19 |= txt/@ta ^- (unit coin)
20 =+ ^= vex
21 ?: (gth 0x7fff.ffff txt) :: XX petty cache
22 ~+ ((full nuck:so) [[1 1] (trip txt)])
23 ((full nuck:so) [[1 1] (trip txt)])
24 ?~ q.vex
25 ~
26 [~ p.u.q.vex]
27 ::
30Examples
31--------
33 ~zod/try=> (slay '~pillyt')
34 [~ [% p=[p=~.p q=32.819]]]
35 ~zod/try=> (slay '0x12')
36 [~ [% p=[p=~.ux q=18]]]
37 ~zod/try=> (slay '.127.0.0.1')
38 [~ [% p=[p=~.if q=2.130.706.433]]]
39 ~zod/try=> `@ud`.127.0.0.1
40 2.130.706.433
41 ~zod/try=> (slay '._20_0w25_sam__')
42 [ ~
43 [ %many
44 p=~[[% p=[p=~.ud q=20]] [% p=[p=~.uw q=133]] [% p=[p=~.tas q=7.168.371]]]
45 ]
46 ]
47 ~zod/try=> `@`%sam
48 7.168.371
49 ~zod/try=> (slay '~0ph')
50 [~ [%blob p=[1 1]]]
51 ~zod/try=> 0ph
52 ~ <syntax error at [1 2]>
53 ~zod/try=> ~0ph
54 [1 1]
55 ~zod/try=> `@uv`(jam [1 1])
56 0vph
60***