Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ashton314
on Oct 28, 2019
|
parent
|
context
|
favorite
| on:
Ask HN: What is the most beautiful piece of code y...
Lazily-generated infinite list of Fibonacci numbers in Haskell:
fibs = 0:1:zipWith (+) fibs (tail fibs)
Recursive definitions and lazy programming blew my mind.
donaldihunter
on Oct 28, 2019
[–]
And in Perl6 / Raku
my @fibs = 1, 1, * + * ... ∞
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: