Add ++reap.

Makes constructing lists for testing alot nicer.
This commit is contained in:
Jared Hance 2014-07-14 11:28:48 -04:00
parent f20944f107
commit e086185603

View File

@ -705,7 +705,7 @@
?: (b i.a) &
$(a t.a)
::
++ murn !: :: maybe transform
++ murn :: maybe transform
|* [a=(list) b=$+(* (unit))]
|-
?~ a
@ -715,6 +715,14 @@
$(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
|* [a=(list) b=_|=([* *] +<+)]