mirror of
https://github.com/urbit/ares.git
synced 2024-11-22 15:08:54 +03:00
hoon: add +roll
This commit is contained in:
parent
304f399595
commit
ff2650cf3a
@ -229,6 +229,14 @@
|
||||
?~ 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
|
||||
|* [a=@ b=(list)]
|
||||
|
Loading…
Reference in New Issue
Block a user