I think what you mean is:
l::(foo(List((userId, userName))))
When you put stuff between the square brackets, you are attempting to type the list and I assume you actually wanted to add the Tuple
of userId
and userName
to a List instead.
You could also write it like this if all you wanted to do was put it into that List
and you did not need that Tuple
extractor:
Query(Users) foreach { tup =>
l::(foo(List(tup)))
}