Hello everyone,
sorry for the dumb question but I'm wrapping my head around arrow just from
this morning.
Consider this toy function to swap argument of a tuple:
swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b)
swapA' = swapFirst swapSecond
where
swapFirst = first $ arr snd
swapSecond =
On Wed, Oct 03, 2012 at 10:41:25AM +0200, Alfredo Di Napoli wrote:
Hello everyone,
sorry for the dumb question but I'm wrapping my head around arrow just from
this morning.
Consider this toy function to swap argument of a tuple:
swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b)
swapA' =
Thanks Brent, this should do the trick, although what I was asking was
something more general:
For explicitly pass I meant passing them without the eta reduce, in other
terms:
swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b)
swapA' t = () swapFirst swapSecond (???)
where
swapFirst =
Alfredo Di Napoli alfredo.dinap...@gmail.com wrote:
Thanks Brent, this should do the trick, although what I was asking was
something more general:
For explicitly pass I meant passing them without the eta reduce, in
other terms:
swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b)
swapA' t =
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 e...@ertes.de wrote:
Alfredo Di Napoli alfredo.dinap...@gmail.com wrote:
Solution was simple,