Skip to content

Instantly share code, notes, and snippets.

@jsuereth
Created August 8, 2012 20:04
Show Gist options
  • Select an option

  • Save jsuereth/3298099 to your computer and use it in GitHub Desktop.

Select an option

Save jsuereth/3298099 to your computer and use it in GitHub Desktop.
FOR ROLAND
scala> val x = collection.mutable.Queue(1,2,3)
x: scala.collection.mutable.Queue[Int] = Queue(1, 2, 3)
scala> x filterNot (_ % 2 == 0)
res0: scala.collection.mutable.MutableList[Int] = Queue(1, 3)
scala> x
res1: scala.collection.mutable.Queue[Int] = Queue(1, 2, 3)
@jsuereth

jsuereth commented Aug 8, 2012

Copy link
Copy Markdown
Author
 (master *%)  ./build/quick/bin/scala
Welcome to Scala version 2.11.0-20120808-025516-c0d5f0aadd (OpenJDK 64-Bit Server VM, Java 1.6.0_24).
Type in expressions to have them evaluated.
Type :help for more information.

scala> val x = collection.mutable.Queue(1,2,3)
x: scala.collection.mutable.Queue[Int] = Queue(1, 2, 3)

scala> x filterNot (_ % 2 == 0)
res0: scala.collection.mutable.Queue[Int] = Queue(1, 3)

@rkuhn

rkuhn commented Aug 8, 2012

Copy link
Copy Markdown

:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment