Skip to content

Instantly share code, notes, and snippets.

@arya
Created November 20, 2012 16:50
Show Gist options
  • Save arya/4119194 to your computer and use it in GitHub Desktop.
Save arya/4119194 to your computer and use it in GitHub Desktop.
scala> class Foo extends scala.collection.mutable.Queue[Int] {
|
| def foo = last0
| }
defined class Foo
scala> new Foo
res0: Foo = ()
scala> res0.enqueue(1)
scala> res0.dequeue
res2: Int = 1
scala> res0.length
res3: Int = 0
scala> res0.foo
res4: scala.collection.mutable.LinkedList[Int] = LinkedList(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment