mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 04:22:48 +03:00
55 lines
1.2 KiB
Plaintext
55 lines
1.2 KiB
Plaintext
!:
|
|
:: /=try=/bin/revert/hoon
|
|
:: Call with desk & change to revert
|
|
::
|
|
=> .(-< `who=@p`-<)
|
|
=> .(+ =>(+ ^/=/main/=/lib/pony))
|
|
|= [est=time eny=@uw]
|
|
|= $: des=span
|
|
cas=@ud
|
|
~
|
|
==
|
|
=+ dom=((hard dome) .^(%cv /=/[des]/=))
|
|
::%- (posh (add ~s1 est))
|
|
::|= tim=@da
|
|
=+ tim=est
|
|
^- bowl
|
|
:_ ~
|
|
^- (list gift)
|
|
:_ ~
|
|
=+ ran=((hard rang) .^(%cu /(scot %p who)/main/(scot %da tim)))
|
|
=+ hed=(~(got by hut.ran) (~(got by hit.dom) let.dom))
|
|
=+ rev=(~(got by hut.ran) (~(got by hit.dom) cas))
|
|
?~ p.rev !!
|
|
=+ nex=(~(got by hut.ran) i.p.rev)
|
|
=+ ^= vex
|
|
%- %~ zoal ze
|
|
:+ est dom ran
|
|
:- [r.rev ~]
|
|
:- q.nex
|
|
est
|
|
=+ run=ran(hut (~(put by hut.ran) r.vex vex)) :: hack
|
|
=+ ^= gar
|
|
%- %- %~ merge ze
|
|
:+ est dom ran
|
|
:- [who des]
|
|
[who des]
|
|
:- vex
|
|
:- hed
|
|
:- tim
|
|
%- %~ strat ze
|
|
:+ est dom run
|
|
%meld
|
|
=+ ^= yak
|
|
%- %~ zoal ze
|
|
:+ est dom ran
|
|
:- [r.hed ~]
|
|
:- q.-.gar
|
|
est
|
|
=+ hek=+.gar
|
|
=+ lat=-:(~(aqel ze est dom ran) hek ~)
|
|
=+ hut=(~(put by _(map tako yaki)) r.yak yak)
|
|
=+ let=+(let.dom)
|
|
=+ hit=(~(put by _(map ,@ud tako)) let r.yak)
|
|
`gift`[%og des [let hit hut lat]]
|