2 ms·
The recursive Fibonacci definition in Haskell is far more beautiful IMO. But there's always more beautiful one-line snippets (like the regex that can tell you i
by cyphar 11y ago
The recursive Fibonacci definition in Haskell is far more beautiful IMO. But there's always more beautiful one-line snippets (like the regex that can tell you if a number is prime).
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)