One of the questions in an assignment is as follows:
What are the first 10 elements of
.
.
.
So my question is, how do you extract elements from an infinite list?
What are the first 10 elements of
where a = 1234567, b = 31415821, and m = 100000000?code:<HR>Code:iterate (\x -> (b * x + 1) `mod` m) a
.
.
.
So my question is, how do you extract elements from an infinite list?