Skip to content

Instantly share code, notes, and snippets.

@CoditCompany
Created September 8, 2017 06:12
Show Gist options
  • Select an option

  • Save CoditCompany/e28802572b21ea1da0c886b3941db0c8 to your computer and use it in GitHub Desktop.

Select an option

Save CoditCompany/e28802572b21ea1da0c886b3941db0c8 to your computer and use it in GitHub Desktop.
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 ()
values ints str
|> List.map (chunk >> List.map string >> List.reduce (+) >> trim)
let prow = row |>> chop [10; 30; 50; 65; 68]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment