using variable length argument in scala

taxonomy(notFormattedTerms.toSeq:_*)

With : _* you virtually transform a sequence argument so that it looks as if a several arguments had been passed to the variable length method. This transformation, however, only works for (ordered?) simple sequence types and, as in this case, not for a Map. Therefore, one will have to use an explicit toSeq before.

Leave a Comment