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

It's also true in other languages. Erlang's foldr specifically annotates this in the documentation.



Erlang's foldr says exactly the opposite though, because Erlang is an eager language:

> foldl/3 is tail recursive and is usually preferred to foldr/3.


oh jeez I totally missed that. Thanks!


The advantages to foldr in certain situations are very cross-language.

But foldl vs. foldl' is more about a badly-optimized implementation detail than anything else. It's very fair to qualify it as "in Haskell".




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

Search: