grrr-amsterdam/garp-functional
Composer 安装命令:
composer require grrr-amsterdam/garp-functional
包简介
Utility library embracing functional programming paradigms.
README 文档
README
Garp Functional
Utility library embracing functional programming paradigms.
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_filterand 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_rightornotare 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 aTraversableobject into the nativearray_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.
grrr-amsterdam/garp-functional 适用场景与选型建议
grrr-amsterdam/garp-functional 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 118.27k 次下载、GitHub Stars 达 32, 最近一次更新时间为 2017 年 02 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 grrr-amsterdam/garp-functional 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 grrr-amsterdam/garp-functional 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 118.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 32
- 点击次数: 11
- 依赖项目数: 8
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2017-02-15