F#でズンドコした改造版
let zundokoSeq = seq{ let rand = new System.Random () while true do let x = rand.Next(2) (* 0がズンで1がドコ *) if x = 0 then printfn "ズン" else printfn "ドコ" yield x } zundokoSeq |> Seq.windowed 5 |> Seq.takeWhile (fun x -> x = [|0;0;0;0;1|] |> not) |> Seq.toArray |> ignore printfn "キ・ヨ・シ!"