Skip to content

Instantly share code, notes, and snippets.

@forki
Created August 29, 2019 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save forki/93cce99c21ca9611da432e86c2098f23 to your computer and use it in GitHub Desktop.
Save forki/93cce99c21ca9611da432e86c2098f23 to your computer and use it in GitHub Desktop.
let myFun fmt =
Printf.ksprintf (fun text ->
text.Replace("1","one").Replace("2","two") // <- this is naive
) fmt
let newText = myFun "%d-%d" 1 2
printfn "%s" newText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment