Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // A difference of F# to C# is tupled versus curried function arguments.
- // I suggest this F# function application style;
- // * Separate functions from their arguments with a space.
- // * Only use parens with tuples or when adding type annotations to curried args.
- let f x = x
- let add x y = x + y
- let add' (x, y) = x + y
- let y = f 1 // not f(1)
- let five = add 2 3 // or with a redundant type annotation add (2 : int) 3
- let five' = add' (2, 3) // not add'(2, 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement