From 2b1a01144464e31b3a329d8677d8970fbfa6deac Mon Sep 17 00:00:00 2001 From: Andrej Rypo Date: Tue, 13 Aug 2024 10:48:10 +0200 Subject: [PATCH] wording --- composer.json | 2 +- readme.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 15929d0..3badfc7 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "dakujem/toru", - "description": "Iterable collections with ease. Lodash-style fluent wrapper, iteration primitives, aggregates, utilities.", + "description": "Iterable collections with ease. Lodash-style fluent call chaining, iteration primitives, aggregates, utilities.", "keywords": [ "iterator", "dash", diff --git a/readme.md b/readme.md index d3fca76..5b38c3f 100644 --- a/readme.md +++ b/readme.md @@ -16,7 +16,7 @@ Toru provides a few common **iteration primitives** (e.g. `map`, `filter`, `tap` **aggregates** (e.g. `reduce`, `search`, `count`) and utility functions (e.g. `chain`) implemented using generators. -Also implements **Lodash-style fluent wrapper** to simplify composition of various transformations on iterable collections. +Also implements **Lodash-style fluent call chaining** to simplify composition of various transformations on iterable collections. The aim of Toru is to provide simple tools to work with the native `iterable` type*. Leveraging generators, Toru enables memory-efficient operations on large datasets. @@ -32,7 +32,7 @@ Use Toru when: - unable to use `foreach` - working with large datasets - running out of memory when transforming large collections (using arrays) -- wanting to compose collection transformations neatly in fluent Lodash-like style +- wanting to compose collection transformations neatly in fluent call chain, Lodash-style - in need of lazy evaluation (on-demand, per-element) > @@ -1000,7 +1000,7 @@ by using a single class import instead of multiple function imports and by reordering the parameters so that the input collection is consistently the first one. Still, composing multiple operations into one transformation is cumbersome, so the `IteraFn` factory was implemented to fix that. It worked well, but was still verbose for mundane tasks. -To allow concise Lodash-style chained calls, the `Dash` class was designed. +To allow concise fluent/chained calls (like with Lodash), the `Dash` class was designed. With it, it's possible to compose transformations neatly. @@ -1081,7 +1081,7 @@ $array = Pipeline::through( IteraFn::toArray(), ); -// Lodash-style fluent notation. +// Lodash-style fluent call chaining. $array = Dash::collect($sequence) ->filter(fn($i) => 0 == $i % 2) ->reindex(fn($i) => $i)