Back to front pageView on Hacker News (opens in a new tab)Ask HN: What is the most beautiful piece of code you've ever read?476 pointsby seisvelas (on Hacker News)7 years agoPreferably an elegant snippet rather than an entire (well engineered) codebase.Comments (380) 116 threadsShow all commentsShowing thread 71 of 116[-]ashton3147 years ago1 reply#Lazily-generated infinite list of Fibonacci numbers in Haskell: fibs = 0:1:zipWith (+) fibs (tail fibs) Recursive definitions and lazy programming blew my mind.donaldihunter7 years ago#And in Perl6 / Rakumy @fibs = 1, 1, * + * ... ∞
Ask HN: What is the most beautiful piece of code you've ever read?476 pointsby seisvelas (on Hacker News)7 years ago
ashton3147 years ago1 reply#Lazily-generated infinite list of Fibonacci numbers in Haskell: fibs = 0:1:zipWith (+) fibs (tail fibs) Recursive definitions and lazy programming blew my mind.
Comments (380) 116 threads
Show all comments
Showing thread 71 of 116
my @fibs = 1, 1, * + * ... ∞