16 lines
206 B
Plaintext
16 lines
206 B
Plaintext
1 -> (output)
|
|
|
|
add_one = (fn numbers <[int]>) <[int]> {
|
|
new_numbers = []
|
|
|
|
for number in numbers {
|
|
new_numbers += number + 1
|
|
}
|
|
|
|
new_numbers
|
|
}
|
|
|
|
foo = [1, 2, 3] -> (add_one)
|
|
|
|
(assert_equal [2 3 4] foo)
|