FpdartOnIterable<T> extension
Get the first element of the Iterable.
If the Iterable is empty, return None.
Functional programming functions on a mutable dart Iterable using fpdart.
- on
-
- Iterable<
T>
- Iterable<
Properties
-
firstOption
→ Option<
T> -
Available on Iterable<
Get the first element of the Iterable. If the Iterable is empty, return None.T> , provided by the FpdartOnIterable extensionno setter -
head
→ Option<
T> -
Available on Iterable<
Get the first element of the Iterable. If the Iterable is empty, return None.T> , provided by the FpdartOnIterable extensionno setter -
init
→ Option<
Iterable< T> > -
Available on Iterable<
Return all the elements of a Iterable except the last one. If the Iterable is empty, return None.T> , provided by the FpdartOnIterable extensionno setter -
lastOption
→ Option<
T> -
Available on Iterable<
Get the last element of the Iterable. If the Iterable is empty, return None.T> , provided by the FpdartOnIterable extensionno setter -
singleOption
→ Option<
T> -
Available on Iterable<
Optional version of singleOrNull.T> , provided by the FpdartOnIterable extensionno setter -
tail
→ Option<
Iterable< T> > -
Available on Iterable<
Return all the elements of a Iterable except the first one. If the Iterable is empty, return None.T> , provided by the FpdartOnIterable extensionno setter
Methods
-
all(
bool test(T t)) → bool -
Available on Iterable<
Checks whether every element of this Iterable satisfiesT> , provided by the FpdartOnIterable extensiontest. -
ap<
B> (Iterable< B Function(T)> iterable) → Iterable<B> -
Available on Iterable<
Apply all the functions insideT> , provided by the FpdartOnIterable extensioniterableto this Iterable. -
append(
T element) → Iterable< T> -
Available on Iterable<
InsertT> , provided by the FpdartOnIterable extensionelementat the end of the Iterable. -
breakI(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is longest prefix (possibly empty) of this Iterable with elements that do not satisfyT> , provided by the FpdartOnIterable extensiontestand second element is the remainder of the Iterable. -
concat(
Iterable< T> other) → Iterable<T> -
Available on Iterable<
Creates the lazy concatenation of this Iterable andT> , provided by the FpdartOnIterable extensionother. -
delete(
T element) → Iterable< T> -
Available on Iterable<
Remove the first occurrence ofT> , provided by the FpdartOnIterable extensionelementfrom this Iterable. -
difference(
Eq< T> eq, Iterable<T> other) → Iterable<T> -
Available on Iterable<
Return an Iterable containing the values of this Iterable not included inT> , provided by the FpdartOnIterable extensionotherbased oneq. -
drop(
int n) → Iterable< T> -
Available on Iterable<
Return the suffix of this Iterable after the firstT> , provided by the FpdartOnIterable extensionnelements. -
dropRight(
[int count = 1]) → Iterable< T> -
Available on Iterable<
Drops the lastT> , provided by the FpdartOnIterable extensioncountelement of this iterable. -
dropWhileLeft(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Remove all elements starting from the first as long asT> , provided by the FpdartOnIterable extensiontestreturnstrue. -
elem(
T element) → bool -
Available on Iterable<
Check ifT> , provided by the FpdartOnIterable extensionelementis contained inside this Iterable. -
elementAtOption(
int index) → Option< T> -
Available on Iterable<
Optional version of elementAt.T> , provided by the FpdartOnIterable extension -
filter(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Returns the list of those elements that satisfyT> , provided by the FpdartOnIterable extensiontest. -
filterWithIndex(
bool test(T t, int index)) → Iterable< T> -
Available on Iterable<
Returns the list of those elements that satisfyT> , provided by the FpdartOnIterable extensiontest. -
flatMap<
B> (Iterable< B> toElements(T t)) → Iterable<B> -
Available on Iterable<
For each element of the Iterable apply functionT> , provided by the FpdartOnIterable extensiontoElementsand flat the result. -
flatMapWithIndex<
B> (Iterable< B> toElements(T t, int index)) → Iterable<B> -
Available on Iterable<
Same asT> , provided by the FpdartOnIterable extensionflatMap(extend) but provides also theindexof each mapped element in the mapping function (toElements). -
foldLeft<
B> (B initialValue, B combine(B b, T t)) → B -
Available on Iterable<
Fold this Iterable into a single value by aggregating each element of the list from the first to the last.T> , provided by the FpdartOnIterable extension -
foldLeftWithIndex<
B> (B initialValue, B combine(B previousValue, T element, int index)) → B -
Available on Iterable<
Same asT> , provided by the FpdartOnIterable extensionfoldLeft(fold) but provides also theindexof each mapped element in thecombinefunction. -
insertBy(
Order< T> order, T element) → Iterable<T> -
Available on Iterable<
InsertT> , provided by the FpdartOnIterable extensionelementinto the list at the first position where it is less than or equal to the next element based onorder(Order). -
insertWith<
A> (A extract(T instance), Order< A> order, T element) → Iterable<T> -
Available on Iterable<
InsertT> , provided by the FpdartOnIterable extensionelementinto the Iterable at the first position where it is less than or equal to the next element based onorder(Order). -
intersect(
Iterable< T> iterable) → Iterable<T> -
Available on Iterable<
Return the intersection of two Iterable (all the elements that both Iterable have in common).T> , provided by the FpdartOnIterable extension -
intersperse(
T middle) → Iterable< T> -
Available on Iterable<
Return an Iterable placing anT> , provided by the FpdartOnIterable extensionmiddlein between elements of the this Iterable. -
lastWhereOption(
bool test(T element)) → Option< T> -
Available on Iterable<
Optional version ofT> , provided by the FpdartOnIterable extensionlastWhereOrNull. -
lookupEq(
Eq< T> eq, T element) → Option<T> -
Available on Iterable<
Get first element equal toT> , provided by the FpdartOnIterable extensionelementin this Iterable. -
mapWithIndex<
B> (B toElement(T t, int index)) → Iterable< B> -
Available on Iterable<
Same asT> , provided by the FpdartOnIterable extensionmapbut provides also theindexof each mapped element in the mapping function (toElement). -
maximumBy(
Order< T> order) → Option<T> -
Available on Iterable<
The largest element of this Iterable based onT> , provided by the FpdartOnIterable extensionorder. -
minimumBy(
Order< T> order) → Option<T> -
Available on Iterable<
The least element of this Iterable based onT> , provided by the FpdartOnIterable extensionorder. -
notElem(
T element) → bool -
Available on Iterable<
Check ifT> , provided by the FpdartOnIterable extensionelementis not contained inside this Iterable. -
partition(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record containing the values of this Iterable for whichT> , provided by the FpdartOnIterable extensiontestisfalsein the first element, and the values for which it istruein the second element. -
prepend(
T element) → Iterable< T> -
Available on Iterable<
InsertT> , provided by the FpdartOnIterable extensionelementat the beginning of the Iterable. -
prependAll(
Iterable< T> other) → Iterable<T> -
Available on Iterable<
Insert all the elements insideT> , provided by the FpdartOnIterable extensionotherat the beginning of the Iterable. -
singleWhereOption(
bool test(T element)) → Option< T> -
Available on Iterable<
Optional version ofT> , provided by the FpdartOnIterable extensionsingleWhereOrNull. -
sortBy(
Order< T> order) → List<T> -
Available on Iterable<
Sort this List based onT> , provided by the FpdartOnIterable extensionorder(Order). -
sortWith<
A> (A extract(T t), Order< A> order) → List<T> -
Available on Iterable<
Sort this Iterable based onT> , provided by the FpdartOnIterable extensionorderof an object of typeAextracted fromTusingextract. -
sortWithDate(
DateTime getDate(T instance)) → List< T> -
Available on Iterable<
Sort this Iterable based on DateTime extracted from typeT> , provided by the FpdartOnIterable extensionTusinggetDate. -
span(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is longest prefix (possibly empty) of this Iterable with elements that satisfyT> , provided by the FpdartOnIterable extensiontestand second element is the remainder of the Iterable. -
splitAt(
int n) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is an Iterable with the firstT> , provided by the FpdartOnIterable extensionnelements of this Iterable, and the second element contains the rest of the Iterable. -
takeWhileLeft(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Extract all elements starting from the first as long asT> , provided by the FpdartOnIterable extensiontestreturnstrue. -
zip<
B> (Iterable< B> iterable) → Iterable<(T, B)> -
Available on Iterable<
T> , provided by the FpdartOnIterable extensionzipis used to join elements at the same index from two different Iterable into one Iterable of a record. -
zipWith<
B, C> (C combine(T t, B b), Iterable< B> iterable) → Iterable<C> -
Available on Iterable<
Join elements at the same index from two different Iterable into one Iterable containing the result of callingT> , provided by the FpdartOnIterable extensioncombineon each element pair.