Skip to content

Instantly share code, notes, and snippets.

@aiya000
Created June 18, 2016 07:00
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 aiya000/d1cef2044320ad52597e9a656f321045 to your computer and use it in GitHub Desktop.
Save aiya000/d1cef2044320ad52597e9a656f321045 to your computer and use it in GitHub Desktop.
{-# LANGUAGE OverloadedStrings #-}
import Data.Text ( Text, pack )
import qualified Data.Text.IO as TIO
import System.Random.Shuffle
type ZuQueue = [Text]
genDoko :: IO Text
genDoko = do
zun <- shuffleM [pack "ズン", pack "ドコ"]
return . head $ zun
zuqueue :: IO ZuQueue
zuqueue = do
zun <- genDoko
doko <- zuqueue
return $ zun : doko
main :: IO ()
main = do
q <- zuqueue
mapM_ TIO.putStrLn $ take 10 q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment