Skip to content

Instantly share code, notes, and snippets.

@kei-q
Last active March 12, 2016 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kei-q/30b209265510189ff777 to your computer and use it in GitHub Desktop.
Save kei-q/30b209265510189ff777 to your computer and use it in GitHub Desktop.
ズンドコ エラー処理とか全然してない
import System.Random
main = getStdGen >>= putStrLn . mconcat . go 0 . randomRs (0,1)
go n (1:_) | 4<=n = ["ドコキ・ヨ・シ!"]
go n (x:xs) = ["ドコ","ズン"]!!x : go ((n+1)*x) xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment