First functional programming lab
The task was to write Set class with such methods:
1.union(a: Set[A], b: Set[A]): Set[A]
2.intersection(a: Set[A], b: Set[A]): Set[A]
3.difference(a: Set[A], b: Set[B]): Set[B]
4.remove(s: Set[A], a: A): Set[A]
Set was renamed to MySet
The additional task was to write map and flatMap, namely:
1.map[A, B](set: MySet[A], f: A => B): MySet[B]
2.flatMap[A, B](set: MySet[A], f: A => MySet[B]): MySet[B]