Skip to content

Instantly share code, notes, and snippets.

View naokitanimura's full-sized avatar

Naoki Tanimura naokitanimura

View GitHub Profile
@naokitanimura
naokitanimura / gist:1183230
Created August 31, 2011 10:06 — forked from seratch/gist:1167860
S-99 P21-P28 blank
// *** 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
@naokitanimura
naokitanimura / gist:1168105
Created August 24, 2011 13:48 — forked from seratch/gist:1149214
S-99 blank
// *** 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 = {
@naokitanimura
naokitanimura / gist:1168103
Created August 24, 2011 13:47 — forked from seratch/gist:1159315
S-99 P11-P20 blank
// *** 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
@naokitanimura
naokitanimura / gist:1109402
Created July 27, 2011 13:53 — forked from seratch/gist:1108560
Daimon.scala #8 やってみよう
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()