garp-functional

所属分类:工具库
开发工具:PHP
文件大小:0KB
下载次数:0
上传日期:2023-06-09 08:15:16
上 传 者sh-1993
说明:  包含函数编程范例的PHP实用程序库。,
(PHP utility library embracing functional programming paradigms.,)

文件列表:
CHANGELOG.md (2242, 2023-10-16)
CODE_OF_CONDUCT.md (3346, 2023-10-16)
CONTRIBUTING.md (1415, 2023-10-16)
LICENSE.md (1483, 2023-10-16)
_internal/ (0, 2023-10-16)
_internal/ReducedValue.php (533, 2023-10-16)
composer.json (4148, 2023-10-16)
docs/ (0, 2023-10-16)
docs/_config.yml (26, 2023-10-16)
docs/index.md (45399, 2023-10-16)
functions/ (0, 2023-10-16)
functions/add.php (594, 2023-10-16)
functions/always.php (555, 2023-10-16)
functions/autocurry.php (1186, 2023-10-16)
functions/binary.php (546, 2023-10-16)
functions/both.php (998, 2023-10-16)
functions/call.php (951, 2023-10-16)
functions/compose.php (933, 2023-10-16)
functions/concat.php (1866, 2023-10-16)
functions/concat_right.php (822, 2023-10-16)
functions/concat_with.php (1660, 2023-10-16)
functions/contains.php (1106, 2023-10-16)
functions/count.php (793, 2023-10-16)
functions/divide.php (610, 2023-10-16)
functions/drop.php (1059, 2023-10-16)
functions/drop_while.php (1371, 2023-10-16)
functions/either.php (963, 2023-10-16)
functions/entries.php (726, 2023-10-16)
functions/equals.php (815, 2023-10-16)
functions/every.php (888, 2023-10-16)
functions/filter.php (930, 2023-10-16)
functions/find.php (892, 2023-10-16)
... ...

[![PHPUnit](https://github.com/grrr-amsterdam/garp-functional/actions/workflows/phpunit.yml/badge.svg)](https://github.com/grrr-amsterdam/garp-functional/actions/workflows/phpunit.yml) [![PHPCS](https://github.com/grrr-amsterdam/garp-functional/actions/workflows/phpcs.yml/badge.svg)](https://github.com/grrr-amsterdam/garp-functional/actions/workflows/phpcs.yml) [![PHPStan](https://github.com/grrr-amsterdam/garp-functional/actions/workflows/phpstan.yml/badge.svg)](https://github.com/grrr-amsterdam/garp-functional/actions/workflows/phpstan.yml) # Garp Functional Utility library embracing functional programming paradigms. [Documentation](https://grrr-amsterdam.github.io/garp-functional/) ## Developed with by [GRRR](https://grrr.nl) - GRRR is a [B Corp](https://grrr.nl/en/b-corp/) - GRRR has a [tech blog](https://grrr.tech/) - GRRR is [hiring](https://grrr.nl/en/jobs/) - [@GRRRTech](https://twitter.com/grrrtech) tweets ## 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](https://grrr-amsterdam.github.io/garp-functional/) ## Thanks This library is inspired by beautiful languages like [Haskell](https://www.haskell.org/) and [Clojure](https://clojure.org/), as well as the awesome [RamdaJS](https://ramdajs.com/) library.

近期下载者

相关文件


收藏者