• + 0 comments

    Scala:

    arr.map(x => if (x < 0) -x else x)