csci2041/repo-zhan4854/Lab_15/examples/fibseq.src.txt
Michael Zhang 399845160c
f
2018-01-29 17:35:31 -06:00

7 lines
159 B
Text

function fib(x : int) =
if x < 1 then 1 else fib(x - 1) + fib(x - 2) end;
function fib_array(arr : int[]) =
mapseq(fib, arr);
fib_array([41,42,43,44])