I'm trying to figure out how to make static methods in a class in F#. Does anyone have any idea how to do this?
+5
A:
Sure, just prefix the method with the static keyword. Here's an example:
type Example = class
static member Add a b = a + b
end
Example.Add 1 2
val it : int = 3
sker
2009-06-13 09:04:45
Cool thanks! (filling characters)
RCIX
2009-06-13 09:16:10