Skip to content

feat: add Seq.try_find_index - #276

Merged
dbrattli merged 1 commit into
dbrattli:mainfrom
bhargavandhe:feat/seq-try-find-index
Aug 18, 2026
Merged

feat: add Seq.try_find_index#276
dbrattli merged 1 commit into
dbrattli:mainfrom
bhargavandhe:feat/seq-try-find-index

Conversation

@bhargavandhe

Copy link
Copy Markdown
Contributor

Summary

  • add F#-compatible Seq.try_find_index for zero-based first-match lookup
  • support both pipeline and fluent APIs
  • stop evaluating immediately after the first match
  • preserve Some(0) as distinct from Nothing

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_find_index (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:14

@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. Thank you!

@dbrattli
dbrattli merged commit d0bcfbe into dbrattli:main Aug 18, 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