[Haskell-cafe] Foldable for (,)
M Farkas-Dyck
m.farkasdyck at gmail.com
Wed May 3 21:20:14 UTC 2017
On 03/05/2017, Olaf Klinke <olf at aatal-apotheke.de> wrote:
> Streams can be given a Traversable instance easily:
>
> instance Traversable Stream where
> sequenceA (Cons fa fas) = liftA2 Cons fa (sequenceA fas)
>
> For some applicatives this will not terminate. For streams of Maybes,
> sequenceA will either yield Just an infinite stream or return Nothing.
I believe this will never return `Just` an infinite stream — rather,
it will not terminate.
More information about the Haskell-Cafe
mailing list