Skip to content

Instantly share code, notes, and snippets.

@nekolinuxblog
Created December 22, 2013 16:52
Show Gist options
  • Save nekolinuxblog/8085264 to your computer and use it in GitHub Desktop.
Save nekolinuxblog/8085264 to your computer and use it in GitHub Desktop.
(その14)多重定義
data Human = Human {h_name :: String}
data Neko = Neko {n_name :: String}
hello :: Human -> String
hello h = "hello, " ++ h_name h
{-
hello :: Neko -> String
hello n = "hello, " ++ n_name n
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment