interface
Basic Interface classes.
- class tinychain.interface.Compare[source]
Bases:
Equality- eq(other)
Returns True if self is equal to other.
- ne(other)
Returns True if self is not equal to other.
- class tinychain.interface.Functional[source]
Bases:
Interface- filter(op)[source]
Filter the elements of this
Functionalusing the given op.
- fold(item_name, initial_state, op)[source]
Run the given op for each item in this
Functionalalong with the previous result.op must be a POST Op. The item to handle will be passed with the given item_name as its name.
- for_each(op)[source]
Run the given op for each element in this
Functional, then return the last result.This is useful when you need to execute an op for its side-effects and not its return value.
- map(op)[source]
Return a new
Functionalwith the results of op for each element of thisFunctional.