Skip to content

Instantly share code, notes, and snippets.

@codingnirvana
Created January 23, 2015 11:20
Show Gist options
  • Select an option

  • Save codingnirvana/61048ddeecdb739008da to your computer and use it in GitHub Desktop.

Select an option

Save codingnirvana/61048ddeecdb739008da to your computer and use it in GitHub Desktop.
Debugging Challenge #1
object Foo extends App{
val TAKE_COUNT = 5
def filterFirstFive(xs: List[Int]) = xs.take(TAKE_COUNT)
}
object FooSpec extends App {
assert(Foo.filterFirstFive(List(1,2,3,4,5,6)).size == 5)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment