Function Application
Consider this function:
let makeName (firstName: string) (lastName: string) =
$"{firstName} {lastName}"
Let's apply it different ways with and without pipes, and with and without partial application.
Application without pipeline:
let name = makeName "Bob" "Vila"
Partial application without pipeline:
let applyLastName = "Bob"
let name = applyLastName "Vila"
Partial application with pipeline:
let name =
"Vila"
|> makeName "Bob"
Partial application with forward pipe and lambda:
let name =
"Bob"
|> makeName
|> fun applyLastName -> applyLastName "Vila"
Application with double forward pipe:
let name =
("Bob", "Vila")
||> makeName
Application with double backward pipe:
let name =
makeName <|| ("Bob", "Vila")