Created
April 6, 2020 18:12
-
-
Save jchannon/b65e412da5eb44bb8ac89b1c37cfc5fc to your computer and use it in GitHub Desktop.
This file contains 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
type LogLevel = | |
| Error | |
| Warning | |
| Info | |
let log (level:LogLevel) message = // LogLevel -> string -> unit | |
printfn "[%A]: %s" level message | |
() | |
log Error "Curried function" | |
let logError = log Error | |
logError "Partially Applied function" //This isn't currying it's just that the compiler knows how to assign a function to a variable that calls another function without all arguments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment