Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. module Main where
  2.  
  3. import System.IO
  4.  
  5. main :: IO()
  6. main = do
  7. result <- charName 'a' -- error could not match type
  8. putStr result -- error could not match type
  9.  
  10. charName :: Char -> String
  11. charName 'a' = "Albert"
  12. charName 'b' = "Broseph"
  13. charName 'c' = "Cecil"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement