mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
Add ++reap.
Makes constructing lists for testing alot nicer.
This commit is contained in:
parent
f20944f107
commit
e086185603
@ -705,7 +705,7 @@
|
|||||||
?: (b i.a) &
|
?: (b i.a) &
|
||||||
$(a t.a)
|
$(a t.a)
|
||||||
::
|
::
|
||||||
++ murn !: :: maybe transform
|
++ murn :: maybe transform
|
||||||
|* [a=(list) b=$+(* (unit))]
|
|* [a=(list) b=$+(* (unit))]
|
||||||
|-
|
|-
|
||||||
?~ a
|
?~ a
|
||||||
@ -715,6 +715,14 @@
|
|||||||
$(a t.a)
|
$(a t.a)
|
||||||
[i=u.c t=$(a t.a)]
|
[i=u.c t=$(a t.a)]
|
||||||
::
|
::
|
||||||
|
++ reap :: replicate
|
||||||
|
|* [a=@ b=*]
|
||||||
|
=| c=(list)
|
||||||
|
|- ^- (list)
|
||||||
|
?: =(a 0)
|
||||||
|
c
|
||||||
|
$(c [b c], a (dec a))
|
||||||
|
::
|
||||||
++ reel :: right fold
|
++ reel :: right fold
|
||||||
~/ %reel
|
~/ %reel
|
||||||
|* [a=(list) b=_|=([* *] +<+)]
|
|* [a=(list) b=_|=([* *] +<+)]
|
||||||
|
Loading…
Reference in New Issue
Block a user