| Files | Last commit | Last update |
|---|---|---|
feat: Implement Plan 051 Phase 4 - Terminal Operators Implement reduce, count, and for_each terminal operators for iterators. Changes: - Implement reduce for ListIter with accumulation function support - Implement count for ListIter with element counting - Implement for_each for ListIter with function callbacks - Add test case 121_terminal_operators Terminal operators consume iterators to produce results: - reduce(init, f): Fold elements using binary operation - count(): Return number of elements - for_each(f): Call function for each element Note: Current implementation uses nil checks instead of pattern matching. Full match support planned (Plan 018). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> | 9 months ago | |
feat: Implement Plan 051 Phase 4 - Terminal Operators Implement reduce, count, and for_each terminal operators for iterators. Changes: - Implement reduce for ListIter with accumulation function support - Implement count for ListIter with element counting - Implement for_each for ListIter with function callbacks - Add test case 121_terminal_operators Terminal operators consume iterators to produce results: - reduce(init, f): Fold elements using binary operation - count(): Return number of elements - for_each(f): Call function for each element Note: Current implementation uses nil checks instead of pattern matching. Full match support planned (Plan 018). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> | 9 months ago | |
Complete Plan 051: Auto Flow iterator system (Phases 5-8) Implement iterator and functional programming system with lazy evaluation and eager collection via bang operator. Phase 5 - Bang Operator: - Add postfix ! operator for eager collection - Parser transforms expr! to expr.collect() - Add PREC_POSTFIX constant (precedence level 17) - Implement collect() for ListIter Phase 6 - Extended Adapters: - limit(n) - limit to first n elements (renamed from take) - skip(n) - skip first n elements - enumerate() - add indices to elements - zip(iter) - combine two iterators - chain(iter) - concatenate iterators Phase 7 - Predicate Operators: - any(predicate) - check if any element satisfies predicate - all(predicate) - check if all elements satisfy predicate - find(predicate) - find first matching element - All with short-circuit evaluation Phase 8 - Collect & To Operators: - Enhanced collect() with spec integration - Add Collect<T> spec for polymorphic collection - Comprehensive testing for all collect scenarios Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> | 9 months ago | |
feat: Implement Plan 051 Phase 4 - Terminal Operators Implement reduce, count, and for_each terminal operators for iterators. Changes: - Implement reduce for ListIter with accumulation function support - Implement count for ListIter with element counting - Implement for_each for ListIter with function callbacks - Add test case 121_terminal_operators Terminal operators consume iterators to produce results: - reduce(init, f): Fold elements using binary operation - count(): Return number of elements - for_each(f): Call function for each element Note: Current implementation uses nil checks instead of pattern matching. Full match support planned (Plan 018). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> | 9 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 9 months ago | ||
| 9 months ago | ||
| 9 months ago | ||
| 9 months ago |