Here, the input type can describe two different things: a tuple or an argument list of the CLI method.
This has nothing to do with the return type, since the only interpretation of this return type is a tuple. But in the argument list, you can choose between a CLI method that takes two arguments, or a CLI method that takes one argument, which is a tuple. The latter are indicated by additional brackets.
That's why you can implement Bar3 with one argument typed as a tuple, which is not possible with others (with F # 3).
This is also the place where double parentheses matter for single parentheses. If Bar3 were not abstract, you could provide tuple input by declaring it as member this.Bar3 ((arg1, arg2)) .
The argument list of the method contains additional functions, such as optional arguments. So:
type Test () = member t.BarA(a, ?b) = a member t.BarT((a, ?b)) = a
The last line gives the error "Optional arguments are allowed only for type members", since b now part of the tuple template, and not an argument in the method argument list.
Vandroiy
source share