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

Not super familiar either language, how does lazy evaluation promote the use of smaller functions?



In non-lazy languages you would need to implement laziness to manage composing functions and have good performance. An example being take 5 . filter ... If evaluation wasn't lazy you would run take 5, return the result to filter and so on.


In the languages I use (Scala, Ruby) it's already done, Rust is using iterators which are lazy too. None of those languages are "lazy" in Haskell sense.





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

Search: