Skip to content

Instantly share code, notes, and snippets.

@daros
daros / gist:1015722
Created June 8, 2011 23:33
CodeBreaker kata
package CodeBreaker
import collection.immutable.List._
import annotation.tailrec
class Marker(val secretList: List[String]) {
def guess(guessList: List[String]) = {
val zipped = guessList zip secretList
val possible = zipped.filter{case (a,b) => a != b}.unzip
@daros
daros / gist:829556
Created February 16, 2011 15:26
Scala paralell test
case class Call(i: Int) {
def call ={
var sleep = 100 + scala.util.Random.nextInt(10)
Thread.sleep(sleep)
println(i)
sleep
}
}