You are viewing a single comment's thread. Return to all comments →
def f(arr:List[Int]):List[Int] = arr.map((a:Int) => abs(a))
I feel it was a bit of cop out using the abs() function. Does anyone have a method to solve it using something tail recursive?