let rec y func tracker args = func args (Y func tracker (tracker args)) let fib N = (fun (x, y) -> x) (Y (fun N (prev, pprev) -> if N = 1 then (1, 0) else (prev + pprev, prev)) (fun N -> N - 1) N) let main = let value = fib 10 System.Console.WriteLine (value) System.Console.ReadKey ()
Source: https://habr.com/ru/post/57655/
All Articles