Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.64 KB

File metadata and controls

43 lines (27 loc) · 1.64 KB

Collection v1.1

A collection class for working with arrays

tests codecov Latest Stable Version Total Downloads License

Principles

  • Immutable - Most methods return a new collection, leaving the previous untouched
  • Chainable - Methods can be chained to create fluent mapping and reduce original collection

Requirements

Installation

$ composer require jjgrainger/collection

Usage

$collection = new Collection([1, 2, 3]);

$total = $collection->sum(); // 6

Notes

Author

Joe Grainger