streamly
streamly copied to clipboard
Contra-flattening a Fold
I hope I'm using the term contravariant here correctly. Basically I want to flatten the inputs of a fold. I.e., I need a function with the following type:
contraFlatten :: Fold m a b -> Fold m [a] b
-- or maybe something more general is possible? e.g.,
-- contraFlatten :: Foldable f => Fold m a b -> Fold m (f a) b
I looked through streamly-core
and nothing like this seems to exist?