Skip to content

Instantly share code, notes, and snippets.

@adacola
Created March 12, 2016 03:45
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 adacola/dbfe1e774fc9b905fbcd to your computer and use it in GitHub Desktop.
Save adacola/dbfe1e774fc9b905fbcd to your computer and use it in GitHub Desktop.
ズンズンズンズンドコが並んだらキ・ヨ・シ!と表示
let r = System.Random()
let expected = [|0; 0; 0; 0; 1|]
let kiyoshi() =
Seq.initInfinite (fun _ -> r.Next 2) |> Seq.windowed 5
|> Seq.takeWhile ((<>) expected)
|> Seq.map Array.head
|> Seq.append <| expected
|> Seq.iter (Array.get [|"ズン"; "ドコ"|] >> printf "%s")
printfn "キ・ヨ・シ!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment