open System open System.IO let input = File.ReadAllText(__SOURCE_DIRECTORY__ + "/Day09Input.txt") let (|Int|_|) x = match Int32.TryParse x with | true, x -> Some x | _ -> None let (|Repeat|_|) (input : string) = match input.Split('x') with | [| Int n; Int count |] -> Some (n, count) | _ -> None