car とか cdr の件。
カーとかクダーとか、聞いて、::が何故case classなのか分かりましたよ。
ちなみに、scala.Listには、
こんなcase classもありましたよ、やりましたね。
@SerialVersionUID(0 - 8256821097970055419L) case object Nil extends List[Nothing] { override def isEmpty = true def head: Nothing = throw new NoSuchElementException("head of empty list") def tail: List[Nothing] = throw new NoSuchElementException("tail of empty list") }