How does one convert a Scala Array to a mutable.Set?
It’s easy to convert to an immutable.Set:
Array(1, 2, 3).toSet
But I can’t find an obvious way to convert to a mutable.Set.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The weird
:_*type ascription, forces factory method to see the array as a list of arguments.