This page is no longer maintained — Please continue to the home page at www.scala-lang.org

mutable.Stack does not conform to new collection architecture

No replies
Ittay Dror 2
Joined: 2010-05-05,
User offline. Last seen 42 years 45 weeks ago.

scala> Stack[Int]()
res19: scala.collection.mutable.Stack[Int] = Stack()

scala> res19.span(_ != 2)
res20: (Seq[Int], Seq[Int]) = (List(),List())

According to the new Architecture it should return (Stack(), Stack()).

Ittay

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland