3 ms·
If by "generics", you are referring to the sort of parametric polymorphism that you have in .NET and Java, then no, you don't use functors for that. # let
by momentoftop 7y ago
If by "generics", you are referring to the sort of parametric polymorphism that you have in .NET and Java, then no, you don't use functors for that.
# let foo x = x;;
val foo : 'a -> 'a
You need to use functors if you want higher-kinding, but they're generally useful beyond that, and I wish more typed languages had an SML style module system. F# doesn't have one, and has always had a punier type system.