Function is a first class citizen in Scala, therefore lazy evaluation feels very intuitive and handy in many situations. However recently I encountered a situation where lazy evaluation could be catastrophic if we’re not careful. 880 more words