aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--entries/jyoo980/scala/Fib.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/entries/jyoo980/scala/Fib.scala b/entries/jyoo980/scala/Fib.scala
index 05bdd1e..f9107b0 100644
--- a/entries/jyoo980/scala/Fib.scala
+++ b/entries/jyoo980/scala/Fib.scala
@@ -1,4 +1,4 @@
-def fib(n: Int) =
+def fib(n: Int): Int =
(0 until n).foldLeft((0, 1)) {
case ((prev, curr), _) => (curr, prev + curr)
} match {