[Haskell-cafe] Explicitly passing an argument to an arrow

Alfredo Di Napoli alfredo.dinapoli at gmail.com
Wed Oct 3 16:09:55 CEST 2012


I see. There exists an equivalent version but more generic?
Just out of curiosity, I'm still pretty new to arrows, as you may have read
:)

Thanks,
A.

On 3 October 2012 15:59, Ertugrul Söylemez <es at ertes.de> wrote:

> Alfredo Di Napoli <alfredo.dinapoli at gmail.com> wrote:
>
> > Solution was simple, after reading that functions are arrows:
> >
> > swapA' t = (swapFirst >>> swapSecond) (t,t)
> >   where
> >     swapFirst  = first snd
> >     swapSecond = second fst
>
> No, that's not a solution, unless a = (->) is acceptable.  This code is
> specific to the function arrow.
>
>
> Greets,
> Ertugrul
>
> --
> Key-ID: E5DD8D11 "Ertugrul Soeylemez <es at ertes.de>"
> FPrint: BD28 3E3F BE63 BADD 4157  9134 D56A 37FA E5DD 8D11
> Keysrv: hkp://subkeys.pgp.net/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121003/4c0e80f5/attachment.htm>


More information about the Haskell-Cafe mailing list