Lazy Evaluation Worksheet
Assess and deepen your understanding of lazy evaluation in programming.
Full Name
*
First Name
Last Name
Date
*
 -
Month
 -
Day
Year
2 digit month, 2 digit day, 4 digit year
Date
How familiar are you with the concept of lazy evaluation?
*
Not familiar
1
2
3
4
Very familiar
5
1 is Not familiar, 5 is Very familiar
Which programming languages support lazy evaluation? (Select all that apply)
*
Haskell
Python
JavaScript
C
Other
Define lazy evaluation in your own words.
*
Select the statements that correctly describe lazy evaluation.
*
Expressions are only evaluated when their values are needed.
All expressions are evaluated as soon as they are bound.
It can help improve program efficiency.
It always uses more memory than eager evaluation.
Consider the following code snippet. Indicate whether the result will be computed immediately or only when needed.
*
Rows
Evaluation Type
x = [1..]
1
print (take 5 x)
2
y = expensiveComputation()
3
print y
4
Provide an example where lazy evaluation is beneficial.
*
How confident are you in applying lazy evaluation after this worksheet?
*
1
2
3
4
5
What questions do you still have about lazy evaluation?
Would you like additional resources on lazy evaluation?
Yes
No
Submit Worksheet
Should be Empty: