abs function

num abs(
  1. num val
)

Implementation

num abs(num val) => val < 0 ? -val : val;