Portability | to be determined |
---|---|
Stability | experimental |
Maintainer | stephen.tetley@gmail.com |
Safe Haskell | Safe-Inferred |
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)' }
- idiot :: ans -> ans
- kestrel :: ans -> r1 -> ans
- bluebird :: (a -> ans) -> (r1 -> a) -> r1 -> ans
- cardinal :: (r2 -> r1 -> ans) -> r1 -> r2 -> ans
- applicator :: (r1 -> ans) -> r1 -> ans
- psi :: (a -> a -> ans) -> (r1 -> a) -> r1 -> r1 -> ans
- becard :: (b -> ans) -> (a -> b) -> (r1 -> a) -> r1 -> ans
- blackbird :: (a -> ans) -> (r1 -> r2 -> a) -> r1 -> r2 -> ans
- bluebird' :: (r1 -> a -> ans) -> r1 -> (r2 -> a) -> r2 -> ans
- bunting :: (a -> ans) -> (r1 -> r2 -> r3 -> a) -> r1 -> r2 -> r3 -> ans
- cardinal' :: (a -> r1 -> ans) -> (r2 -> a) -> r1 -> r2 -> ans
- cardinalstar :: (r1 -> r3 -> r2 -> ans) -> r1 -> r2 -> r3 -> ans
- cardinalstarstar :: (r1 -> r2 -> r4 -> r3 -> ans) -> r1 -> r2 -> r3 -> r4 -> ans
- dove :: (r1 -> a -> ans) -> r1 -> (r2 -> a) -> r2 -> ans
- dickcissel :: (r1 -> r2 -> a -> ans) -> r1 -> r2 -> (r3 -> a) -> r3 -> ans
- dovekie :: (a -> b -> ans) -> (r1 -> a) -> r1 -> (r2 -> b) -> r2 -> ans
- eagle :: (a -> d -> ans) -> a -> (b -> c -> d) -> b -> c -> ans
- eaglebald :: (a -> b -> ans) -> (r1 -> r2 -> a) -> r1 -> r2 -> (r3 -> r4 -> b) -> r3 -> r4 -> ans
- finch :: r1 -> r2 -> (r2 -> r1 -> ans) -> ans
- finchstar :: (r3 -> r2 -> r1 -> ans) -> r1 -> r2 -> r3 -> ans
- finchstarstar :: (r1 -> r4 -> r3 -> r2 -> ans) -> r1 -> r2 -> r3 -> r4 -> ans
- goldfinch :: (r2 -> a -> ans) -> (r1 -> a) -> r1 -> r2 -> ans
- hummingbird :: (r1 -> r2 -> r1 -> ans) -> r1 -> r2 -> ans
- idstar :: (r1 -> ans) -> r1 -> ans
- idstarstar :: (r1 -> r2 -> ans) -> r1 -> r2 -> ans
- jalt :: (r1 -> ans) -> r1 -> r2 -> ans
- jalt' :: (r1 -> r2 -> ans) -> r1 -> r2 -> r3 -> ans
- jay :: (r1 -> ans -> ans) -> r1 -> ans -> r1 -> ans
- kite :: r1 -> ans -> ans
- owl :: ((a -> ans) -> a) -> (a -> ans) -> ans
- phoenix :: (a -> b -> ans) -> (r1 -> a) -> (r1 -> b) -> r1 -> ans
- quacky :: r1 -> (r1 -> a) -> (a -> ans) -> ans
- queer :: (r1 -> a) -> (a -> ans) -> r1 -> ans
- quirky :: (r1 -> a) -> r1 -> (a -> ans) -> ans
- quixotic :: (a -> ans) -> r1 -> (r1 -> a) -> ans
- quizzical :: r1 -> (a -> ans) -> (r1 -> a) -> ans
- robin :: r1 -> (r2 -> r1 -> ans) -> r2 -> ans
- robinstar :: (r2 -> r3 -> r1 -> ans) -> r1 -> r2 -> r3 -> ans
- robinstarstar :: (r1 -> r3 -> r4 -> r2 -> ans) -> r1 -> r2 -> r3 -> r4 -> ans
- starling :: (r1 -> a -> ans) -> (r1 -> a) -> r1 -> ans
- starling' :: (a -> b -> ans) -> (r1 -> a) -> (r1 -> b) -> r1 -> ans
- thrush :: r1 -> (r1 -> ans) -> ans
- vireo :: r1 -> r2 -> (r1 -> r2 -> ans) -> ans
- vireostar :: (r2 -> r1 -> r2 -> ans) -> r1 -> r2 -> r2 -> ans
- vireostarstar :: (r1 -> r3 -> r2 -> r3 -> ans) -> r1 -> r2 -> r3 -> r3 -> ans
- warbler :: (r1 -> r1 -> ans) -> r1 -> ans
- warbler1 :: r1 -> (r1 -> r1 -> ans) -> ans
- warblerstar :: (r1 -> r2 -> r2 -> ans) -> r1 -> r2 -> ans
- warblerstarstar :: (r1 -> r2 -> r3 -> r3 -> ans) -> r1 -> r2 -> r3 -> ans
Data.Function combinators as birds
kestrel :: ans -> r1 -> ansSource
K combinator - kestrel - Haskell const
.
Corresponds to the encoding of true
in the lambda calculus.
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)
blackbird :: (a -> ans) -> (r1 -> r2 -> a) -> r1 -> r2 -> ansSource
B1 combinator - blackbird - specs oo
.
bunting :: (a -> ans) -> (r1 -> r2 -> r3 -> a) -> r1 -> r2 -> r3 -> ansSource
B2 combinator - bunting - specs ooo
.
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.
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.
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.
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.
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.
phoenix :: (a -> b -> ans) -> (r1 -> a) -> (r1 -> b) -> r1 -> ansSource
(Big) Phi combinator - phoenix - Haskell liftM2
.
queer :: (r1 -> a) -> (a -> ans) -> r1 -> ansSource
Q combinator - queer bird.
Haskell (##)
in Peter Thiemann's Wash, reverse composition.
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.
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.
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.