From 9d6f7b9b5123c6e6d8d5a13ee3f4b5f63a0cf663 Mon Sep 17 00:00:00 2001 From: James Yoo Date: Sun, 23 Oct 2022 14:36:19 -0700 Subject: Adding return type to fib function --- entries/jyoo980/scala/Fib.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3-70-g09d2