mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-22 07:59:22 +03:00
Rewrite ++doze in %clay.
I'm always a fan of removing ugly names just for a single call.
This commit is contained in:
parent
4387713100
commit
1242d1b456
@ -143,22 +143,21 @@
|
||||
::
|
||||
++ doze :: sleep until
|
||||
=+ xiq=(~(tap by qyx) ~)
|
||||
=| nex=(unit ,@da)
|
||||
|- ^+ nex
|
||||
?~ xiq nex
|
||||
=+ ^= zis ^+ nex
|
||||
?- -.q.i.xiq
|
||||
& ?.(?=(%da -.q.p.q.i.xiq) ~ [~ p.q.p.q.i.xiq])
|
||||
^- (unit ,@da)
|
||||
%+ roll xiq
|
||||
|= [xaq=[p=duct q=rave] nex=(unit ,@da)]
|
||||
%+ hunt nex
|
||||
?- -.q.xaq
|
||||
& ?.(?=(%da -.q.p.q.xaq) ~ [~ p.q.p.q.xaq])
|
||||
::
|
||||
|
|
||||
=+ mot=`moat`p.q.i.xiq
|
||||
%+ hunt
|
||||
?. ?=(%da -.p.mot) ~
|
||||
?.((lth now p.p.mot) ~ [~ p.p.mot])
|
||||
?. ?=(%da -.q.mot) ~
|
||||
?.((lth now p.q.mot) [~ now] [~ p.q.mot])
|
||||
==
|
||||
$(xiq t.xiq, nex (hunt nex zis))
|
||||
|
|
||||
=+ mot=`moat`p.q.xaq
|
||||
%+ hunt
|
||||
?. ?=(%da -.p.mot) ~
|
||||
?.((lth now p.p.mot) ~ [~ p.p.mot])
|
||||
?. ?=(%da -.q.mot) ~
|
||||
?.((lth now p.q.mot) [~ now] [~ p.q.mot])
|
||||
==
|
||||
::
|
||||
++ duce :: produce request
|
||||
|= [hen=duct rav=rave]
|
||||
@ -484,11 +483,11 @@
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
=| nex=(unit ,@da)
|
||||
=+ dal=(turn (~(tap by fat.ruf) ~) |=([a=@p b=room] a))
|
||||
|- ^+ nex
|
||||
?~ dal nex
|
||||
$(dal t.dal, nex (hunt nex doze:(un i.dal now ruf)))
|
||||
^- (unit ,@da)
|
||||
%+ roll (~(tap by fat.ruf) ~)
|
||||
|= [[dal=@p *] nex=(unit ,@da)]
|
||||
%+ hunt nex
|
||||
doze:(un dal now ruf)
|
||||
::
|
||||
++ load
|
||||
|= old=[%0 ruf=raft]
|
||||
|
Loading…
Reference in New Issue
Block a user