diff options
Diffstat (limited to 'tests/untried/neg/faculty.scala')
-rw-r--r-- | tests/untried/neg/faculty.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/untried/neg/faculty.scala b/tests/untried/neg/faculty.scala new file mode 100644 index 000000000..1f137a48f --- /dev/null +++ b/tests/untried/neg/faculty.scala @@ -0,0 +1,5 @@ +object Test { + + def faculty(x: Int) = if (x == 0) 1 else x * faculty(x - 1) + +} |