Am 07.02.13 03:37, schrieb Jacob Thomas:
Hello
I'm new to Haskell, and need help with figuring out the Either type...
Any example to show how this works?
Maybe a program I wrote a while ago can help you get it.
https://github.com/ctbo/slitherlink
In Slitherlink.hs there is a function
Hi Jocob
I would recommend you to go through the LYH (
http://learnyouahaskell.com/making-our-own-types-and-typeclasses ) .
data Either a b = Left a | Right b deriving (Eq, Ord, Read, Show)
Lets say you have a division function and you want to avoid division by
zero so this simple function
Hello
I'm new to Haskell, and need help with figuring out the Either type...
Any example to show how this works?
Jacob
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Often, Either is used to represent, exclusively, a value or a failure, in a
more detailed way than Maybe can. For example, a function like `parse` (
http://hackage.haskell.org/packages/archive/parsec/latest/doc/html/Text-Parsec-Prim.html#v:parse),
which is part of Parsec, might have a type like: