let fiboSeq =
Seq.unfold (fun(a,b) -> Some(a+b,(b, a+b))) (0,1)

let solve count =
fiboSeq
|> Seq.take count
|> Seq.iter( fun x -> printf "%d\n" x)

solve 10

Try it online!


함수형 너무 좋다