Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 359 Bytes

README.md

File metadata and controls

12 lines (10 loc) · 359 Bytes

Fibonacci sequence

Write a function that computes the sequence of the first n Fibonacci numbers, with the following type:

val fib : int -> int list = <fun>

For instance, computing the first 10 elements of the sequence gives:

fib 10 ;;
- : int list = [0; 1; 1; 2; 3; 5; 8; 13; 21; 34]