mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 11:56:54 +03:00
8 lines
158 B
Plaintext
8 lines
158 B
Plaintext
def main:
|
|
y = 1
|
|
fold x = [0, 0, 0] with y:
|
|
case List/Cons:
|
|
return List/Cons(x.head + y, x.tail(y + 1))
|
|
case List/Nil:
|
|
return List/Nil
|