marking3/marking2/knight2a_test.scala
author Christian Urban <urbanc@in.tum.de>
Sun, 11 Aug 2019 21:01:49 +0100
changeset 274 8980686aa2e8
parent 227 b5f3e814a710
permissions -rw-r--r--
test


val f = (x:(Int, Int)) => if (x._1 > 3) Some(List(x)) else None

assert(CW7b.first(List((1,0),(2,0),(3,0),(4,0)), f) == Some(List((4,0))))
assert(CW7b.first(List((1,0),(2,0),(3,0)), f) == None)