Skip to content

Commit 15be52c

Browse files
authored
Update README.md (#161)
1 parent 143740d commit 15be52c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,27 @@
44
[![Coverage Status](https://coveralls.io/repos/github/sanmai/pipeline/badge.svg?branch=main)](https://coveralls.io/github/sanmai/pipeline?branch=main)
55
[![Type Coverage](https://shepherd.dev/github/sanmai/pipeline/coverage.svg)](https://shepherd.dev/github/sanmai/pipeline)
66

7-
Pipeline is a PHP library that brings the power of streaming pipelines to your code. Inspired by the pipe operator (`|>`), common in functional programming languages, Pipeline lets you chain together a series of operations on your data in a clear, concise, and readable way. This approach not only simplifies complex data transformations but also makes your code more maintainable and easier to test.
7+
Pipeline is a PHP library that brings the power of streaming pipelines to your code. Inspired by the pipe operator (`|>`), typical in functional programming languages, Pipeline lets you chain a series of operations on your data concisely, clearly, and readably. This approach simplifies complex data transformations and makes your code more maintainable and easier to test.
88

9-
Pipeline makes dealing with `iterable` types as easy as it can be, making it a perfect tool for bespoke data processing pipelines, hence the name. If you ever piped together several bash commands where one command uses output of another in succession, this library does just that but for PHP functions, generators, arrays, and iterators.
9+
The pipeline uses lazy evaluation to optimize performance, especially for large datasets. This means operations are not executed immediately but deferred until the final result is needed. The pipeline is built as a chain of generator functions, processing data iteratively without loading the entire dataset into memory.
1010

11-
Pipeline comes with the most important yet basic building blocks. It boasts methods to map, filter, reduce, zip, and unpack data from arbitrary generators and from all kinds of standard iterators.
11+
This means the actual computation is deferred until the final result is needed. This approach offers the benefits of reduced memory usage, making it suitable for handling massive datasets, improved performance by avoiding unnecessary computations, and efficiency for large datasets or even infinite sequences. For example, if you have an array with a million numbers and want to find the first five even numbers multiplied by 2, thanks to the lazy evaluation, it will only process the first few necessary numbers.
12+
13+
The pipeline makes dealing with `iterable` types as easy as possible, making it a perfect tool for bespoke data processing pipelines, hence the name. If you ever piped together several bash commands where one command uses the output of another in succession, this library does just that for PHP functions, generators, arrays, and iterators.
14+
15+
The pipeline has the most essential yet basic building blocks. It boasts methods to map, filter, reduce, zip, and unpack data from arbitrary generators and all kinds of standard iterators.
1216

1317
This rigorously tested library just works. Pipeline neither defines nor throws any exceptions.
1418

1519
# Install
1620

17-
composer require sanmai/pipeline
21+
```
22+
composer require sanmai/pipeline
23+
```
1824

1925
The latest version requires PHP 7.4 or above, including PHP 8.2 and later.
2026

21-
There are earlier versions that work under PHP 5.6 and above, but they are not as feature complete.
27+
Some earlier versions work under PHP 5.6 and above, but they are not as feature-complete.
2228

2329
# Use
2430

0 commit comments

Comments
 (0)