Это рабочий пример из здесь :
type MethodExample() =
// standalone method
member this.AddOne x =
x + 1
// calls another method
member this.AddTwo x =
this.AddOne x |> this.AddOne
Вот что я хочу сделать:
type IMethod =
abstract member AddOne: a:int -> int
abstract member AddTwo: a:int -> int
type MethodExample() =
interface IMethod with
member this.AddOne x =
x + 1
// calls another method
member this.AddTwo x =
this.AddOne x |> this.AddOne
Функция AddOne
недоступно, я также пытался снизить это до MethodExample, но это ужасно и не работает.
Как я могу это сделать?