this is a source code of functional programming in scala course third assignment (objectSet) answer