jamesrweb / elm-combinators / Combinators

a : (a -> b) -> a -> b

The A combinator.

Implemented in terms of the I combinator.

b : (b -> c) -> (a -> b) -> a -> c

The B combinator.

The equivilent of the composition operator ((<<)) in Elm.

b1 : (b -> c) -> (a -> d -> b) -> a -> d -> c

The B1 combinator.

b2 : (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e

The B2 combinator.

b3 : (c -> d) -> (b -> c) -> (a -> b) -> a -> d

The B3 combinator.

bp : (a -> c -> d) -> a -> (b -> c) -> b -> d

The B Prime (B') combinator.

c : (a -> b -> c) -> b -> a -> c

The C combinator.

cp : (c -> a -> d) -> (b -> c) -> a -> b -> d

The C Prime (C') combinator.

cs : (a -> c -> b -> d) -> a -> b -> c -> d

The C Star (C*) combinator.

css : (a -> b -> d -> c -> e) -> a -> b -> c -> d -> e

The C Star Star (C**) combinator.

d : (a -> c -> d) -> a -> (b -> c) -> b -> d

The D combinator.

d1 : (a -> b -> d -> e) -> a -> b -> (c -> d) -> c -> e

The D1 Combinator.

d2 : (c -> d -> e) -> (a -> c) -> a -> (b -> d) -> b -> e

The D2 combinator.

e : (a -> d -> e) -> a -> (b -> c -> d) -> b -> c -> e

The E combinator.

eb : (e -> f -> g) -> (a -> b -> e) -> a -> b -> (c -> d -> f) -> c -> d -> g

The Ê Combinator.

Named 'eb' for alphabetic consistency with the e combinator.

I would have named this function 'ê' but Elm does not support that as a function name in the @docs block. Accordingly, this was the next best name I could think of based on other language / library implementations I have seen.

f : a -> b -> (b -> a -> c) -> c

The F combinator.

fs : (c -> b -> a -> d) -> a -> b -> c -> d

The F Star (F*) combinator.

fss : (a -> d -> c -> b -> e) -> a -> b -> c -> d -> e

The F Star Star (F**) combinator.

g : (b -> c -> d) -> (a -> c) -> a -> b -> d

The G combinator.

h : (a -> b -> a -> c) -> a -> b -> c

The H combinator.

i : a -> a

The I combinator.

is : (a -> b) -> a -> b

The I Star (I*) combinator

Implemented in terms of the I combinator.

iss : (a -> b -> c) -> a -> b -> c

The I Star Star (I**) combinator.

Implemented in terms of the I combinator.

j : (a -> b -> b) -> a -> b -> a -> b

The J combinator.

This is the J combinator of the literature.

js : (a -> c) -> a -> b -> c

The J Star (J*) combinator.

This is the J combinator of Joy. It is not the jay combinator (J) of the literature.

Credit: Rayward-Smith and Burton (See Antoni Diller 'Compiling Functional Languages' page 104).

jp : (a -> b -> d) -> a -> b -> c -> d

The J Prime (J') combinator - prime of the J Star (Joy) combinator.

Credit: Rayward-Smith and Burton (See Antoni Diller 'Compiling Functional Languages' page 104).

k : a -> b -> a

The K combinator.

Corresponds to the encoding of true in lambda calculus.

ki : a -> b -> b

The KI combinator.

Corresponds to the encoding of false in lambda calculus.

o : ((a -> b) -> a) -> (a -> b) -> b

The O combinator.

p : (b -> b -> c) -> (a -> b) -> a -> a -> c

The P combinator.

px : (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d

The Pheonix (Big Phi) combinator, also known as Turner's S Prime (S') combinator.

Equivilant to S Prime here and known to Haskell programmers as liftA2 and liftM2 for the Applicative and Monadic instances of (->).

q : (a -> b) -> (b -> c) -> a -> c

The Q combinator.

q1 : (b -> c) -> a -> (a -> b) -> c

The Q1 combinator.

q2 : a -> (b -> c) -> (a -> b) -> c

The Q2 combinator.

q3 : (a -> b) -> a -> (b -> c) -> c

The Q3 combinator.

q4 : a -> (a -> b) -> (b -> c) -> c

The Q4 combinator.

r : a -> (b -> a -> c) -> b -> c

The R combinator.

rs : (b -> c -> a -> d) -> a -> b -> c -> d

The R Star (R*) combinator.

rss : (a -> c -> d -> b -> e) -> a -> b -> c -> d -> e

The R Star Star (R**) combinator.

s : (a -> b -> c) -> (a -> b) -> a -> c

The S combinator.

sp : (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d

The S Prime (S') combinator.

t : a -> (a -> b) -> b

The T combinator.

v : a -> b -> (a -> b -> c) -> c

The V combinator.

vs : (b -> a -> b -> d) -> a -> b -> b -> d

The V Star (V*) combinator.

vss : (a -> c -> b -> c -> e) -> a -> b -> c -> c -> e

The V Star Star (V**) combinator.

w : (a -> a -> b) -> a -> b

The W combinator.

w1 : a -> (a -> a -> b) -> b

The W1 combinator.

The W combinator but with the arguments reversed.

ws : (a -> b -> b -> c) -> a -> b -> c

The W Star (W*) combinator.

wss : (a -> b -> c -> c -> d) -> a -> b -> c -> d

The W Star Star (W**) combinator.