src/Pure/library.scala
changeset 60215 5fb4990dfc73
parent 59697 43e14b0e2ef8
child 61883 c0f34fe6aa61
--- a/src/Pure/library.scala	Fri May 01 15:33:43 2015 +0200
+++ b/src/Pure/library.scala	Sun May 03 00:01:10 2015 +0200
@@ -107,7 +107,7 @@
       def hasNext(): Boolean = state.isDefined
       def next(): CharSequence =
         state match {
-          case Some((s, i)) => { state = next_chunk(i); s }
+          case Some((s, i)) => state = next_chunk(i); s
           case None => Iterator.empty.next()
         }
     }
@@ -207,7 +207,7 @@
 
   /* canonical list operations */
 
-  def member[A, B](xs: List[A])(x: B): Boolean = xs.exists(_ == x)
+  def member[A, B](xs: List[A])(x: B): Boolean = xs.contains(x)
   def insert[A](x: A)(xs: List[A]): List[A] = if (xs.contains(x)) xs else x :: xs
   def remove[A, B](x: B)(xs: List[A]): List[A] = if (member(xs)(x)) xs.filterNot(_ == x) else xs
   def update[A](x: A)(xs: List[A]): List[A] = x :: remove(x)(xs)