Quick question. I just read that if you wanted to add a function to e.g. the List module, you can define a new List module with that function:
module List
let foo = // ...
Does this have the effect of adding foo to the main List module, or do you have to explicitly open the new List? The former seems like Ruby’s “monkey patching”; I guess the latter would be more like extension methods.
(I’d try this out but I’m not near a compiler.)
It’s a lot like namespaces; they’re “open”. That is, I may have two files or two assemblies that contribute types into a namespace, and then if I use those files or reference those assemblies and say
I see the union of all the members.