2. そういった機構はなかったので
作りました+デモ
### `def toSet[B >: A]: immutable.Set[B]`
!
Converts this traversable or iterator to a set.!
!
Note: will not terminate for infinite-sized collectio
!
* returns!
* a set containing all elements of this traversable
!
* Definition Classes!
* TraversableOnce ! GenTraversableOnce!
!
(defined at scala.collection.TraversableOnce)!