17 lines
176 B
Plaintext
17 lines
176 B
Plaintext
1 -> (output)
|
|
|
|
add_one = |list| => {
|
|
new_list = []
|
|
|
|
for number in list {
|
|
new_list += number + 1
|
|
}
|
|
|
|
new_list
|
|
}
|
|
|
|
foo = [1, 2, 3] -> (add_one)
|
|
|
|
(assert_equal [2 3 4] foo)
|
|
|