Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Traversable : Conversion
- Goal: turn a Traversable collection into something more specific.
All these conversions return their receiver argument unchanged if the run-time type of the collection already matches the demanded collection type. For instance, applying toList to a list will yield the list itself.
> List(1, 2, 4).toArray res0: Array[Int] = Array(1, 2, 4)