data-aviary-0.4.0: Combinator birds.

Portabilityto be determined
Stabilityexperimental
Maintainerstephen.tetley@gmail.com
Safe HaskellSafe-Inferred

Data.Aviary.BirdsVersion

Contents

Description

Bird monickered combinators - different naming scheme for the type signatures to Data.Aviary.Birds.

This module is intended for illustration (the type signatures!) rather than utility.

The 'long reach' Turner set { S, K, I, B, C, S', B', C' }

The Joy et al. set { S, I, B, C, J(alt), S', B', C', J(alt)' }

Synopsis

Data.Function combinators as birds

idiot :: ans -> ansSource

I combinator - identity bird / idiot bird - Haskell id.

kestrel :: ans -> r1 -> ansSource

K combinator - kestrel - Haskell const. Corresponds to the encoding of true in the lambda calculus.

bluebird :: (a -> ans) -> (r1 -> a) -> r1 -> ansSource

B combinator - bluebird - Haskell (.).

cardinal :: (r2 -> r1 -> ans) -> r1 -> r2 -> ansSource

C combinator - cardinal - Haskell flip.

applicator :: (r1 -> ans) -> r1 -> ansSource

A combinator - apply / applicator - Haskell ($)

This is also called i-star.

psi :: (a -> a -> ans) -> (r1 -> a) -> r1 -> r1 -> ansSource

Psi combinator - psi bird (?) - Haskell on.

Other birds (alphabetical)

becard :: (b -> ans) -> (a -> b) -> (r1 -> a) -> r1 -> ansSource

B3 combinator - becard.

blackbird :: (a -> ans) -> (r1 -> r2 -> a) -> r1 -> r2 -> ansSource

B1 combinator - blackbird - specs oo.

bluebird' :: (r1 -> a -> ans) -> r1 -> (r2 -> a) -> r2 -> ansSource

B' combinator - bluebird prime.

bunting :: (a -> ans) -> (r1 -> r2 -> r3 -> a) -> r1 -> r2 -> r3 -> ansSource

B2 combinator - bunting - specs ooo.

cardinal' :: (a -> r1 -> ans) -> (r2 -> a) -> r1 -> r2 -> ansSource

C' combinator - no name.

cardinalstar :: (r1 -> r3 -> r2 -> ans) -> r1 -> r2 -> r3 -> ansSource

C* combinator - cardinal once removed.

cardinalstarstar :: (r1 -> r2 -> r4 -> r3 -> ans) -> r1 -> r2 -> r3 -> r4 -> ansSource

C** combinator - cardinal twice removed.

dove :: (r1 -> a -> ans) -> r1 -> (r2 -> a) -> r2 -> ansSource

D combinator - dove.

dickcissel :: (r1 -> r2 -> a -> ans) -> r1 -> r2 -> (r3 -> a) -> r3 -> ansSource

D1 combinator - dickcissel.

dovekie :: (a -> b -> ans) -> (r1 -> a) -> r1 -> (r2 -> b) -> r2 -> ansSource

D2 combinator - dovekie.

eagle :: (a -> d -> ans) -> a -> (b -> c -> d) -> b -> c -> ansSource

E combinator - eagle.

eaglebald :: (a -> b -> ans) -> (r1 -> r2 -> a) -> r1 -> r2 -> (r3 -> r4 -> b) -> r3 -> r4 -> ansSource

E ^ - bald eagle. For alphabetical regularity it is somewhat misnamed here as eaglebald.

finch :: r1 -> r2 -> (r2 -> r1 -> ans) -> ansSource

F combinator - finch.

finchstar :: (r3 -> r2 -> r1 -> ans) -> r1 -> r2 -> r3 -> ansSource

F* combinator - finch once removed.

finchstarstar :: (r1 -> r4 -> r3 -> r2 -> ans) -> r1 -> r2 -> r3 -> r4 -> ansSource

F** combinator - finch twice removed.

goldfinch :: (r2 -> a -> ans) -> (r1 -> a) -> r1 -> r2 -> ansSource

G combinator - goldfinch.

hummingbird :: (r1 -> r2 -> r1 -> ans) -> r1 -> r2 -> ansSource

H combinator - hummingbird.

idstar :: (r1 -> ans) -> r1 -> ansSource

I* combinator - identity bird once removed Alias of applicator, Haskell's ($).

idstarstar :: (r1 -> r2 -> ans) -> r1 -> r2 -> ansSource

I** combinator - identity bird twice removed

jalt :: (r1 -> ans) -> r1 -> r2 -> ansSource

Alternative J combinator - this is the J combintor of Joy, Rayward-Smith and Burton (see. Antoni Diller 'Compiling Functional Languages' page 104). It is not the J - jay combinator of the literature.

jalt' :: (r1 -> r2 -> ans) -> r1 -> r2 -> r3 -> ansSource

J' combinator - from Joy, Rayward-Smith and Burton. See the comment to jalt.

jay :: (r1 -> ans -> ans) -> r1 -> ans -> r1 -> ansSource

J combinator - jay.

This is the usual J combinator.

kite :: r1 -> ans -> ansSource

Ki - kite. Corresponds to the encoding of false in the lambda calculus.

owl :: ((a -> ans) -> a) -> (a -> ans) -> ansSource

O combinator - owl.

phoenix :: (a -> b -> ans) -> (r1 -> a) -> (r1 -> b) -> r1 -> ansSource

(Big) Phi combinator - phoenix - Haskell liftM2.

quacky :: r1 -> (r1 -> a) -> (a -> ans) -> ansSource

Q4 combinator - quacky bird.

queer :: (r1 -> a) -> (a -> ans) -> r1 -> ansSource

Q combinator - queer bird.

Haskell (##) in Peter Thiemann's Wash, reverse composition.

quirky :: (r1 -> a) -> r1 -> (a -> ans) -> ansSource

Q3 combinator - quirky bird.

quixotic :: (a -> ans) -> r1 -> (r1 -> a) -> ansSource

Q1 combinator - quixotic bird.

quizzical :: r1 -> (a -> ans) -> (r1 -> a) -> ansSource

Q2 combinator - quizzical bird.

robin :: r1 -> (r2 -> r1 -> ans) -> r2 -> ansSource

R combinator - robin.

robinstar :: (r2 -> r3 -> r1 -> ans) -> r1 -> r2 -> r3 -> ansSource

R* combinator - robin once removed.

robinstarstar :: (r1 -> r3 -> r4 -> r2 -> ans) -> r1 -> r2 -> r3 -> r4 -> ansSource

R** combinator - robin twice removed.

starling :: (r1 -> a -> ans) -> (r1 -> a) -> r1 -> ansSource

S combinator - starling.

Haskell: Applicative's (<*>) on functions.

(Substitution / composition).

starling' :: (a -> b -> ans) -> (r1 -> a) -> (r1 -> b) -> r1 -> ansSource

S' combinator - starling prime - Turner's big phi. Haskell: Applicative's liftA2 on functions.

thrush :: r1 -> (r1 -> ans) -> ansSource

T combinator - thrush. Haskell (#) in Peter Thiemann's Wash, reverse application.

vireo :: r1 -> r2 -> (r1 -> r2 -> ans) -> ansSource

V combinator - vireo.

vireostar :: (r2 -> r1 -> r2 -> ans) -> r1 -> r2 -> r2 -> ansSource

V* combinator - vireo once removed.

vireostarstar :: (r1 -> r3 -> r2 -> r3 -> ans) -> r1 -> r2 -> r3 -> r3 -> ansSource

V** combinator - vireo twice removed.

warbler :: (r1 -> r1 -> ans) -> r1 -> ansSource

W combinator - warbler - elementary duplicator.

warbler1 :: r1 -> (r1 -> r1 -> ans) -> ansSource

W1 combinator - converse warbler. warbler with the arguments reversed.

warblerstar :: (r1 -> r2 -> r2 -> ans) -> r1 -> r2 -> ansSource

W* combinator - warbler once removed.

warblerstarstar :: (r1 -> r2 -> r3 -> r3 -> ans) -> r1 -> r2 -> r3 -> ansSource

W** combinator - warbler twice removed.