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
| // *** S-99: Ninety-Nine Scala Problems *** | |
| // http://aperiodic.net/phil/scala/s-99/ | |
| // | |
| // wget http://www.scala-tools.org/repo-releases/org/scalatest/scal.test_2.9.0-1/1.6.1/scalatest_2.9.0-1-1.6.1.jar | |
| // scala -cp scalatest-*.jar s99-21-28.scala | |
| import org.scalatest.matchers.ShouldMatchers._ | |
| class NotImplementedYet extends RuntimeException |
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
| // *** S-99: Ninety-Nine Scala Problems *** | |
| // http://aperiodic.net/phil/scala/s-99/ | |
| // | |
| // wget http://www.scala-tools.org/repo-releases/org/scalatest/scalatest_2.9.0-1/1.6.1/scalatest_2.9.0-1-1.6.1.jar | |
| // scala -cp scalatest-*.jar s99.scala | |
| import org.scalatest.matchers.ShouldMatchers._ | |
| // P01: Find the last element of a list. | |
| def last[T](list: List[T]): T = { |
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
| // *** S-99: Ninety-Nine Scala Problems *** | |
| // http://aperiodic.net/phil/scala/s-99/ | |
| // | |
| // wget http://www.scala-tools.org/repo-releases/org/scalatest/scalatest_2.9.0-1/1.6.1/scalatest_2.9.0-1-1.6.1.jar | |
| // scala -cp scalatest-*.jar s99-11-20.scala | |
| import org.scalatest.matchers.ShouldMatchers._ | |
| class NotImplementedYet extends RuntimeException |
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 actors.Actor | |
| class Get | |
| case class IsUsed(station: Station) | |
| case class MarkAsUsed(station: Station) | |
| case class MarkAsUsedResponse(isMarkedAsUsed: Boolean) | |
| case class Station(name: String) | |
| class Yamanotesen extends Actor { | |
| start() |