
21 Nov
2011
21 Nov
'11
5:49 a.m.
The key function is to_int below: <snip> module Main where ageJudge :: (Integral a) => a -> String ageJudge age | age >= 40 = "You're too old!" | age <= 30 = "Your too young" | otherwise = "Not in the programming age range.." to_int s = read s :: Int eg = ageJudge (to_int "40") </snip>