Created
May 21, 2010 07:44
-
-
Save yuroyoro/408589 to your computer and use it in GitHub Desktop.
This file contains 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
scala> class S[A]( val theSeq:Seq[A] ) extends Seq[A]{ | |
| def apply(n:Int ) = theSeq(n) | |
| def length = theSeq.length | |
| override def iterator = theSeq.iterator | |
| override def toString = "hogehoge" | |
| } | |
defined class S | |
scala> new S( List("foo","bar")) | |
res15: S[java.lang.String] = line35(foo, bar) | |
scala> res15.toString | |
res16: java.lang.String = hogehoge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment