Skip to content

Instantly share code, notes, and snippets.

@dgfitch
Created June 14, 2010 15:08
Show Gist options
  • Save dgfitch/437803 to your computer and use it in GitHub Desktop.
Save dgfitch/437803 to your computer and use it in GitHub Desktop.
let FReplace (remove:string) (replace:string) (input:string) = input.Replace(remove, replace)
let Insert sql s1 s2 =
sql
|> FReplace "step1" s1
|> FReplace "step2" s2
(* OR, possibly more concise: *)
let PipeInsert s1 s2 =
FReplace "step1" s1
>> FReplace "step2" s2
>> FReplace "step3" "you could keep going"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment