list
library
Classes
ImmutableList <T >
A list that cannot be modified after it's created.
Constants
reduceLeft
→ const B Function(ImmutableList <T > ) Function(B (B , T ) ) Function<T , B >(B empty )
An alias for the foldLeft function.
reduceRight
→ const B Function(ImmutableList <T > ) Function(B (B , T ) ) Function<T , B >(B empty )
An alias for the foldRight function.
Functions
ap <A , B > (ImmutableList <B Function(A ) > fns )
→ ImmutableList <B > Function(ImmutableList <A > )
Applies a list of functions from fns to each item in the ImmutableList .
append <T > (T item )
→ ImmutableList <T > Function(ImmutableList <T > )
Returns a function that appends item to the end of an ImmutableList .
compact <A > (ImmutableList <Option <A > > listOfOptions )
→ ImmutableList <A >
Compacts a list by filtering out None values and extracting values from Some options.
concat <T > (ImmutableList <T > first )
→ ImmutableList <T > Function(ImmutableList <T > )
Concatenates two ImmutableList instances.
copy <T > (ImmutableList <T > list )
→ ImmutableList <T >
Creates a copy of the given list.
difference <A > (Eq <A > eq )
→ ImmutableList <A > Function(ImmutableList <A > ) Function(ImmutableList <A > )
Computes the difference between two ImmutableList s.
dropLeft <T > (int count )
→ ImmutableList <T > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and returns a new
ImmutableList<T> with the first count elements removed.
dropRight <T > (int count )
→ ImmutableList <T > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and returns a new
ImmutableList<T> with the last count elements removed.
every <T > (ImmutableList <T > list , bool predicate (T ) )
→ bool
Checks if all the items in the provided ImmutableList satisfy the given predicate.
filter <T > (bool pred (T ) )
→ ImmutableList <T > Function(ImmutableList <T > )
Filters the elements of an ImmutableList based on a predicate.
findFirst <T > (ImmutableList <T > list )
→ Option <T > Function(Predicate <T > predicate )
Returns a function that searches for the first element in the
given list that satisfies the provided Predicate .
findIndex <T > (Predicate <T > predicate )
→ Option <int > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and searches
for the index of the first element that satisfies the given predicate.
findLast <T > (ImmutableList <T > list )
→ Option <T > Function(Predicate <T > predicate )
Returns a function that searches for the last element in the
given list that satisfies the provided Predicate .
flatMap <A , B > (ImmutableList <B > f (A ) )
→ ImmutableList <B > Function(ImmutableList <A > )
Returns a function that takes an ImmutableList<A> and maps each item
in the list using the provided function f to produce a new ImmutableList<B>.
flatten <T > (ImmutableList <ImmutableList <T > > nestedList )
→ ImmutableList <T >
Flattens a nested ImmutableList into a single-dimensional ImmutableList .
foldLeft <T , B > (B empty )
→ B Function(ImmutableList <T > ) Function(B (B , T ) )
Folds a list from the left with a binary operation.
foldRight <T , B > (B empty )
→ B Function(ImmutableList <T > ) Function(B (B , T ) )
Folds a list from the right with a binary operation.
group <A > (Eq <A > eq )
→ List <ImmutableList <A > > Function(ImmutableList <A > )
Groups consecutive duplicate items in an ImmutableList using the eq comparator.
groupBy <A , K > (K keyFunc (A ) )
→ Map <K , ImmutableList <A > > Function(ImmutableList <A > )
Groups items in an ImmutableList by a key produced by the keyFunc function.
intersection <A > (Eq <A > eq )
→ ImmutableList <A > Function(ImmutableList <A > ) Function(ImmutableList <A > )
Returns a function that computes the intersection between two ImmutableLists.
isOutOfBounds <T > (int index , ImmutableList <T > list )
→ bool
Checks if the given index is out of bounds for the provided list.
isSubset <T > (Eq <T > eq )
→ bool Function(ImmutableList <T > subsetCandidate ) Function(ImmutableList <T > set )
Determines if one ImmutableList is a subset of another ImmutableList using a curried function.
isSuperset <T > (Eq <T > eq )
→ bool Function(ImmutableList <T > set ) Function(ImmutableList <T > supersetCandidate )
Determines whether one list is a superset of another list.
map <A , B > (B f (A ) )
→ ImmutableList <B > Function(ImmutableList <A > )
Returns a function that takes an ImmutableList<A> and maps each item
in the list using the provided function f to produce a new ImmutableList<B>.
modifyAt <T > (int index , T modify (T ) )
→ Option <ImmutableList <T > > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and modifies a specified item at the given index
using the provided modify function.
of <T > (Iterable <T > items )
→ ImmutableList <T >
Creates an ImmutableList from the provided iterable items.
prepend <T > (T item )
→ ImmutableList <T > Function(ImmutableList <T > )
Returns a function that prepends item to the beginning of an ImmutableList .
reverse <A > (ImmutableList <A > list )
→ ImmutableList <A >
Reverses the order of items in an ImmutableList .
scanLeft <T , B > (B initial )
→ ImmutableList <B > Function(ImmutableList <T > ) Function(B combine (B , T ) )
Scans a list from the left, producing a new list with intermediate results.
scanRight <T , B > (B initial )
→ ImmutableList <B > Function(ImmutableList <T > ) Function(B combine (B , T ) )
Scans a list from the right, producing a new list with intermediate results.
separate <A , B > (ImmutableList <Either <A , B > > eithers )
→ ({ImmutableList <A > lefts , ImmutableList <B > rights } )
Separates a list of either.Either values into two lists: one containing all the either.Left values and the other containing all the either.Right values.
similar <T > (Eq <T > eq )
→ double Function(ImmutableList <T > ) Function(ImmutableList <T > )
Determines how similar two lists are based on the Jaccard Index.
size <T > (ImmutableList <T > list )
→ int
Returns the size of the ImmutableList .
symmetricDifference <A > (Eq <A > eq )
→ ImmutableList <A > Function(ImmutableList <A > ) Function(ImmutableList <A > )
Returns a function that computes the symmetric difference between two ImmutableLists.
takeLeft <T > (int n )
→ ImmutableList <T > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and returns
a new ImmutableList<T> containing only the first n elements.
takeLeftWhile <T > (Predicate <T > predicate )
→ ImmutableList <T > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and returns a new
ImmutableList<T> containing elements from the start of the list
as long as they satisfy the given predicate.
takeRight <T > (int n )
→ ImmutableList <T > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and returns
a new ImmutableList<T> containing only the last n elements.
takeRightWhile <T > (Predicate <T > predicate )
→ ImmutableList <T > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and returns a new
ImmutableList<T> containing elements from the end of the list as long
as they satisfy the given predicate.
union <A > (Eq <A > eq )
→ ImmutableList <A > Function(ImmutableList <A > ) Function(ImmutableList <A > )
Returns a function that combines two ImmutableList s into a single list without duplicates.
unique <A > (Eq <A > eq )
→ ImmutableList <A > Function(ImmutableList <A > )
Creates an ImmutableList by filtering out duplicate items using the eq comparator.
updateAt <T > (int index , T value )
→ Option <ImmutableList <T > > Function(ImmutableList <T > )
Returns a function that takes an ImmutableList<T> and updates a specified item
at the given index with a new value.
zero <T > ()
→ ImmutableList <T >
Returns an empty ImmutableList of the specified type.