In that case, don't blame abs(), but the fact that you didn't know you could map instead of using a loop. If you had known about map() but not about abs() you could still have writtine a function to map:

if x>=0 return x

else return -x

CEO at Schinchoku and software architect at Delphino Consultancy B.V. — writing about software, and about the Shinchoku startup.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store