shrub/mar/sole/action.hoon

48 lines
1.1 KiB
Plaintext
Raw Normal View History

2015-04-10 09:57:04 +03:00
::
2016-02-05 06:05:37 +03:00
:::: /hoon/action/sole/mar
2015-04-10 09:57:04 +03:00
::
2016-02-18 02:00:12 +03:00
/? 310
/- sole
2017-02-14 03:02:25 +03:00
/+ old-zuse
2016-11-17 04:42:58 +03:00
::
2015-04-10 09:57:04 +03:00
::::
::
2016-11-17 04:37:39 +03:00
=, sole
2017-02-14 03:02:25 +03:00
=, old-zuse
2015-04-10 09:57:04 +03:00
|_ sole-action
::
++ grab :: convert from
|%
++ json
|= jon/^json ^- sole-action
2015-04-10 09:57:04 +03:00
%- need %. jon
=> [jo ..sole-action]
|^ (fo %ret (of det+change ~))
2015-04-10 09:57:04 +03:00
++ fo
|* {a/term b/fist}
|=(c/json ?.(=([%s a] c) (b c) (some [a ~])))
2015-04-10 09:57:04 +03:00
::
++ ra
|* {a/{term fist} b/fist}
|= c/json %. c
?.(=(%a -.c) b (pe -.a (ar +.a)))
2015-04-10 09:57:04 +03:00
::
2017-10-20 20:52:31 +03:00
++ ke :: callbacks
|* {gar/* sef/(trap fist)}
|= jon/json ^- (unit _gar)
=- ~! gar ~! (need -) -
((sef) jon)
::
++ change (ot ler+(at ni ni ~) ted+(pe 0v0 edit) ~)
2015-04-10 09:57:04 +03:00
++ char (cu turf so)
++ edit
2017-10-20 20:52:31 +03:00
%+ ke *sole-edit |. ~+
2015-04-10 09:57:04 +03:00
%+ fo %nop
2017-10-20 20:52:31 +03:00
%+ ra mor+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
--
--