[Haskell-cafe] Functor instance for FunPB

Alex Wede awede at techfak.uni-bielefeld.de
Sat May 6 18:32:45 UTC 2017


Hey,


No, I do not want to show anything.

The monoid instance is from my teacher. It is an exercise. Sry for the 
misunderstanding.


LG


Alex


Am 06.05.2017 um 20:25 schrieb MarLinn:
>
>>   mappend pb1 pb2 = FunPB $ \n -> (,) n $ msum . (<$>) (uncurry (flip 
>> const).((flip runFunPB) n)) $ [pb1,pb2]
>
> This cracks me up. Well played. Well played indeed.
>
> Well all the things you need are right here in this line, right? I 
> mean you sent it because you want to show us what you know, right? 
> There's higher order functions, there's mapping and folding and 
> currying of different kinds and everything. So what's missing?
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



More information about the Haskell-Cafe mailing list