[Haskell-beginners] Maybe a -> Maybe b

Imants Cekusins imantc at gmail.com
Fri Aug 25 12:56:41 UTC 2017


> as an exercise, you can try to figure out the implementation

.. time is up :-P
Here is an answer for slightly more generic Proxy and f:


data Proxy a = Proxy a

exProxy::Functor f =>
     f (Proxy a) -> f a
exProxy = (un1 <$>)
    where un1 (Proxy a1) = a1

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170825/96892427/attachment.html>


More information about the Beginners mailing list