diff options
Diffstat (limited to 'test/pos/cours2a.scala')
-rw-r--r-- | test/pos/cours2a.scala | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/test/pos/cours2a.scala b/test/pos/cours2a.scala deleted file mode 100644 index 9afa703cd7..0000000000 --- a/test/pos/cours2a.scala +++ /dev/null @@ -1,16 +0,0 @@ -object m1 { - def factorial(n: Int): Int = - if (n == 0) 1 - else n * factorial(n-1); -} - -object m2 { - - def factorial(n: Int): Int = { - def factIter(n: Int, acc: Int): Int = { - if (n == 0) acc - else factIter(n - 1, acc * n) - } - factIter(n, 1) - } -} |