O'Reilly logo

Learning Functional Data Structures and Algorithms by Raju Kumar Mishra, Atul Khot

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

Lazy evaluation delays the evaluation of an expression till the value of expression is needed. Delaying the expression evaluation speeds up the program in many cases, and optimizes the memory utilization.

Memoized functions speed up in their subsequent calls as their output value in the first call is memoized.

Streams are lazy list. An element of a stream is evaluated on-demand and value is memoized. In subsequent calls on stream object for same element, it returns memoized value..

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required