combine:: a -> a -> [a]
combine n k = [n, k]
data H2o = Steam Float | Water Float Float
getStatus::H2o -> IO ()
getStatus (Steam tem) = do
putStr "The steam is "
print tem
putStr " degree Celcius\n"
getStatus (Water tem volume) = do
putStr "The "
print volume
putStr "liter water is "
print tem
putStr " degree Celcius."
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment