Wpis z mikrobloga

@Apollo1993: tak zdefiniowana rodzina może być?

class Collects c where
type Elem c
empty :: c
insert :: Elem c -> c -> c
toList :: c -> [Elem c]
instance Collects [e] where
type Elem [e] = e
empty = []
insert = (:)
toList = id
instance Ord e => Collects (Set.Set e) where
type Elem (Set.Set e) = e
empty = Set.empty
insert = Set.insert
toList = Set.toList