Hacker News new | past | comments | ask | show | jobs | submit login

> eg. a fold instead of explicit recursion

Wouldn't adding some bangs in the patterns kind of do the same thing as using foldl'?




Yes. Most recommendations for implementing recursion in Haskell that I've seen have amounted to writing it in terms of folds. You gain the benefit of experts vetting the code, and novices being able to understand what it is doing it a glance.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: