Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: