Skip to content

Instantly share code, notes, and snippets.

@VoQn
Created December 24, 2011 07:10
Show Gist options
  • Save VoQn/1516663 to your computer and use it in GitHub Desktop.
Save VoQn/1516663 to your computer and use it in GitHub Desktop.
-- dependency: utf8-string
data Character = Azu | Ruizu deriving Eq
instance Show Character where
show c = case c of
Azu -> "あず"
Ruizu -> "ルイズ"
class Mederable a where
mederu :: a -> String
instance Mederable Character where
mederu c = let name = show c in case c of
Azu -> name ++ "にゃんぺろぺろ"
Ruizu -> foldl (++) ""
[ name, "!", name, "!", name, "!"
, name, "ぅぅうううわぁああああああああああああああああああああああん!!! あぁああああ…ああ…あっあっー!あぁああああああ!!!"
, name, name, name, "ぅううぁわぁああああ!!!"
]
main = mapM_ (putStrLn . mederu) [Azu, Ruizu]
-- try
-- runhaskell JapaneseLoveExpression.hs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment