data-aviary-0.4.0: Combinator birds.

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

Data.Aviary.Birds

Contents

Description

Bird monickered combinators

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 :: a -> aSource

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

kestrel :: a -> b -> aSource

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

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

B combinator - bluebird - Haskell (.).

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

C combinator - cardinal - Haskell flip.

applicator :: (a -> b) -> a -> bSource

A combinator - apply / applicator - Haskell ($).

This is also called i-star.

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

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

Other birds (alphabetical)

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

B3 combinator - becard.

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

B1 combinator - blackbird - specs oo.

bluebird' :: (a -> c -> d) -> a -> (b -> c) -> b -> dSource

B' combinator - bluebird prime.

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

B2 combinator - bunting - specs ooo.

cardinal' :: (c -> a -> d) -> (b -> c) -> a -> b -> dSource

C' combinator - no name.

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

C* combinator - cardinal once removed.

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

C** combinator - cardinal twice removed.

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

D combinator - dove.

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

D1 combinator - dickcissel.

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

D2 combinator - dovekie.

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

E combinator - eagle.

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

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

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

F combinator - finch.

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

F* combinator - finch once removed.

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

F** combinator - finch twice removed.

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

G combinator - goldfinch.

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

H combinator - hummingbird.

idstar :: (a -> b) -> a -> bSource

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

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

I** combinator - identity bird twice removed

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

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' :: (a -> b -> d) -> a -> b -> c -> dSource

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

jay :: (a -> b -> b) -> a -> b -> a -> bSource

J combinator - jay.

This is the usual J combinator.

kite :: a -> b -> bSource

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

owl :: ((a -> b) -> a) -> (a -> b) -> bSource

O combinator - owl.

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

(Big) Phi combinator - phoenix - Haskell liftM2.

This is the same function as starling'.

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

Q4 combinator - quacky bird.

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

Q combinator - queer bird.

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

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

Q3 combinator - quirky bird.

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

Q1 combinator - quixotic bird.

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

Q2 combinator - quizzical bird.

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

R combinator - robin.

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

R* combinator - robin once removed.

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

R** combinator - robin twice removed.

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

S combinator - starling.

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

Substitution.

starling' :: (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> dSource

S' combinator - starling prime - Turner's big phi. Haskell: Applicative's liftA2 on functions (and similarly Monad's liftM2).

This is the same function as phoenix.

thrush :: a -> (a -> b) -> bSource

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

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

V combinator - vireo (pairing).

vireostar :: (b -> a -> b -> d) -> a -> b -> b -> dSource

V* combinator - vireo once removed.

vireostarstar :: (a -> c -> b -> c -> e) -> a -> b -> c -> c -> eSource

V** combinator - vireo twice removed.

warbler :: (a -> a -> b) -> a -> bSource

W combinator - warbler - elementary duplicator.

warbler1 :: a -> (a -> a -> b) -> bSource

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

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

W* combinator - warbler once removed.

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

W** combinator - warbler twice removed.