vats: sort alphabetically within constraints (%base first, %kids last)

This commit is contained in:
Joe Bryan 2023-04-29 10:13:50 -04:00
parent 92a1f50a49
commit b7bf1e68ca
2 changed files with 5 additions and 3 deletions

View File

@ -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))

View File

@ -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)