14.3 - -- guess it's cold in the winter, and otherwise...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
--14.3 data Temp = Cold | Hot deriving (Show) data Season = Spring | Summer | Autumn | Winter deriving (Eq) weather :: Season -> Temp -- weather function for New Zealand: The same, because their winter is -- hot as well -- weather for Brazil (crossed by the Equator):
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: -- guess it's cold in the winter, and otherwise hot-- don't know if that's ok (never been to Brazil ;-) weather season | season == Winter = Cold | otherwise = Hot...
View Full Document

Ask a homework question - tutors are online