Proposal: add unzips for Data.Sequence

Tony Morris tmorris at tmorris.net
Fri Jan 12 07:07:50 UTC 2018


This idea has been around a while:

https://hackage.haskell.org/package/category-extras-0.52.1/docs/Control-Functor-Zip.html

Here is an article:

http://comonad.com/reader/2008/zipping-and-unzipping-functors/

Note that all functors give unzip:

\x -> (fmap fst x, fmap snd x)


On Fri, Jan 12, 2018 at 1:28 PM, David Feuer <david.feuer at gmail.com> wrote:

> Paolo G. Giarrusso (Blaisorblade) would like to add an unzip function to
> Data.Sequence. I agree. I propose adding
>
>   unzip :: Seq (a,b) -> (Seq a, Seq b)
>
>   unzipWith :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b)
>
> Does anyone object?
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20180112/a9fe0d82/attachment-0001.html>


More information about the Libraries mailing list