承接 grrr-amsterdam/garp-functional 相关项目开发

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

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

grrr-amsterdam/garp-functional

最新稳定版本:v6.3.0

Composer 安装命令:

composer require grrr-amsterdam/garp-functional

包简介

Utility library embracing functional programming paradigms.

README 文档

README

PHPUnit PHPCS PHPStan

Garp Functional

Utility library embracing functional programming paradigms.

Documentation

Developed with ❤️ by GRRR

Philosophy

Garp\Functional is a practical functional library that strives to embrace functional paradigms.

  • Functions are pure, referentially transparent, without side-effects.
  • Data immutability is favored over mutating existing properties of given parameters.
  • In general, functions are curried. Almost all of the functions in the library can be called partially applied, to a point where this makes sense.
  • Function parameters are ordered to promote currying. Data is usually the last thing to go in, making every function a fine candidate to pass to native array_map, array_filter and the like, without having to create a closure around the call.
  • Higher-order functions are provided to fill the gaps. Functions like compose, partial, partial_right or not are legos for you to use in your own implementation.
  • Nothing is type-hinted too strictly. I don't care if you pass a string or an array to prop, as long as it allows accessing members thru bracket syntax [], I'll allow it. Nothing irks me more about PHP than not being able to toss a Traversable object into the native array_map.
  • Typeclasses are added, broadening the applicability of the functions. Next to primitives, they will now work with your objects as well, so long as they implement the right interface.

Usage

Installation:

composer require grrr-amsterdam/garp-functional

That'll do, all functions are available to you.

Read the docs for a complete reference

Thanks

This library is inspired by beautiful languages like Haskell and Clojure,
as well as the awesome RamdaJS library.

统计信息

  • 总下载量: 114.98k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 1
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

  • Stars: 32
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-02-15