I need to write a function that returns true if the set (this set is the output of another function) contains 1 element, and otherwise it leaves the set as it is.
For example:
Set (1) returns a specific result, and Set (2,4) returns a set as it is.
How to check how many elements a set contains?
set scala boolean elements
user2947615
source share