Skip to content

Commit 4c88910

Browse files
author
Javier de Silóniz Sandino
authored
Merge pull request #26 from Tschis/master
Changing abs() to accept Double instead of Int
2 parents 2c12b91 + 276bbb7 commit 4c88910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/scalatutorial/sections/FunctionalLoops.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ object FunctionalLoops extends ScalaTutorialSection {
1919
* Example:
2020
*
2121
* {{{
22-
* def abs(x: Int) = if (x >= 0) x else -x
22+
* def abs(x: Double) = if (x >= 0) x else -x
2323
* }}}
2424
*
2525
* `x >= 0` is a ''predicate'', of type `Boolean`.

0 commit comments

Comments
 (0)