Skip to content

Add nonthrowing scalar flatMapLatest and lazy Just factories - #68

Merged
twittemb merged 1 commit into
mainfrom
codex/add-nonthrowing-flatmaplatest
Oct 3, 2026
Merged

twittemb merged 1 commit into
mainfrom
codex/add-nonthrowing-flatmaplatest

Conversation

@twittemb

@twittemb twittemb commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Nonthrowing asynchronous scalar flatMapLatest transformations previously selected the throwing overload, requiring unnecessary try/catch and preventing callers from treating Result.failure as a continuing stream of values. Adds a nonthrowing scalar overload and a lazy AsyncJustSequence(factory:) initializer.

The factory runs once per independent iterator and releases its pending source when consumed. Cancellation skips an unstarted factory and discards a late result. Sequence-returning transformations continue selecting the flattening overload, including without an expected return type; a throwing upstream still propagates its error.

Validation: reproduced the missing nonthrowing API as compile failures before implementation; all 183 tests pass on Swift 6.4/macOS. Regressions cover lazy factories, cancellation before/during a factory, latest-input cancellation with a noncooperative transformation, continuing Result values, optional outputs, overload selection, upstream errors, and #35's object lifetime.

Fixes #45.

@twittemb
twittemb force-pushed the codex/add-nonthrowing-flatmaplatest branch from 4f14a21 to ed7ebea Compare October 3, 2026 11:45
@twittemb
twittemb changed the base branch from codex/fix-flatmaplatest-retention to main October 3, 2026 11:45
@twittemb
twittemb merged commit fa1fd42 into main Oct 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Non-throwing flatMapLatest

1 participant