JonasMuehlmann / goaoi

Conventient algorithms for processing iterables, inspired by the algorithm header from the C++ standard template library (STL for short).
4 stars 0 forks source link

Implement iterator adapters and generators #10

Open JonasMuehlmann opened 2 years ago

JonasMuehlmann commented 2 years ago

USE TDD Adapt other standard library io interfaces.

Iterator adapter:

JonasMuehlmann commented 2 years ago

Iterators with intermediate backing containers (e.g. CopyIfIterator()) should probably be implemented as []T or []Tuple[TKey, TValue] no matter the container they are created from.

JonasMuehlmann commented 1 year ago

Could iterators implement e.g. is_reversible() and to_reverse() functions to solve the problem of only allowing the base iterator type as arguments? In that case, the base iterator could be casted up to the type the concrete iterator is declared as.