Is there a way to specify named arguments for a function in an F# constructor?

Viewed 490

Is there a way to name the function arguments in a constructor?

type UnnamedInCtor(foo: string -> string -> bool) = 
    member this.Foo: string -> string -> bool = foo
    member this.Bar: a:string -> b:string -> bool = foo
    member this.Fizz = foo

//Does not compile
type NamedInCtor(foo: a:string -> b:string -> bool) = 
    member this.Foo: string -> string -> bool = foo
    member this.Bar: a:string -> b:string -> bool = foo
    member this.Fizz = foo
2 Answers
Related