© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. Serrano MenaPractical Haskellhttps://doi.org/10.1007/978-1-4842-8581-7_5

5. Laziness and Infinite Structures

Alejandro Serrano Mena1  
(1)
Utrecht, The Netherlands
 

In previous chapters, I introduced several of the pillars of Haskell programming : the pure functional paradigm and the strongly typed nature of the language, which nevertheless allows powerful type constructs such as parametric polymorphism and type classes. This chapter will be devoted to understanding the unique evaluation model of Haskell, based on laziness, and the consequences of that choice.

In short, lazy evaluation means that only the necessary parts of an expression are computed, and ...

Get Practical Haskell: A Real-World Guide to Functional Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.