[Haskell-cafe] Arrow instance of function type [a] -> [b]

David Barbour dmbarbour at gmail.com
Wed Jul 6 18:21:45 CEST 2011


On Wed, Jul 6, 2011 at 6:04 AM, Markus Läll <markus.l2ll at gmail.com> wrote:

> Is it possible to define an Arrow instance of list to list functions?
>
> import Control.Arrow
> import Control.Category
>
> type X a b = [a] -> [b]
>

You need a newtype here. (->) is already an arrow.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110706/061b5c2f/attachment.htm>


More information about the Haskell-Cafe mailing list