Core
Stream primitives: done/more/fromList/iterate/range/replicate.
done
Terminate a stream with a final value.
done : a -> Computation (Step a b)
fromList
Create a stream from a list.
fromList : [a] -> Computation (Step null a)
iterate
Create an infinite stream by repeated application.
iterate f x = [x, f(x), f(f(x)), ...]
Must be consumed with a limiting combinator (take, takeWhile).
iterate : (a -> a) -> a -> Computation (Step r a)
more
Yield an element and a continuation stream.
more : a -> Computation (Step r a) -> Computation (Step r a)
range
Create a stream of integers from start (inclusive) to end (exclusive).
range : int -> int -> Computation (Step null int)
replicate
Create a stream of n copies of a value.
replicate : int -> a -> Computation (Step null a)