Skip to content

feat: add Seq.try_pick - #277

Merged
dbrattli merged 1 commit into
dbrattli:mainfrom
bhargavandhe:feat/seq-try-pick
Aug 19, 2026
Merged

feat: add Seq.try_pick#277
dbrattli merged 1 commit into
dbrattli:mainfrom
bhargavandhe:feat/seq-try-pick

Conversation

@bhargavandhe

Copy link
Copy Markdown
Contributor

Summary

  • add F#-compatible Seq.try_pick for transformed first-match lookup
  • support both pipeline and fluent APIs
  • stop evaluating immediately after the chooser returns Some
  • preserve Some(None) by returning the chooser's original Option

This is a focused contribution toward #82 and intentionally does not add the other sequence operations tracked there.

Verification

  • uv run pytest tests/test_seq.py -k try_pick (6 passed)
  • uv run pytest (502 passed)
  • uv run pre-commit run --all-files --show-diff-on-failure
  • uv build

@bhargavandhe
bhargavandhe marked this pull request as ready for review August 18, 2026 17:27

@dbrattli dbrattli left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for adding

@dbrattli
dbrattli merged commit ff042cd into dbrattli:main Aug 19, 2026
6 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.

2 participants