Document that Last panics on empty slices with a clear error message.
Add examples for single element and empty slice cases.
Related to Issue 13 (PR #41)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive documentation for all new functions:
- TakeWhile: take elements while predicate is true
- DropWhile: drop elements while predicate is true
- Scan: running accumulator (prefix scan)
- First/FirstN: get first element(s) safely
- Init: all but last element
- Intersperse: insert separator between elements
- Sliding: sliding window views
- FoldRight: right-to-left fold/reduce
- Tap: side effects without mutation
- Transpose: flip matrix rows/columns
- Unzip: split tuples into separate slices
- ParallelReduce: parallel reduction (experimental)
- Replicate: create n copies of a value
Each doc includes:
- Clear description
- Code examples with output
- Common use cases
- Edge case handling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add `ParallelFilter` for concurrent filtering with context and error
support.
Add `UniqueInPlace` to remove duplicates from slices in place. Update
README
and add documentation and tests for both functions.
- Add `Chunk` to split slices into groups of size n.
- Add `ContainsBy` for predicate-based containment checks.
- Add `UniqueBy` to deduplicate slices by key selector.
- Add `ParallelMap` for concurrent mapping with context and error
handling.
- Add `maps.Keys` and `maps.Values` helpers for extracting map
keys/values.
- Update README and docs for new features.
- Refactor `Contains` to use `slices.Contains`.