Flattening an infinite sequence of lists #
Given ls : ωSequence (List α), ls.flatten is the infinite sequence formed by
concatenating all members of ls. For this definition to make proper sense,
we will consistently assume that all lists in ls are nonempty. Furthermore,
in order to simplify the definition, we will also assume [Inhabited α].
Given an ω-sequence ls of lists, ls.flatten is the infinite sequence
formed by the concatenation of all of them. For the definition to make proper
sense, we will consistently assume that all lists in ls are nonempty.
Equations
Instances For
Given an ω-sequence s and a function f : ℕ → ℕ, s.toSegs f is the ω-sequence
whose n-th element is the list s.extract (f n) (f (n + 1)). In all its uses, the
function f will always be assumed to be strictly monotonic with f 0 = 0.