|
Scala
1.4.0.3 |
|||
Method Summary | |
final
|
def apply[A](xs: A*): List[A]
Create a list with given elements. |
final
|
def exists2[a,b](xs: List[a], ys: List[b])(f: (a,b) => Boolean): Boolean
Tests whether the given predicate p holds
for some corresponding elements of the argument lists.
|
final
|
def flatten[a](l: List[List[a]]): List[a]
Concatenate all the elements of a given list of lists. |
final
|
def forall2[a,b](xs: List[a], ys: List[b])(f: (a,b) => Boolean): Boolean
Tests whether the given predicate p holds
for all corresponding elements of the argument lists.
|
final
|
def fromArray[a](arr: Array[a]): List[a]
Converts an array into a list. |
final
|
def fromArray[a](arr: Array[a], start: Int, len: Int): List[a]
Converts a range of an array into a list. |
final
|
def fromIterator[a](it: Iterator[a]): List[a]
Converts an iterator to a list |
final
|
def fromString(str: String, separator: Char): List[String]
Parses a string which contains substrings separated by a separator character and returns a list of all substrings. |
final
|
def fromString(str: String): List[Char]
Returns the given string as a list of characters. |
final
|
def list2ordered[a](view: (a) => Ordered[a])(x: List[a]): Ordered[List[a]]
Lists with ordered elements are ordered |
final
|
def make[a](n: Int, elem: a): List[a]
Create a list containing several copies of an element. |
final
|
def map2[a,b,c](xs: List[a], ys: List[b])(f: (a,b) => c): List[c]
Returns the list resulting from applying the given function f to
corresponding elements of the argument lists.
|
final
|
def map3[a,b,c,d](xs: List[a], ys: List[b], zs: List[c])(f: (a,b,c) => d): List[d]
Returns the list resulting from applying the given function f to
corresponding elements of the argument lists.
|
final
|
def mapConserve[a<:Object](xs: List[a])(f: (a) => a): List[a]
Like xs map f, but returns xs unchanged if function `f' maps all elements to themselves |
final
|
def range(from: Int, end: Int): List[Int]
Create a sorted list of all integers in a range. |
final
|
def range(from: Int, end: Int, step: Int): List[Int]
Create a sorted list of all integers in a range. |
final
|
def range(from: Int, end: Int, step: (Int) => Int): List[Int]
Create a sorted list of all integers in a range. |
final
|
def tabulate[a](n: Int, maker: (Int) => a): List[a]
Create a list by applying a function to successive integers. |
final
|
def toString(xs: List[Char]): String
Returns the given list of characters as a string. |
def toString(): String
|
|
final
|
def transpose[a](xss: List[List[a]]): List[List[a]]
Transposes a list of lists. |
final
|
def unzip[a,b](l: List[Tuple2[a,b]]): Tuple2[List[a],List[b]]
Transforms a list of pair into a pair of lists. |
final
|
def view[a](view: (a) => Ordered[a])(x: List[a]): Ordered[List[a]]
|
Method Detail |
final def apply[A](xs: A*): List[A]
xs
-
the elements to put in the list
final def range(from: Int, end: Int): List[Int]
from
-
the start value of the list
end
-
the end value of the list
final def range(from: Int, end: Int, step: Int): List[Int]
from
-
the start value of the list
end
-
the end value of the list
step
-
the increment value of the list
final def range(from: Int, end: Int, step: (Int) => Int): List[Int]
from
-
the start value of the list
end
-
the end value of the list
step
-
the increment function of the list
final def make[a](n: Int, elem: a): List[a]
n
-
the length of the resulting list
elem
-
the element composing the resulting list
final def tabulate[a](n: Int, maker: (Int) => a): List[a]
n
-
the length of the resulting list
maker
-
the procedure which, given an integer n, returns the
nth element of the resulting list, where n is in [0;n).
final def flatten[a](l: List[List[a]]): List[a]
l
-
the list of lists that are to be concatenated
final def unzip[a,b](l: List[Tuple2[a,b]]): Tuple2[List[a],List[b]]
l
-
the list of pairs to unzip
final def fromIterator[a](it: Iterator[a]): List[a]
it
-
the iterator to convert
it.next
final def fromArray[a](arr: Array[a]): List[a]
arr
-
the array to convert
arr
in the same order
final def fromArray[a](arr: Array[a], start: Int, len: Int): List[a]
arr
-
the array to convert
start
-
the first index to consider
len
-
the lenght of the range to convert
arr
in the same order
final def fromString(str: String, separator: Char): List[String]
str
-
the string to parse
separator
-
the separator character
final def fromString(str: String): List[Char]
str
-
the string to convert.
final def toString(xs: List[Char]): String
xs
-
the list to convert.
def toString(): String
final def map2[a,b,c](xs: List[a], ys: List[b])(f: (a,b) => c): List[c]
f
to
corresponding elements of the argument lists.
f
-
function to apply to each pair of elements.
[f(a0,b0), ..., f(an,bn)]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
and
n = min(k,l)
final def mapConserve[a<:Object](xs: List[a])(f: (a) => a): List[a]
final def map3[a,b,c,d](xs: List[a], ys: List[b], zs: List[c])(f: (a,b,c) => d): List[d]
f
to
corresponding elements of the argument lists.
f
-
function to apply to each pair of elements.
[f(a0,b0,c0), ..., f(an,bn,cn)]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
, [c0, ..., cm]
and
n = min(k,l,m)
final def forall2[a,b](xs: List[a], ys: List[b])(f: (a,b) => Boolean): Boolean
p
holds
for all corresponding elements of the argument lists.
p
-
function to apply to each pair of elements.
n == 0 || (p(a0,b0) && ... && p(an,bn))]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
and
m = min(k,l)
final def exists2[a,b](xs: List[a], ys: List[b])(f: (a,b) => Boolean): Boolean
p
holds
for some corresponding elements of the argument lists.
p
-
function to apply to each pair of elements.
n != 0 && (p(a0,b0) || ... || p(an,bn))]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
and
m = min(k,l)
final def transpose[a](xss: List[List[a]]): List[List[a]]
final def list2ordered[a](view: (a) => Ordered[a])(x: List[a]): Ordered[List[a]]
final def view[a](view: (a) => Ordered[a])(x: List[a]): Ordered[List[a]]
|
Scala
1.4.0.3 |
|||