Enumerate from a value to a final value, inclusive, via succ.
This is generally more efficient than using Prelude's
enumFromTo and combining with sourceList since this
avoids any intermediate data structures.
Subject to fusion
Enumerate from a value to a final value, inclusive, via succ.
This is generally more efficient than using Prelude's
enumFromTo and combining with sourceList since this
avoids any intermediate data structures.
Subject to fusion
Since 0.4.2
Used in Haskell's translation of [n..m] with [n..m] =
enumFromTo n m, a possible implementation being enumFromTo n
m | n <= m = n : enumFromTo (succ n) m | otherwise = []. For
example:
Return the elements of enumFrom x, filtering out
everything that succeeds z. If x succeeds
z, then the resulting list is empty; otherwise, it is
non-empty, since it includes x. In GHC, the default
implementation is a "good producer" for list fusion.