generic
- class tinychain.generic.Map(*args, **kwargs)[source]
Bases:
State,Generic[T]A key-value map whose keys are
Ids and whose values are :class: State s.
- class tinychain.generic.Tuple(form)[source]
Bases:
State,Functional,Generic[T]A tuple of
States.- eq(other)[source]
Return a
Boolindicating whether all elements in thisTupleequal those in the given other.
- ne(other)[source]
Return a
Boolindicating whether the elements in thisTupledo not equal those in other.This is implemented as self.eq(other).logical_not().
- classmethod range(range)[source]
Construct a new
TupleofNumbers in the given range.range can be a positive
Number, (start, stop), or (start, stop, step)
- class tinychain.generic.TupleRef(state, name)[source]
Bases:
StateRefA named reference to a
Tuple.
- tinychain.generic.autobox(state)[source]
Given a Python literal, box it in the appropriate type of State.
For example, autobox(1) will return Int(1), autobox({‘a’: 3.14}) will return a Map[Float], etc.