Write a function to compute the nth Fooanacci number, where the 0th Foo number is 1, the 1st is 1, and the nth for n > 1 is the product of the (n-1)st and (n-2)nd Fooonacci numbers.
let rec foo (n:int) : int =
0
1
2
3
4
5
6
11
1
| n -> (foo (n-1)) * (foo (n-2));;
]]>
Guess the function f below.
let rec f (l:int list) : int =
[]
[3]
[3;2;5]
[5;5]
[8;1;2;3]
1
| x::xs -> x::(f xs);;
]]>