Skip to content

Instantly share code, notes, and snippets.

@j1n3l0
Created March 12, 2009 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j1n3l0/78324 to your computer and use it in GitHub Desktop.
Save j1n3l0/78324 to your computer and use it in GitHub Desktop.
# candidate for abs() in perl6 - just not sure where it should live
our Num multi method abs is export { self < 0 ?? self * -1 !! self }
# multi abs(Num $number) { $number < 0 ?? $number * -1 !! $number }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment