You must log in or register to comment.
This has no business looking this satisfying
Goofy but aesthetically pleasing impl
This isn’t goofy, this is an extremely diffused “pattern” when you need to use non dynamic number sequences.
Dynamic programming /s
ghci> φ = (1 + sqrt 5) / 2 ghci> ψ = 1 - φ ghci> fib n = (φ ** n - ψ ** n) / (sqrt 5)