
1 Aug
2021
1 Aug
'21
5:07 p.m.
On 31/07/2021 11.14, Henning Thielemann wrote:
A more modern approach would use type functions:
class Setish set where type Element set empty :: set singleton :: Element set -> set
Just to add: This would be an "extensional" set, i.e one specified explicitly by its elements. But there are also "intensional" sets which are defined by some sort of mathematical property that holds for its elements. Naturally, the operations that make sense for either of those is *very* different.