Download the PHP package loophp/combinator without Composer

On this page you can find all versions of the php package loophp/combinator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package combinator

![Latest Stable Version][latest stable version] ![GitHub stars][github stars] ![Total Downloads][total downloads] ![GitHub Workflow Status][github workflow status] ![Scrutinizer code quality][code quality] ![Type Coverage][type coverage] ![Code Coverage][code coverage] ![License][license] ![Donate!][donate github]

Combinator

Description

This package provides a list of well known Combinators.

A combinator is a higher-order function that uses only function application and earlier defined combinators to define a result from its arguments. It was introduced in 1920 by Moses Schönfinkel and Haskell Curry, and has more recently been used in computer science as a theoretical model of computation and also as a basis for the design of functional programming languages. Combinators which were introduced by Schönfinkel in 1920 with the idea of providing an analogous way to build up functions - and to remove any mention of variables - particularly in predicate logic.

Requirements

Installation

Available combinators

Name Alias Composition Composition using S and K Haskell Lambda calculus Term definition (JS like) Type # Arguments
A Apply SK(SK)
(S(K))(S(K))
$ λab.ab a => b => a(b) (a -> b) -> a -> b 2
B Bluebird S(KS)K
S(KS)K
. λabc.a(bc) a => b => c => a(b(c)) (a -> b) -> (c -> a) -> c -> b 3
Blackbird Blackbird BBB
(S(K(S(KS)K)))(S(KS)K)
... λabcd.a(bcd) a => b => c => => d => a(b(c)(d)) (c -> d) -> (a -> b -> c) -> a -> b -> d 4
C Cardinal S(BBS)(KK)
((S((S(K(S(KS)K)))S))(KK))
flip λabc.acb a => b => c => a(c)(b) (a -> b -> c) -> b -> a -> c 3
D Dove BB
(S(K(S(KS)K)))
λabcd.ab(cd) a => b => c => d => a(b)(c(d)) (a -> c -> d) -> a -> (b -> c) -> b -> d 4
E Eagle B(BBB)
(S(K((S(K(S(KS)K)))((S(KS))K))))
λabcde.ab(cde) a => b => c => d => e => a(b)(c(d)(e)) (a -> d -> e) -> a -> (b -> c -> d) -> b -> c -> e 5
F Finch ETTET
((S(K((S((SK)K))(K((S(K(S((SK)K))))K)))))((S(K((S(K(S(KS)K)))((S(KS))K))))((S(K(S((SK)K))))K)))
λabc.cba a => b => c => c(b)(a) a -> b -> (b -> a -> c) -> c 3
G Goldfinch BBC
((S(K(S(KS)K)))((S((S(K(S(KS)K)))S))(KK)))
λabcd.ad(bc) a => b => c => d => a(d)(b(c)) (a -> b -> c) -> (d -> b) -> d -> a -> c 4
H Hummingbird BW(BC)
((S(K((S(K(S((S(K((S((SK)K))((SK)K))))((S(K(S(KS)K)))((S(K(S((SK)K))))K))))))K)))(S(K((S((S(K(S(KS)K)))S))(KK)))))
λabc.abcb a => b => c => a(b)(c)(b) (a -> b -> a -> c) -> a -> b -> c 3
I Idiot SKK
((SK)K)
id λa.a a => a a -> a 1
J Jay B(BC)(W(BC(E)))
((S(K(S(K((S((S(K(S(KS)K)))S))(KK))))))((S((S(K((S((SK)K))((SK)K))))((S(K(S(KS)K)))((S(K(S((SK)K))))K))))(K((S(K((S((S(K(S(KS)K)))S))(KK))))(S(K((S(K(S(KS)K)))((S(KS))K))))))))
λabcd.ab(adc) a => b => c => d => a(b)(a(d)(c)) (a -> b -> b) -> a -> b -> a -> b 4
K Kestrel K
K
const λab.a a => b => a a -> b -> a 2
Ki Kite KI
(K((SK)K))
λab.b a => b => b a -> b -> b 2
L Lark CBM
((S((S(KS))K))(K((S((SK)K))((SK)K))))
λab.a(bb) a => b => a(b(b)) 2
M Mockingbird SII
((S((SK)K))((SK)K))
λa.aa a => a(a) 1
O Owl SI
(S((SK)K))
λab.b(ab) a => b => b(a(b)) ((a -> b) -> a) -> (a -> b) -> b 2
Omega Ω MM
(((S((SK)K))((SK)K))((S((SK)K))((SK)K)))
λa.(aa)(aa) a => (a(a))(a(a)) 1
Phoenix λabcd.a(bd)(cd) a => b => c => d => a(b(d))(c(d)) (a -> b -> c) -> (d -> a) -> (d -> b) -> d -> c 4
Psi on λabcd.a(bc)(bd) a => b => c => d => a(b(c))(b(d)) (a -> a -> b) -> (c -> a) -> c -> c -> b 4
Q Queer CB
((S(K(S((S(KS))K))))K)
(##) λabc.b(ac) a => b => c => b(a(c)) (a -> b) -> (b -> c) -> a -> c 3
R Robin BBT
((S(K(S(KS)K)))((S(K(S((SK)K))))K))
λabc.bca a => b => c => b(c)(a) a -> (b -> a -> c) -> b -> c 3
S Starling S
S
<*> λabc.ac(bc) a => b => c => a(c)(b(c)) (a -> b -> c) -> (a -> b) -> a -> c 3
S_ <*> λabc.a(bc)c a => b => c => a(b(c))(c) (a -> b -> c) -> (b -> a) -> b -> c 3
S2 <*> λabcd.a((bd)(cd)) a => b => c => d => a(b(d))(c(d)) (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d 4
T Thrush CI
((S(K(S((SK)K))))K)
(&) λab.ba a => b => b(a) a -> (a -> b) -> b 2
U Turing LO
((S(K(S((SK)K))))((S((SK)K))((SK)K)))
λab.b(aab) a => b => b(a(a)(b)) 2
V Vireo BCT
((S(K((S((S(K(S(KS)K)))S))(KK))))((S(K(S((SK)K))))K))
λabc.cab a => b => c => c(a)(b) a -> b -> (a -> b -> c) -> c 3
W Warbler C(BMR)
((S(K(S((S(K((S((SK)K))((SK)K))))((S(K(S(KS)K)))((S(K(S((SK)K))))K))))))K)
λab.abb a => b => a(b)(b) (a -> a -> b) -> a -> b 2
Y Y-Fixed point λa.(λb(a(bb))(λb(a(bb)))) a => (b => b(b))(b => a(c => b(b)(c))) 1
Z Z-Fixed point λa.M(λb(a(Mb))) 1

Usage

Simple combinators

Y combinator

More on the wikipedia page.

Suggested reading and resources

Contributing

Feel free to contribute by sending pull requests. We are a usually very responsive team and we will help you going through your pull request from the beginning to the end.

For some reasons, if you can't contribute to the code and willing to help, sponsoring is a good, sound and safe way to show us some gratitude for the hours we invested in this package.

Sponsor me on Github and/or any of the contributors.

Thanks

Authors

Changelog

See CHANGELOG.md for a changelog based on git commits.

For more detailed changelogs, please check the release changelogs.

[latest stable version]: https://img.shields.io/packagist/v/loophp/combinator.svg?style=flat-square [github stars]: https://img.shields.io/github/stars/loophp/combinator.svg?style=flat-square [total downloads]: https://img.shields.io/packagist/dt/loophp/combinator.svg?style=flat-square [github workflow status]: https://img.shields.io/github/actions/workflow/status/loophp/combinator/tests.yml?branch=master&style=flat-square [code quality]: https://img.shields.io/scrutinizer/quality/g/loophp/combinator/master.svg?style=flat-square [type coverage]: https://img.shields.io/badge/dynamic/json?style=flat-square&color=color&label=Type%20coverage&query=message&url=https%3A%2F%2Fshepherd.dev%2Fgithub%2Floophp%2Fcombinator%2Fcoverage [code coverage]: https://img.shields.io/scrutinizer/coverage/g/loophp/combinator/master.svg?style=flat-square [license]: https://img.shields.io/packagist/l/loophp/combinator.svg?style=flat-square [donate github]: https://img.shields.io/badge/Sponsor-Github-brightgreen.svg?style=flat-square [donate paypal]: https://img.shields.io/badge/Sponsor-Paypal-brightgreen.svg?style=flat-square


All versions of combinator with dependencies

PHP Build Version
Package Version
Requires php Version >= 8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package loophp/combinator contains the following files

Loading the files please wait ....