mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 04:58:08 +03:00
vats: sort alphabetically within constraints (%base first, %kids last)
This commit is contained in:
parent
92a1f50a49
commit
b7bf1e68ca
@ -22,6 +22,7 @@
|
||||
%- zing
|
||||
%+ turn
|
||||
%+ sort
|
||||
~(tap in .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now)))
|
||||
=/ sed .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now))
|
||||
(sort ~(tap in sed) |=([a=@ b=@] !(aor a b)))
|
||||
|=([a=desk b=desk] ?|(=(a %kids) =(b %base)))
|
||||
|=(syd=desk (report-vat (report-prep p.bec now) p.bec now syd verb))
|
||||
|
@ -50,8 +50,9 @@
|
||||
|=(syd=@tas (report-vat prep our now syd verb))
|
||||
=/ deks
|
||||
?~ desks
|
||||
%+ sort ~(tap in -.prep)
|
||||
|=([[a=desk *] [b=desk *]] ?|(=(a %kids) =(b %base)))
|
||||
%+ sort
|
||||
(sort ~(tap in -.prep) |=([[a=@ *] b=@ *] !(aor a b)))
|
||||
|=([[a=@ *] [b=@ *]] ?|(=(a %kids) =(b %base)))
|
||||
%+ skip ~(tap in -.prep)
|
||||
|=([syd=@tas *] =(~ (find ~[syd] desks)))
|
||||
?: =(filt %blocking)
|
||||
|
Loading…
Reference in New Issue
Block a user