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

Independent Software architect, trainer and coach at Delphino Consultancy (http://www.delphino-consultancy.nl)

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