Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
filter <K > (bool fn (K elem ) )
→ List <K > Function(List <K > list )
Returns a new list in which fn(every element on list) returns true
Call like FP.filter<K>(fn)(list)
map <K , V > (V fn (K elem ) )
→ List <V > Function(List <K > list )
Returns a new list where each element of list is transformed by fn. If V is nullable,
and fn returns null, null will be added to the list. Otherwise, use return null to skip these elements.
Call like FP.map<K,V>(fn)(list)
onEvery <K > (void fn (K elem ) )
→ void Function(List <K > list )
Runs fn on every element of list. Call like FP.onEvery<K>(fn)(list)
reduce <K , V > (V fn (V acc , K elem ), V acc )
→ V Function(List <K > list )
Reduces acc by calling fn on every element of list. fn should modify acc and then return it.
Call like FP.reduce<K,V>(fn, acc)(list)