Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

thumbtack/crankshaft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crankshaft

A PHP version of Python's itertools.

Supported functions include map, filter, each, and reduce.

Basic usage:

require_once('crankshaft.php');

$a = tt_iter([1, 2, 3])
    ->map(function($x) { return 2 * x; })
    ->to_array();

// $a is now [2, 4, 8]

Running Tests

This requires simpletest to be installed.

Releases

No releases published

Packages

No packages published

Languages