Skip to content

Iterator and Generator builder like Java8' stream API

License

Notifications You must be signed in to change notification settings

spindle/spindle-stream

Repository files navigation

spindle/stream

Iterator builder like Java8' Stream API

<?php
use Spindle\Stream;

Stream::_(range(0, 9))
    ->filter('$_ > 5')
    ->distinct()
    ->map('$_ * 5')
    ->export($stream);

foreach ($stream as $v) {
    echo $v, PHP_EOL;
}

Install

$ composer require 'spindle/stream:*'

License

Creative Commons Zero 1.0 Universal (Public Domain)

About

Iterator and Generator builder like Java8' stream API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published