Skip to content

ostapkhm/Lab1_Postmodern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lab1_FP

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]

Releases

No releases published

Packages

No packages published

Languages