Scala Library Documentation
|
|
scala/Iterable.scala
]
trait
Projection
extends
AnyRefMethod 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 |
p
. The order of the elements is preserved.
Unlike filter
in Iterable
, this API is
not strict and will terminate on infinite-sized collections.p -
the predicate used to filter the list.p
.f
to each element of this iterable. Unlike map
in Iterable
, this API is not strict and will terminate on
infinite-sized collections.f -
function to apply to each element.f(a0), ..., f(an)
if this iterable is a0, ..., an
.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.f -
the function to apply on each element.f(a0) ::: ... ::: f(an)
if this iterable is a0, ..., an
.
Scala Library Documentation
|
|