Skip to content

Instantly share code, notes, and snippets.

@mcclure
Created March 27, 2015 16:24
Show Gist options
  • Save mcclure/64ad703e318cd29a799e to your computer and use it in GitHub Desktop.
Save mcclure/64ad703e318cd29a799e to your computer and use it in GitHub Desktop.
let keyMutate f = List.map @@ function (a, b, c) -> (f a, b, c)
let legalResult = keyMutate String.uppercase [ ("one", "two", "three"); ("four","five","six") ]
let a = match legalResult with [(a,_,_);(_,_,_)] -> a | _ -> "Something went wrong"
let () = print_endline a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment