[Haskell-beginners] Bool newtype

Imants Cekusins imantc at gmail.com
Sun Aug 14 06:06:26 UTC 2016


> data SwitchState = On | Off
‚Äč
yep, this is clearer than newtype Bool. "If"s may be replaced with "case",
and code becomes shorter.

Nice one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160814/1f0c41cd/attachment.html>


More information about the Beginners mailing list