mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
Make empty sets and maps size zero.
Changes the one use of wyt:by to match the old behavior.
This commit is contained in:
parent
4187db53a2
commit
26e6f8f8e3
@ -1946,7 +1946,6 @@
|
||||
$(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
|
||||
::
|
||||
+- wyt :: size of set
|
||||
.+
|
||||
|- ^- @
|
||||
?~(a 0 +((add $(a l.a) $(a r.a))))
|
||||
--
|
||||
@ -2184,7 +2183,6 @@
|
||||
[n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
|
||||
::
|
||||
+- wyt :: depth of map
|
||||
.+
|
||||
|- ^- @
|
||||
?~(a 0 +((add $(a l.a) $(a r.a))))
|
||||
--
|
||||
@ -7266,7 +7264,7 @@
|
||||
?^ hey
|
||||
[dex [%stop u.hey]]
|
||||
?: (~(has in gil) sut)
|
||||
=+ dyr=~(wyt by p.dex)
|
||||
=+ dyr=+(~(wyt by p.dex))
|
||||
[[(~(put by p.dex) sut dyr) q.dex] [%stop dyr]]
|
||||
=+ rom=$(gil (~(put in gil) sut), sut repo)
|
||||
=+ rey=(~(get by p.p.rom) sut)
|
||||
|
Loading…
Reference in New Issue
Block a user