Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more complete combinators #192

Open
pfultz2 opened this issue Sep 17, 2017 · 0 comments
Open

Add more complete combinators #192

pfultz2 opened this issue Sep 17, 2017 · 0 comments

Comments

@pfultz2
Copy link
Collaborator

pfultz2 commented Sep 17, 2017

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...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant