Created
November 13, 2013 00:07
-
-
Save dtchepak/7441120 to your computer and use it in GitHub Desktop.
Which do you prefer out of `someFunction` and `someFunction2`? Which do you prefer overall? Which is most idiomatic F#?
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
// names and types combined | |
let someFunction (a:string) (b:int) : string = | |
a + string b | |
// type first, then name args | |
let someFunction2 : string -> int -> string = fun a b -> | |
a + string b | |
// inferred types | |
let someFunction3 a b = | |
a + string b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment