Skip to content

Commit

Permalink
docs(readme): minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan7237d committed Feb 10, 2021
1 parent 46ac1ff commit bb58d13
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,24 +161,11 @@ How-to:
```ts
applyPipe(
[1, 2, 3, 2],
scanIterable((...[, value]) => (value <= 2 ? value : undefined)),
scanIterable((_, value) => (value <= 2 ? value : undefined)),
);
```

(yields `1`, `2`, see [`scanIterable`](https://github.com/ivan7237d/antiutils/blob/master/src/internal/iterable/scanIterable.ts) and _[Reducers](#reducers)_).

- **Also yield the value that broke the condition:**

```ts
applyPipe(
[1, 2, 3, 2],
scanIterable((accumulator, value) =>
accumulator <= 2 ? value : undefined,
),
);
```

(yields `1`, `2`, `3`).
(yields `1`, `2`, see _[Reducers](#reducers)_ and [`scanIterable`](https://github.com/ivan7237d/antiutils/blob/master/src/internal/iterable/scanIterable.ts)).

## Comparison functions

Expand Down

0 comments on commit bb58d13

Please sign in to comment.