Well, opaque types are pretty useful. However with my initial dev with dotty, this particular feature that I am getting at has failed.

Well, I might be wrong by the way (still not exp with dotty). So take it with a grain of salt

Please find my example


I wouldn't prefer anything more (as code) to make the above snippet work because that defeats the purpose.

The good thing, it fails with ambiguity rather than picking the wrong implementation



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Afsal Thaj

A software engineer and a functional programming enthusiast at Simple-machines, Sydney, and a hardcore hiking fan. https://twitter.com/afsalt2