[Haskell-beginners] Unmaybe
Adrian May
adrian.alexander.may at gmail.com
Tue May 14 11:21:44 CEST 2013
Hi there,
I have a really annoying scrap of code:
unmaybe Nothing = mempty
unmaybe (Just dia) = dia
It happened because I'm using Diagrams but building my diagram requires
looking something up in a list using findIndex, which returns Maybe Int.
How do I rid myself of this blotch?
TIA,
Adrian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130514/c059a675/attachment.htm>
More information about the Beginners
mailing list