Skip to content

Commit e53adc0

Browse files
committed
docs: enhance changelog with heterogeneous tuple support and common patterns documentation
1 parent a69fa71 commit e53adc0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/changelog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1212
- **`all` combinator for `Maybe`, `Result`, and `Either`**: Combines an array of monads into a single monad containing an array of values.
1313
- `Maybe`: Returns `Just` with all values if all are `Just`, or `Nothing` if any is `Nothing`.
1414
- `Result`/`Either`: Collects **all** errors if any fail.
15+
- **Heterogeneous tuple support**: Preserves different types in arrays using advanced TypeScript type inference.
1516
- Example:
1617
```ts
1718
all([just(1), just(2), just(3)]).unwrapOr([]); // [1, 2, 3]
1819
all([ok(1), err('e1'), err('e2')]); // Err(['e1', 'e2'])
20+
all([just(42), just("hello"), just(true)]); // Just<[number, string, boolean]>
1921
```
2022

2123
- **`sequence` combinator for `Result` and `Either`**: Combines an array of monads with fail-fast behavior.
2224
- Stops at the **first** error instead of collecting all errors.
2325
- Returns single error type instead of array.
26+
- **Heterogeneous tuple support**: Preserves different types in arrays.
2427
- Example:
2528
```ts
2629
sequence([ok(1), err('e1'), err('e2')]); // Err('e1') - stops at first!
@@ -29,12 +32,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2932
- **`partition` function for `Result` and `Either`**: Separates an array of monads into successes and failures.
3033
- Returns a plain object with two arrays (not a monad).
3134
- Always processes all items.
35+
- **Heterogeneous tuple support**: Preserves different types in returned arrays.
3236
- Example:
3337
```ts
3438
partition([ok(1), err('e1'), ok(2), err('e2')]);
3539
// { oks: [1, 2], errs: ['e1', 'e2'] }
3640
```
3741

42+
- **Common Patterns documentation**: Added comprehensive documentation section with practical recipes for:
43+
- Validation pipelines with multiple checks
44+
- Form validation with error collection
45+
- Concurrent operations handling
46+
- Async error handling patterns
47+
- Data transformation pipelines
48+
3849
---
3950

4051
## [[1.1.0]](https://github.com/richecr/holo-fn/releases/tag/v1.1.0) - 2025-11-30

0 commit comments

Comments
 (0)