If-then-else Statements
if <CONDITION> then <EXPRESSION1> else <EXPRESSION2>if True then 1 else "untrue"trackScore :: Float -> Float -> String
trackScore time avgTime =
if time < avgTime
then "Great! Your time is " ++ show (avgTime - time) ++ " seconds
below average!"
else "Your time is " ++ show (time - avgTime) ++ " seconds above
average."show :: a -> Stringghci> show 252.5
"252.2"Last updated