Record-type recursive member functions and the “rec” keyword
I've always believed that in F# we needed to use the rec keyword for every recursive function, for example: let rec factorial = function | 0 -> 1 | k when k > 0 -> k * (factorial (k - 1)) | failwith "oops!" Today I was playing around with F# and I came up with a code similar to the following: let MyRecordType = { Something : float; SomethingElse : int } with static member factorial = function | 0 -> 1 | k when k > 0 -> k * (MyRecordType.factorial (k - 1)) | failwith "oops!" As you see, I've just defined a recursive function, but I made what at first seemed like a mistake: I forgot to declare