Lazy Evaluation Flashcards

1
Q

What is lazy evaluation?

A

A lazy function programming language evaluates the arguments of functions and of constructors only when necessary to give a result and then only as far as necessary to give a result.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When would this be used?

A

With infinite lists i.e. to return a list of primes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly