3 ms·
I'm learning F#, not sure if this generalises to ocaml too. In F#, there is no function overloading, but there is method overloading. F# lacks higher-kinded ty
by psd1 2mo ago
I'm learning F#, not sure if this generalises to ocaml too. In F#, there is no function overloading, but there is method overloading.
F# lacks higher-kinded types, but it's possible to roll your own using techniques from the article.
https://robkuz.github.io/Higher-kinded-types-in-fsharp-Intro-Part-I/ https://robkuz.github.io/Higher-kinded-types-in-fsharp-Intro...
https://github.com/G-Research/TypeEquality https://github.com/G-Research/TypeEquality
This gets you a bit closer to the power of Haskell.
It's code golf - f# community consensus is to prefer simple explicit code. But it avoids runtime type checks, so can be a performance optimisation.