Difference between revisions of "Solution3.html"
Jump to navigation
Jump to search
(New page: <haskell> parent :: Sheep -> [Sheep] parent s = (maybeToList (mother s)) ++ (maybeToList (father s)) grandparent :: Sheep -> [Sheep] grandparent s = (maybeToList (paternalGrandfather s)) ...) |
(No difference)
|
Revision as of 16:51, 22 August 2012
parent :: Sheep -> [Sheep]
parent s = (maybeToList (mother s)) ++ (maybeToList (father s))
grandparent :: Sheep -> [Sheep]
grandparent s = (maybeToList (paternalGrandfather s)) ++
(maybeToList (paternalGrandmother s)) ++
(maybeToList (maternalGrandfather s)) ++
(maybeToList (maternalGrandmother s))