I’m currently reading All About Monads in this site. And the Sheep
definition is not defined. It’s defined as type Sheep = ...
A lot of the examples use the type definition Sheep
but it’s defined as:
type Sheep = ...
father :: Sheep -> Maybe Sheep
father = ...
mother :: Sheep -> Maybe Sheep
mother = ...
I can’t continue with the exercises, Is it supposed to be an exercise? I’m confused because I can’t follow along the examples provided. The type is used throughout the page, and the Sheep
definition is repeatedly used. GHCi does not allow the definition, so I’m a bit lost. The example is near the top of the page under the An Example page. If anyone can explain why this is, or how I can get around it, I would appreciate it.