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 chop ints str = | |
| let values xs str = | |
| let head = 0, List.head xs | |
| let middle = List.pairwise xs | |
| let tail = List.last xs, String.length str | |
| head :: middle @ [tail] | |
| let chars = [ for c in str -> c ] | |
| let chunk (skip, take) = List.take take chars |> List.skip skip | |
| let trim (x : string) = x.Trim () |
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 datetime y m d = new DateTime (y, m, d) | |
| let string' (cs : char list) : string = System.String.Join(System.String.Empty, cs |> List.toArray) | |
| let string_int = string' >> int | |
| let PO = pstring "PO" | |
| let dash = pstring "-" | |
| let countDigit n = count n digit |>> string_int | |
| let year_dash = countDigit 4 .>> dash |
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 day = count 2 digit |>> string_int |
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 month_dash = month .>> dash |
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 month = count 2 digit |>> string_int |
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 year_dash = year .>> dash |
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 dash = pstring "-" |
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 string' (cs : char list) : string = String.Join(String.Empty, cs |> List.toArray) | |
| let string_int = string' >> int |
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 year = count 4 digit |>> string_int |
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 PO = pstring "PO" |