You are viewing a single comment's thread. Return to all comments →
def fabs(arr:List[Int]):List[Int] = { def loop(arr:List[Int],acc:List[Int]):List[Int] = arr match { case Nil => Nil case h :: tail => h.abs :: loop(arr tail,acc) } loop(arr,List()) }
Seems like cookies are disabled on this browser, please enable them to open this website
Update List
You are viewing a single comment's thread. Return to all comments →