Skip to content

Commit 5b17ea0

Browse files
author
Paul Sasieta Arana
committed
Linting fixed
1 parent 1815d67 commit 5b17ea0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/scala/ExponentiationRecursive.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import scala.annotation.tailrec
22

33
@tailrec
4-
def exponentiationRecursive(base: Int, exponent: Int, accumulator: Int = 1): Int = exponent match {
4+
def exponentiationRecursive(
5+
base: Int,
6+
exponent: Int,
7+
accumulator: Int = 1
8+
): Int = exponent match {
59
case 0 => accumulator
610
case _ => exponentiationRecursive(base, exponent - 1, accumulator * base)
711
}

0 commit comments

Comments
 (0)