Bases: object
Only for ‘is’ comparison to simplify arity testing. This is because None is a legal argument differing from ‘Not supplied.’
Bases: object
Only for ‘isinstance’ comparison to signal early termination of reduce.
Appender used by into. Will work with lists, deques, or anything with an appender.
Cat transducers (will cat items from nested lists, e.g.).
Compose functions using reduce on splat.
compose(f, g) reads ‘f composed with g’, or f(g(x))
Note: order of inner function application with transducers is inverted from the composition of the transducers.
Removes duplicatees that occur in order. Accepts first inputs through and drops subsequent duplicates.
Return a generator with transform applied. Not implemented.
Transduces items from coll into target. :TODO: Write improved dispatch for collections?
Keep values where f does not return None. f for keep indexed is a function that takes both index and value as inputs.
Transducer version of map, returns f(item) with each reduction step.
Mapcat transducer - maps to a collection then cats item into one less level of nesting.
Split inputs into lists by starting a new list each time the predicate passed in evaluates to a different condition (true/false) than what holds for the present list.
Has prob probability of returning each input it receives.
For loop impl of reduce in Python that honors sentinal wrapper Reduced and uses it to signal early termination.
Takes while a condition is true. Note that take_while will take the first input that tests false, so be mindful of mutable input sources.