mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 01:08:54 +03:00
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
::
|
|
:::: /hoon/action/sole/mar
|
|
::
|
|
/? 310
|
|
/- sole
|
|
/+ old-zuse
|
|
::
|
|
::::
|
|
::
|
|
=, sole
|
|
=, old-zuse
|
|
|_ sole-action
|
|
::
|
|
++ grab :: convert from
|
|
|%
|
|
++ json
|
|
|= jon/^json ^- sole-action
|
|
%- need %. jon
|
|
=> [jo ..sole-action]
|
|
|^ (fo %ret (of det+change ~))
|
|
++ fo
|
|
|* {a/term b/fist}
|
|
|=(c/json ?.(=([%s a] c) (b c) (some [a ~])))
|
|
::
|
|
++ ra
|
|
|* {a/{term fist} b/fist}
|
|
|= c/json %. c
|
|
?.(=(%a -.c) b (pe -.a (ar +.a)))
|
|
::
|
|
++ ke :: callbacks
|
|
|* {gar/* sef/(trap fist)}
|
|
|= jon/json ^- (unit _gar)
|
|
=- ~! gar ~! (need -) -
|
|
((sef) jon)
|
|
::
|
|
++ change (ot ler+(at ni ni ~) ted+(pe 0v0 edit) ~)
|
|
++ char (cu turf so)
|
|
++ edit
|
|
%+ ke *sole-edit |. ~+
|
|
%+ fo %nop
|
|
%+ ra mor+edit
|
|
(of del+ni set+(cu tuba sa) ins+(ot at+ni cha+char ~) ~)
|
|
--
|
|
::
|
|
++ noun sole-action :: clam from %noun
|
|
--
|
|
--
|