tests

parse @p
pass
(slay '~nec')
pass!
[~ [%$ p=[p=~.p q=1]]]
open fullpage test
parse hexidecimal
fail
(slay '0x12') :: intentionally incorrect for :: demonstration purposes
fail
incorrect output result. test failed.
got:
[~ [%$ p=[p=~.ux q=18]]]
open fullpage test

go up

+slay

parse cord to coin

accepts
txt is a @ta
produces
a (unit coin)
source
++  slay
|=  txt=@ta  ^-  (unit coin)
=+  ^=  vex
    ?:  (gth 0x7fff.ffff txt)                         ::  XX  petty cache
      ~+  ((full nuck:so) [[1 1] (trip txt)])
    ((full nuck:so) [[1 1] (trip txt)])
?~  q.vex
  ~
[~ p.u.q.vex]

commentary

slay a wrapper over the coin parser +so.

when sending nounds from earth, you often want to do some serialization of dimes. slay will allows decoding of those back into martian values.