Last active
August 4, 2022 03:04
-
-
Save yohfee/aebca17a5a784f934b90e76a878c0e6c to your computer and use it in GitHub Desktop.
ドドスコード
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let next = | |
let rand = System.Random() | |
fun () -> [| "ドド"; "スコ" |] |> Array.item (rand.Next 2) | |
let fin = String.replicate 3 "ドドスコスコスコ" | |
"" | |
|> Seq.unfold (fun s -> | |
if s.EndsWith(fin) then | |
None | |
else | |
Some(s, s + next ())) | |
|> Seq.iter (printf "%s") | |
printf "ラブ注入♡" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rand = System.Random() | |
0 | |
|> Seq.unfold (function | |
| 2184 -> None | |
| i -> | |
let n = rand.Next 2 | |
let s = (i <<< 1 ||| n) % 4096 | |
Some(n, s)) | |
|> Seq.map (fun n -> if n = 1 then "ドド" else "スコ") | |
|> Seq.iter (printf "%s") | |
printf "ラブ注入♡" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ドドスコ = | |
| ドド | |
| スコ | |
let 次ドドスコ = | |
let rand = System.Random() | |
fun () -> [| ドド; スコ |] |> Array.item (rand.Next 2) | |
let rec ドドスコード これまでのドドスコ = | |
match これまでのドドスコ with | |
| スコ :: スコ :: スコ :: ドド :: スコ :: スコ :: スコ :: ドド :: スコ :: スコ :: スコ :: ドド :: _ -> printf "ラブ注入♡" | |
| _ -> | |
let 次 = 次ドドスコ () | |
次 |> printf "%A" | |
次 :: これまでのドドスコ |> ドドスコード | |
ドドスコード [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ドドスコ = | |
| ドド | |
| スコ | |
let 次ドドスコ = | |
let rand = System.Random() | |
fun () -> [| ドド; スコ |] |> Array.item (rand.Next 2) | |
let rec ドドスコード これまでのドドスコ = | |
match List.rev これまでのドドスコ with | |
| [ ドド; スコ; スコ; スコ; ドド; スコ; スコ; スコ; ドド; スコ; スコ; スコ ] -> printf "ラブ注入♡" | |
| _ -> | |
let 次 = 次ドドスコ () | |
次 |> printf "%A" | |
次 :: これまでのドドスコ |> List.truncate 12 |> ドドスコード | |
ドドスコード [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment