Here's a part of it:
type Shape = | Rock | Paper | Scissors let parseCharacters (line: string) = let onlySingleCharacters (a: string, b: string) = a.Length = 1 && b.Length = 1 match line.Split() with | [| a; b |] when onlySingleCharacters (a, b) -> match a[0], b[0] with | 'A', 'X' -> Some(Rock, Rock) | 'A', 'Y' -> Some(Rock, Paper) | 'A', 'Z' -> Some(Rock, Scissors) | 'B', 'X' -> Some(Paper, Rock) | 'B', 'Y' -> Some(Paper, Paper) | 'B', 'Z' -> Some(Paper, Scissors) | 'C', 'X' -> Some(Scissors, Rock) | 'C', 'Y' -> Some(Scissors, Paper) | 'C', 'Z' -> Some(Scissors, Scissors) | _ -> None | _ -> None let rec readLines () = let line = Console.ReadLine() match line with | null | "" -> [] | _ -> match parseCharacters line with | Some parsedLine -> parsedLine :: readLines () | None -> readLines ()
Here's a part of it: