mirror of
https://github.com/urbit/ares.git
synced 2024-11-23 00:25:49 +03:00
hoon: add +roll
This commit is contained in:
parent
304f399595
commit
ff2650cf3a
@ -229,6 +229,14 @@
|
|||||||
?~ a ~
|
?~ a ~
|
||||||
[b $(a (dec a))]
|
[b $(a (dec a))]
|
||||||
::
|
::
|
||||||
|
++ roll :: left fold
|
||||||
|
~/ %roll
|
||||||
|
|* [a=(list) b=_=>(~ |=([* *] +<+))]
|
||||||
|
|- ^+ ,.+<+.b
|
||||||
|
?~ a
|
||||||
|
+<+.b
|
||||||
|
$(a t.a, b b(+<+ (b i.a +<+.b)))
|
||||||
|
::
|
||||||
++ slag :: suffix
|
++ slag :: suffix
|
||||||
~/ %slag
|
~/ %slag
|
||||||
|* [a=@ b=(list)]
|
|* [a=@ b=(list)]
|
||||||
|
Loading…
Reference in New Issue
Block a user