承接 jorgezf/sequence 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jorgezf/sequence

最新稳定版本:1.1.0

Composer 安装命令:

composer require jorgezf/sequence

包简介

A functional programming library for PHP

关键字:

README 文档

README

This library makes it easier to use functional style programming in PHP.

IMPORTANT:

This library is a fork of the original Revinate/Sequence library https://github.com/revinate/sequence. This fork is intended to upgrade the library to be compatible with PHP 8.1 version.

PHP Backward Compatibility

As we move our codebase forward, it is no longer possible for us to support older versions of PHP. With release version 1.0 and onward, we will stop supporting PHP 5.3 and PHP 5.4.

Quick Example

Install the package via composer by executing the following command:

composer require jorgezf/sequence

This is a tiny script to get a feeling of how Sequence works.

<?php
require_once __DIR__.'/vendor/autoload.php';

use Revinate\Sequence\Sequence;

$dataSet = [1, 2, 3, 4, 5];
$seq = Sequence::make($dataSet);

// At this point you have a sequence and you can do bunch of cool sequence stuff with it

$even = $seq->filter(static function($n) { return $n%2 == 0; });  // nothing is evaluated here because of lazy loading
foreach($even as $num) {
    echo "$num\n";
}


$twice = $seq->map(static function($n) { return $n * 2; });
foreach($twice as $num) {
    echo "$num\n";
}

and the output of this program will be:

2
4
2
4
6
8
10

This is just a tiny bit of all the things that can be accomplished with Sequence. For a more detailed documentation, see Wiki

How to get involved

First clone the repo and install the dependencies

git clone https://github.com/jorgezf/sequence.git
composer install

and then run the tests:

./vendor/bin/phpunit

That's all you need to start working on Sequence. Please, include tests in your pull requests.

统计信息

  • 总下载量: 137
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固