I have a List of type [T] and [B] in scala, with an object e of type E.
I want to make a function that accepts those three parameters:
def doSomething(t : List[T], b List[B], e : E) {
... }
However I realise that List is immutable, and anything passed to a function is considered as val (not var). But I need to modify t and b and return the modifications back to the caller of the function. Does anyone have any idea how to do this?
I can't go and change the list to array... Because I've been using it everywhere and the file is so big..