Repository navigation
FP Mojo 1.0.1 adds method chaining to fp.iteration for writing lazy transformations from left to right.
- Start a chain with
iterated(source). Chainmap,filter,filter_map,flat_map,flattenandscan_left, then finish with a fold, reduction, search or collection. - Collect explicitly into a list.
.to_list()and.collect_list()are aliases for the same consuming operation. Existing free functions remain available. - Use standard-library adapters directly. The new
Iterwrapper implements nativeIteratorandIterableOwned, so operations such asenumerate(iterated(values^))work under their native type and ownership requirements. Wrap a standard adapter withiterated(...)to resume method chaining. - Keep native ownership and error semantics. Chains preserve iterator position, borrowed origins, move-only values and captured callback state. Raising terminals preserve their declared error types; lazy callbacks remain non-raising. The wrapper delegates to the existing iteration implementations and adds no buffering or allocation.
- Expanded documentation. Updated the iteration tutorial, architecture guide and executable examples; added algebra and Reader, State and Writer tutorials; revised the README and documentation site.
Validation includes 200 passing suite tests, 294 expected compile-time rejections, 128 documentation example runs and 28 tooling tests. Source and precompiled package builds and strict documentation checks passed.
See the iteration tutorial and full changelog.