lucky :: (Integral a) => a -> String
lucky 7 = "LUCKY NUMBER SEVEN!"
lucky x = "Sorry, you're out of luck, pal!"
Learn you a Haskell for Great Good - Ch.4 - snippet 01
As of March 2020, School of Haskell has been switched to read-only mode.
As of March 2020, School of Haskell has been switched to read-only mode.
lucky :: (Integral a) => a -> String
lucky 7 = "LUCKY NUMBER SEVEN!"
lucky x = "Sorry, you're out of luck, pal!"