Skip to content

Instantly share code, notes, and snippets.

@ericuldall
Forked from anonymous/kata.scala
Last active June 3, 2016 00:24
Show Gist options
  • Select an option

  • Save ericuldall/29239b9412ec02803a861dcd047e0aa8 to your computer and use it in GitHub Desktop.

Select an option

Save ericuldall/29239b9412ec02803a861dcd047e0aa8 to your computer and use it in GitHub Desktop.
Scala Kata shared content
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