Consider the following functions, using the repeat function that you wrote in Exercise 1.26:

repeat 1000000000 id
repeat 1000000000 ((+) 1)
repeat 1000000000 ((*) 2)

Do these functions run to completion in practice, for all int inputs? (The answer may depend on your implementation of repeat.) Implement a simple function equal to each of these that runs to completion in a small number of steps.

Your work

Log in to submit your work and track progress.