Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def abs(x: Int) = {
- if (x < 0) {
- -x
- } else {
- x
- }
- }
- vs.
- def abs(x: Int) = if (x < 0) -x else x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement