Skip to content

Instantly share code, notes, and snippets.

@OnurGumus
Created October 5, 2019 13:42
Show Gist options
  • Save OnurGumus/246cd5b9f7158f2ad24c48069d8326ab to your computer and use it in GitHub Desktop.
Save OnurGumus/246cd5b9f7158f2ad24c48069d8326ab to your computer and use it in GitHub Desktop.
kick start week 2 partial application
let add x y = x + y
let inc = add 1
5 |> inc |> printf "%A"
printf "%A" <| inc 5
printf "%A" (inc 5)
let executeQuery connString query =
printf "%s %s" connString query
executeQuery "myConnnString" "myquery"
executeQuery "myConnString" "myquery2"
let myOracleExecuteQuery = executeQuery "myConnString"
myOracleExecuteQuery "only query"
let executeQuery2 query connString =
printf "%s %s" connString query
let executeQuery3 connString query =
executeQuery2 query connString
let flip f x y = f y x
let executeQuery4 = executeQuery2 |> flip
let myOracleExecuteQuery2 = executeQuery4 "myConnString"
myOracleExecuteQuery2 "only query"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment