scala.Iterable
trait Projection

[source: `scala/Iterable.scala`]

`` `trait` Projection
  `extends` AnyRef

Direct Known Subclasses:
  Map.Projection, MutableIterable.Projection

Method Summary
`def` | filter (p : (A) => Boolean) : Iterable[A] Returns all the elements of this iterable that satisfy the predicate `p`. The order of the elements is preserved. Unlike `filter` in `Iterable`, this API is not strict and will terminate on infinite-sized collections.
`def` | flatMap [B](f : (A) => Iterable[B]) : Iterable[B] Applies the given function `f` to each element of this iterable, then concatenates the results. Unlike `flatMap` in `Iterable`, this API is not strict and will terminate on infinite-sized collections.
`def` | map [B](f : (A) => B) : Iterable[B] Returns the iterable resulting from applying the given function `f` to each element of this iterable. Unlike `map` in `Iterable`, this API is not strict and will terminate on infinite-sized collections.

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Method Details

`` `def` filter(p : (A) => Boolean) : Iterable[A]

  Returns all the elements of this iterable that satisfy the predicate `p`. The order of the elements is preserved. Unlike `filter` in `Iterable`, this API is not strict and will terminate on infinite-sized collections.

Parameters
  `p -` the predicate used to filter the list.
Returns
  the elements of this list satisfying `p`.

`` `def` map[B](f : (A) => B) : Iterable[B]

  Returns the iterable resulting from applying the given function `f` to each element of this iterable. Unlike `map` in `Iterable`, this API is not strict and will terminate on infinite-sized collections.

Parameters
  `f -` function to apply to each element.
Returns
  `f(a0), ..., f(an)` if this iterable is `a0, ..., an`.

`` `def` flatMap[B](f : (A) => Iterable[B]) : Iterable[B]

  Applies the given function `f` to each element of this iterable, then concatenates the results. Unlike `flatMap` in `Iterable`, this API is not strict and will terminate on infinite-sized collections.

Parameters
  `f -` the function to apply on each element.
Returns
  `f(a0) ::: ... ::: f(an)` if this iterable is `a0, ..., an`.