Created
August 29, 2019 07:29
-
-
Save forki/93cce99c21ca9611da432e86c2098f23 to your computer and use it in GitHub Desktop.
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 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