benji6 / combinators-js

:bird: Some combinators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

S K definition of B3 combinator

benji6 opened this issue · comments

I don't know what the S K definition of this is:

B3 = a => b => c => d => a(b(c(d)))

The Becard (B3) combinator is equivalent to the following in SK combinatorics:

((S(K((S(K((S(KS))K)))((S(KS))K))))((S(KS))K))

You can simplify this by using the Bluebird combinator (B):

((S(KS))K)

Then B3 is definable as:

B(BB)B

This is a good reference that I use for looking up such things from time to time: Angelfire Combinator Birds Reference.