Question

I'm sure this should be obvious, but how do i have a multiline static method in a class? i just can't figure it out...

Was it helpful?

Solution

Just write them in multiple lines. The compiler can infer the method-body per indentation.

type Example = class
  static member Foo a b = 
     // ...
     a + b
end
Example.Foo 1 2
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top