-
-
Save ericuldall/29239b9412ec02803a861dcd047e0aa8 to your computer and use it in GitHub Desktop.
Scala Kata shared content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.scalakata._ | |
| @instrument class Playground { | |
| object Math { | |
| def add(ints:Array[Int]): Int = { | |
| var sum = 0 | |
| var i=0 | |
| while(i < ints.length){ | |
| sum += ints(i) | |
| i += 1 | |
| } | |
| return sum | |
| } | |
| } | |
| println(Math.add(1 to 10000 toArray)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment