[Haskell-cafe] mapping a concept to a type

Edward Z. Yang ezyang at MIT.EDU
Fri May 18 21:10:00 CEST 2012

> I find both heavy and redundant. The first forces me to specify if I want
> an argument of not (with the constructors MR and NR)

I'm sorry, I don't understand what you mean here.

> Do you know of a construction/abstraction that allows having or not an
> argument (a variable number of arguments, here zero or one)?

Either way you do it (Maybe, or building the variant yourself), you're
going to need a constructor. This is a feature, not a bug.


More information about the Haskell-Cafe mailing list