3 ms·
I sort of think of design patterns as common code patterns that can’t be abstracted over. In Haskell, I think mtl-style type classes probably count. Maybe also
by fiddlerwoaroof 5y ago
I sort of think of design patterns as common code patterns that can’t be abstracted over. In Haskell, I think mtl-style type classes probably count. Maybe also the sort thing the lens library does where it says “any function that looks like this and obeys these laws can be used as a lens”. In Java (especially older versions), this set of things includes a lot of things that are trivial if you have lambda expressions.
- tome 5y ago(By the way mtl-style type classes can be abstracted over, for example see my article: http://h2.jaguarpaw.co.uk/posts/mtl-style-for-free/ http://h2.jaguarpaw.co.uk/posts/mtl-style-for-free/)