Skip to content

Commit 75b842d

Browse files
authored
Update src/scala/Exponentiation.scala
1 parent fdb358e commit 75b842d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scala/Exponentiation.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def exponentiation(base: Int, exponent: Int): Int = {
22
(1 to exponent)
3-
.map(_ => base)
4-
.reduce(_ * _)
3+
.map(_ => base)
4+
.reduce(_ * _)
55
}
66

77
object Main extends App {

0 commit comments

Comments
 (0)