I’ve been stuck on this for a while now: I have this method
Method(a: (A,B)*): Unit
and I have a map of type Map[A,B], is there a way to convert this map so that I can directly use it as an argument?
Something like:
Method(map.convert)
Thank you.
You can build a sequence of pairs from a
Mapby using.toSeq.You can also pass a sequence of type
Seq[T]as varargs by “casting” it with: _*.Chain the conversions to achieve what you want: