I'm trying to re-write a tiny C# lib in F# and I've encountered an error. I'm trying to define optional parameters for a method in a module but the compiler says "Optional arguments are only permitted on type members".
I've checked why you can't use them in loose functions but when typing static member
or member
I get another error instead.
module Kingdom =
let Rule (?years : int) =
()
I thought this was going to wor kas it's how I understood you type it, after reading the Microsoft Docs article about it.