mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 22:33:06 +03:00
zuse: make +drop-pole produce a unit
Both +drop-list and +drop-map produce units instead of crashing. This makes +drop-pole match that behavior, producing a unit of the resulting tuple.
This commit is contained in:
parent
f7930aaa83
commit
0ecd108f98
@ -5923,12 +5923,26 @@
|
||||
~
|
||||
(some (~(run by lum) need))
|
||||
:: :: ++drop-pole:unity
|
||||
++ drop-pole :: unit tuple
|
||||
|* but/(pole (unit))
|
||||
?~ but !!
|
||||
?~ +.but
|
||||
u:->.but
|
||||
[u:->.but (drop-pole +.but)]
|
||||
++ drop-pole :: collapse to tuple
|
||||
|^ |* pul=(pole (unit))
|
||||
?: (test-pole pul) ~
|
||||
(some (need-pole pul))
|
||||
::
|
||||
++ test-pole
|
||||
|* pul=(pole (unit))
|
||||
^- ?
|
||||
?~ pul &
|
||||
?| ?=(~ -.pul)
|
||||
?~(+.pul | (test-pole +.pul))
|
||||
==
|
||||
::
|
||||
++ need-pole
|
||||
|* pul=(pole (unit))
|
||||
?~ pul !!
|
||||
?~ +.pul
|
||||
u:->.pul
|
||||
[u:->.pul (need-pole +.pul)]
|
||||
--
|
||||
--
|
||||
:: ::::
|
||||
:::: ++format :: (2d) common formats
|
||||
|
Loading…
Reference in New Issue
Block a user