mats.rauhala at gmail.com
Tue May 14 12:29:23 CEST 2013
maybe mempty id
On Tue, May 14, 2013 at 05:21:44PM +0800, Adrian May wrote:
> 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?
> Beginners mailing list
> Beginners at haskell.org
More information about the Beginners