boostorg / boostorg/hof

Add more complete combinators

Open
#192 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
509
Forks
94
PR merge metrics
No merged PRs in 30d

Description

Add some more adaptors for more complete combinatory logic:

* B = compose
* C = flip
* K = always
* W = ???
* S = ???
* I = identity

So the S(ie application combinator) and the W(ie duplicate combinator) combinators are missing, which could be something like:

```
S(f, g)(xs...) == f(xs...)(g(xs...))
W(f)(xs...) == f(xs...)(xs...)
```

Also, even though the C combinator is like flip, it could also be defined as:

```
C(f)(xs...)(ys...) == f(ys...)(xs...)
```

There is also the monad bind that can be defined for functions, something like:

```
mbind(f, g)(xs...) == g(f(xs...))(xs...)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.