F# has an interesting way to achieve a similar function in Statically Resolved Type Parameters (SRTP)
Palatable blog post: https://www.compositional-it.com/news-blog/static-duck-typin...
Official docs: https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...