|
Scala 2
|
||
object
List
extends
java.lang.Object with
ScalaObjectConstructor Summary | |
def
this
|
Def Summary | |
def
apply
[ A& ]
( xs : scala.<repeated> )
: List
Create a list with given elements. |
|
def
concat
[ a& ]
( xss : scala.<repeated> )
: List
Concatenate all the argument lists into a single list. |
|
def
exists2
[ a& , b& ]
( xs : List , ys : List ) ( f : Function2 )
: scala.Boolean
Tests whether the given predicate p holds
for some corresponding elements of the argument lists.
|
|
def
flatten
[ a& ]
( xss : List )
: List
Concatenate all the elements of a given list of lists. |
|
def
forall2
[ a& , b& ]
( xs : List , ys : List ) ( f : Function2 )
: scala.Boolean
Tests whether the given predicate p holds
for all corresponding elements of the argument lists.
|
|
def
fromArray
[ a& ]
( arr : Array )
: List
Converts an array into a list. |
|
def
fromArray
[ a& ]
( arr : Array , start : scala.Int , len : scala.Int )
: List
Converts a range of an array into a list. |
|
def
fromIterator
[ a& ]
( it : Iterator )
: List
Converts an iterator to a list |
|
def
fromString
( str : java.lang.String )
: List
Returns the given string as a list of characters. |
|
def
fromString
( str : java.lang.String , separator : scala.Char )
: List
Parses a string which contains substrings separated by a separator character and returns a list of all substrings. |
|
def
list2ordered
[ a& ]
( x : List ) ( view$0 : Function1 )
: Ordered
Lists with ordered elements are ordered |
|
def
make
[ a& ]
( n : scala.Int , elem : a& )
: List
Create a list containing several copies of an element. |
|
def
map2
[ a& , b& , c& ]
( xs : List , ys : List ) ( f : Function2 )
: List
Returns the list resulting from applying the given function f to
corresponding elements of the argument lists.
|
|
def
map3
[ a& , b& , c& , d& ]
( xs : List , ys : List , zs : List ) ( f : Function3 )
: List
Returns the list resulting from applying the given function f to
corresponding elements of the argument lists.
|
|
def
mapConserve
[ a& <: java.lang.Object ]
( xs : List ) ( f : Function1 )
: List
Like xs map f, but returns xs unchanged if function `f' maps all elements to themselves |
|
def
range
( from : scala.Int , end : scala.Int )
: List
Create a sorted list of all integers in a range. |
|
def
range
( from : scala.Int , end : scala.Int , step : Function1 )
: List
Create a sorted list of all integers in a range. |
|
def
range
( from : scala.Int , end : scala.Int , step : scala.Int )
: List
Create a sorted list of all integers in a range. |
|
def
tabulate
[ a& ]
( n : scala.Int , maker : Function1 )
: List
Create a list by applying a function to successive integers. |
|
def
toString
( xs : List )
: java.lang.String
Returns the given list of characters as a string. |
|
def
transpose
[ a& ]
( xss : List )
: List
Transposes a list of lists. pre: All element lists have the same length. |
|
def
unzip
[ a& , b& ]
( xs : List )
: Tuple2
Transforms a list of pair into a pair of lists. |
|
def
view
[ a& ]
( x : List ) ( view$2 : Function1 )
: Ordered
|
Constructor Detail |
def
this
Def Detail |
def
apply
[ A& ]( xs : scala.<repeated> ) : List
def
concat
[ a& ]( xss : scala.<repeated> ) : List
def
exists2
[ a& , b& ]( xs : List , ys : List ) ( f : Function2 ) : scala.Boolean
p
holds
for some corresponding elements of the argument lists.n != 0 && (p(a0,b0) || ... || p(an,bn))]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
and
m = min(k,l)
def
flatten
[ a& ]( xss : List ) : List
def
forall2
[ a& , b& ]( xs : List , ys : List ) ( f : Function2 ) : scala.Boolean
p
holds
for all corresponding elements of the argument lists.n == 0 || (p(a0,b0) && ... && p(an,bn))]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
and
m = min(k,l)
def
fromArray
[ a& ]( arr : Array ) : List
arr
in the same orderdef
fromArray
[ a& ]( arr : Array , start : scala.Int , len : scala.Int ) : List
arr
in the same orderdef
fromIterator
[ a& ]( it : Iterator ) : List
it.next
def
fromString
( str : java.lang.String ) : List
def
fromString
( str : java.lang.String , separator : scala.Char ) : List
def
list2ordered
[ a& ]( x : List ) ( view$0 : Function1 ) : Ordered
def
make
[ a& ]( n : scala.Int , elem : a& ) : List
def
map2
[ a& , b& , c& ]( xs : List , ys : List ) ( f : Function2 ) : List
f
to
corresponding elements of the argument lists.[f(a0,b0), ..., f(an,bn)]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
and
n = min(k,l)
def
map3
[ a& , b& , c& , d& ]( xs : List , ys : List , zs : List ) ( f : Function3 ) : List
f
to
corresponding elements of the argument lists.[f(a0,b0,c0), ..., f(an,bn,cn)]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
, [c0, ..., cm]
and
n = min(k,l,m)
def
mapConserve
[ a& <: java.lang.Object ]( xs : List ) ( f : Function1 ) : List
def
range
( from : scala.Int , end : scala.Int ) : List
def
range
( from : scala.Int , end : scala.Int , step : Function1 ) : List
def
range
( from : scala.Int , end : scala.Int , step : scala.Int ) : List
def
tabulate
[ a& ]( n : scala.Int , maker : Function1 ) : List
def
toString
( xs : List ) : java.lang.String
def
transpose
[ a& ]( xss : List ) : List
def
unzip
[ a& , b& ]( xs : List ) : Tuple2
def
view
[ a& ]( x : List ) ( view$2 : Function1 ) : Ordered