This file implements streams as linked lists with lazy tails (cf. the lazy module). In a Typescript-like description :
lazy
type Nil = {}type Stream<A> = Nil | Pair<A, Lazy<Stream<A>>> Copy
type Nil = {}type Stream<A> = Nil | Pair<A, Lazy<Stream<A>>>
Not that these streams are either empty or always have their head that is evaluated.
This file implements streams as linked lists with lazy tails (cf. the
lazy
module). In a Typescript-like description :Not that these streams are either empty or always have their head that is evaluated.