urbit/mar/sole/action.hoon

39 lines
849 B
Plaintext
Raw Normal View History

2015-04-10 09:57:04 +03:00
::
2015-12-20 14:48:17 +03:00
:::: /hoon#sole-action#mar
2015-04-10 09:57:04 +03:00
::
/? 314
/- sole
2015-04-10 09:57:04 +03:00
!:
::::
::
[sole .]
2015-04-10 09:57:04 +03:00
|_ sole-action
::
++ grab :: convert from
|%
++ json
2015-12-10 12:17:19 +03:00
|= jon+^json ^- sole-action
2015-04-10 09:57:04 +03:00
%- need %. jon
=> [jo ..sole-action]
2015-12-20 14:48:17 +03:00
|^ (fo %ret (of det#change ~))
2015-04-10 09:57:04 +03:00
++ fo
2015-12-10 12:17:19 +03:00
|* {a+term b+fist}
2015-12-13 05:51:23 +03:00
|=(c+json ?.(=([%s a] c) (b c) (some [a ~])))
2015-04-10 09:57:04 +03:00
::
++ ra
2015-12-10 12:17:19 +03:00
|* {a+{p+term q+fist} b+fist}
2015-12-13 05:51:23 +03:00
|= c+json %. c
2015-04-10 09:57:04 +03:00
?.(=(%a -.c) b (pe p.a (ar q.a)))
::
2015-12-20 14:48:17 +03:00
++ change (ot ler#(at ni ni ~) ted#(cu |*(a+* [0v0 a]) edit) ~)
2015-04-10 09:57:04 +03:00
++ char (cu turf so)
++ edit
%+ fo %nop
2015-12-20 14:48:17 +03:00
%+ ra mor#|=(json (edit +<))
(of del#ni set#(cu tuba sa) ins#(ot at#ni cha#char ~) ~)
2015-04-10 09:57:04 +03:00
--
::
++ noun sole-action :: clam from %noun
--
--