packages feed

data-aviary (empty) → 0.1.0

raw patch · 6 files changed

+905/−0 lines, 6 filesdep +basesetup-changed

Dependencies added: base

Files

+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2008 Stephen Peter Tetley++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:++1. Redistributions of source code must retain the above copyright+   notice, this list of conditions and the following disclaimer.++2. Redistributions in binary form must reproduce the above copyright+   notice, this list of conditions and the following disclaimer in the+   documentation and/or other materials provided with the distribution.++3. Neither the name of the author nor the names of his contributors+   may be used to endorse or promote products derived from this software+   without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,4 @@+#!/usr/bin/env runhaskell++import Distribution.Simple+main = defaultMain
+ data-aviary.cabal view
@@ -0,0 +1,47 @@+name:             data-aviary+version:          0.1.0+license:          BSD3+license-file:     LICENSE+copyright:        Stephen Tetley <stephen.tetley@gmail.com>+maintainer:       Stephen Tetley <stephen.tetley@gmail.com>+homepage:         http://code.google.com/p/copperbox/+category:         Combinators+synopsis:         Combinator birds.+description:+  A catalogue for the combinator birds (Data.Aviary.Birds) - this +  module is intended more for illustration than utility.+  .+  Plus a smaller set (Data.Avery) intended to be useful, +  collecting combinators that have already /escaped/ (published +  elsewhere) but aren\'t in Data.Function and other favourites.+  .++build-type:         Simple+stability:          highly unstable+cabal-version:      >= 1.2++extra-source-files:++library+  hs-source-dirs:     src+  build-depends:      base<5++  +  exposed-modules:+    Data.Aviary,+    Data.Aviary.Birds,+    Data.Aviary.BirdsInter+    ++  other-modules:+    +  extensions:+    ++  ghc-options:+  +  includes: +  ++  +  
+ src/Data/Aviary.hs view
@@ -0,0 +1,121 @@+{-# OPTIONS -Wall #-}++-----------------------------------------------------------------------------+-- |+-- Module      :  Data.Aviary+-- Copyright   :  (c) Stephen Peter Tetley 2009+-- License     :  BSD3+--+-- Maintainer  :  stephen.tetley@gmail.com+-- Stability   :  experimental+-- Portability :  to be determined+--+-- Plainly named combinators+--+-- Sometimes permuted to be generally useful...+--+-- Note the fixity of @(\#)@ and @(\#\#)@ is not yet /fixed/.+-- Some experience needs to be gathered as to whether the+-- precendence levels are appropriate.+--+-----------------------------------------------------------------------------++module Data.Aviary+  ( ++  -- * The real stuff++    ( # )+  , ( ## )+  , subst+  , bigphi+  , appro++  -- * Specs+  , oo+  , ooo+  , oooo++  ) where++import Data.Function++--------------------------------------------------------------------------------+-- Combinators++++infixl 7 #++-- | T combinator - thrush+--+-- Reverse application - the T combinator.+-- Found in Peter Thiemann's Wash and the paper 'Client-Side Web +-- Scripting in Haskell' - Erik Meijer, Daan Leijen & James Hook.+( # ) :: a -> (a -> b) -> b +x # f = f x+++infixl 8 ##++( ## ) :: (a -> b) -> (b -> c) -> a -> c+f ## g = \x -> g (f x)+ ++-- | S combinator - subst.+-- Familiar as Applicative\'s ('<*>') operator, which itself is +-- fmap:+--+-- f (b -> c) -> f b -> f c where f = ((->) a)+subst :: (a -> b -> c) -> (a -> b) -> a -> c+subst f g x = f x (g x) ++-- | The big Phi, or Turner's @S'@ combinator.+-- Known to Haskell programmers as liftA2 and liftM2 for the +-- Applicative and Monad instances of (->).+--+-- > (a1 -> a2 -> r) -> m a1 -> m a2 -> m r where m = ((->) a)+-- +-- Taste suggests you may prefer liftA2.+--+bigphi :: (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d+bigphi f g h x = f (g x) (h x)++-- | A variant of the @D2@ or dovekie combinator - the argument+-- order has been changed to be more satisfying for Haskellers.+--+-- @appro@ is similar to the function @prod@ from the Pair +-- calculus, but @appro@ applies the first argument +-- @ f :: (c -> d -> e) @ to the two intermediate results.+-- @prod@ always forms a pair from the intermediate results.+--+-- @on@ from Data.Function is similar but less general, where +-- the two intermediate results are formed by applying the same +-- function to the supplied arguments.+--+appro :: (c -> d -> e) -> (a -> c) -> (b -> d) -> a -> b -> e+appro f g h x y = f (g x) (h y) +++--------------------------------------------------------------------------------+-- Specs - blackbird, bunting, ...++-- Alleviate your composing-sectioning mania with specs!+-- The name becomes a pun on spectacles (glasses, specs), +-- once you use infix directives @`oo`@.+-- E.g.:+-- (abs .) . (*) ==> abs `oo` (*)++-- | Compose an arity 1 function with an arity 2 function.+-- B1 - blackbird+oo :: (c -> d) -> (a -> b -> c) -> a -> b -> d+oo f g = (f .) . g++-- | Compose an arity 1 function with an arity 3 function.+-- B2 - bunting+ooo :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e+ooo f g = ((f .) .) . g++-- | Compose an arity 1 function with an arity 4 function.+oooo :: (e -> f) -> (a -> b -> c -> d -> e) -> a -> b -> c -> d -> f+oooo f g = (((f .) .) .) . g  
+ src/Data/Aviary/Birds.hs view
@@ -0,0 +1,340 @@+{-# OPTIONS -Wall #-}++-----------------------------------------------------------------------------+-- |+-- Module      :  Data.Aviary.Birds+-- Copyright   :  (c) Stephen Peter Tetley 2009+-- License     :  BSD3+--+-- Maintainer  :  stephen.tetley@gmail.com+-- Stability   :  experimental+-- Portability :  to be determined+--+-- 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)\' } +-- +-----------------------------------------------------------------------------++module Data.Aviary.Birds+  ( +  -- * Data.Function combinators as birds+    idiot+  , kestrel+  , bluebird+  , cardinal+  , applicator+  , psi+  +  -- * Other birds (alphabetical)+  , becard+  , blackbird+  , bluebird'+  , bunting+  , cardinal'+  , cardinalstar+  , cardinalstarstar+  , dove+  , dickcissel+  , dovekie+  , eagle+  , eaglebald+  , finch+  , finchstar+  , finchstarstar+  , goldfinch+  , hummingbird+  , idstar+  , idstarstar+  , jalt+  , jalt'+  , jay+  , kite+  , owl+  , phoenix+  , quacky+  , queer+  , quirky+  , quixotic+  , quizzical+  , robin+  , robinstar+  , robinstarstar+  , starling+  , starling'+  , thrush+  , vireo+  , vireostar+  , vireostarstar+  , warbler+  , warbler1+  , warblerstar+  , warblerstarstar++  ) where++import Data.Function++--------------------------------------------------------------------------------+-- Combinators++-- Bird named versions from Data.Function+++++-- | I combinator - identity bird / idiot bird - Haskell 'id'.+idiot :: a -> a +idiot = id++-- | K combinator - kestrel - Haskell 'const'.+-- Corresponds to the encoding of @true@ in the lambda calculus.+kestrel :: a -> b -> a+kestrel = const++-- | B combinator - bluebird - Haskell ('.').+bluebird :: (b -> c) -> (a -> b) -> a -> c+bluebird = (.)+++-- | C combinator - cardinal - Haskell 'flip'.+cardinal :: (a -> b -> c) -> b -> a -> c+cardinal = flip++-- | A combinator - apply / applicator - Haskell ('$').+applicator :: (a -> b) -> a -> b+applicator = ($)++-- 'fix' - which Y is Haskell\'s fix? (certainly it\'s the least +-- fixed point)++-- | Psi combinator - psi bird (?) - Haskell 'on'.  +psi :: (b -> b -> c) -> (a -> b) -> a -> a -> c+psi = on++++--------------------------------------------------------------------------------+-- Other birds++++-- | B3 combinator - becard.+becard :: (c -> d) -> (b -> c) -> (a -> b) -> a -> d+becard f g h x = f (g (h x))++-- | B1 combinator - blackbird - specs 'oo'.+blackbird :: (c -> d) -> (a -> b -> c) -> a -> b -> d+blackbird f g x y = f (g x y)++-- | B' combinator - bluebird prime.+bluebird' :: (a -> c -> d) -> a -> (b -> c) -> b -> d+bluebird' f x g y = f x (g y)++-- | B2 combinator - bunting - specs 'ooo'.+bunting :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e+bunting f g x y z = f (g x y z)++++-- | C' combinator - no name.+cardinal' :: (c -> a -> d) -> (b -> c) -> a -> b -> d+cardinal' f g x y = f (g y) x++-- | C* combinator - cardinal once removed.+cardinalstar :: (a -> c -> b -> d) -> a -> b -> c -> d+cardinalstar f x y z = f x z y++-- | C** combinator - cardinal twice removed.+cardinalstarstar :: (a -> b -> d -> c -> e) -> a -> b -> c -> d -> e+cardinalstarstar f s t u v = f s t v u+++-- | D1 combinator - dickcissel.+dickcissel :: (a -> b -> d -> e) -> a -> b -> (c -> d) -> c -> e+dickcissel f x y g z = f x y (g z)+++-- | D combinator - dove.+dove :: (a -> c -> d) -> a -> (b -> c) -> b -> d+dove f x g y = f x (g y)+++-- | D2 combinator - dovekie.+dovekie :: (c -> d -> e) -> (a -> c) -> a -> (b -> d) -> b -> e+dovekie f g x h z = f (g x) (h z)++-- | E combinator - eagle.+eagle :: (a -> d -> e) -> a -> (b -> c -> d) -> b -> c -> e+eagle f x g y z = f x (g y z) ++-- | E \^ - bald eagle.+-- For alphabetical regularity it is somewhat misnamed here as +-- eaglebald.+eaglebald :: (e -> f -> g) +          -> (a -> b -> e) +          -> a -> b +          -> (c -> d -> f) +          -> c -> d -> g  +eaglebald f g s t h u v = f (g s t) (h u v)++++-- | F combinator - finch.+finch :: a -> b -> (b -> a -> c) -> c+finch x y f = f y x++-- | F* combinator - finch once removed.+finchstar :: (c -> b -> a -> d) -> a -> b -> c -> d+finchstar f x y z = f z y x++-- | F** combinator - finch once removed.+finchstarstar :: (a -> d -> c -> b -> e) -> a -> b -> c -> d -> e+finchstarstar f s t u v = f s v u t+++-- | G combinator - goldfinch.+goldfinch :: (b -> c -> d) -> (a -> c) -> a -> b -> d+goldfinch f g x y = f y (g x)++-- | H combinator - hummingbird.+hummingbird :: (a -> b -> a -> c) -> a -> b -> c +hummingbird f x y = f x y x+++-- | I* combinator - identity bird once removed+-- Alias of 'applicator', Haskell\'s ('$').+idstar :: (a -> b) -> a -> b+idstar f x = f x++-- | I** combinator - identity bird twice removed+idstarstar :: (a -> b -> c) -> a -> b -> c+idstarstar f x y = f x y+++-- | 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 -> c) -> a -> b -> c+jalt f x _y = f x+++-- | J' combinator - from Joy, Rayward-Smith and Burton.+-- See the comment to 'jalt'.+jalt' :: (a -> b -> d) -> a -> b -> c -> d+jalt' f x y _z = f x y++-- | J combinator - jay.+--+-- This is the usual J combinator.+jay :: (a -> b -> b) -> a -> b -> a -> b+jay f x y z = f x (f z y)+++-- | Ki - kite.+-- Corresponds to the encoding of @false@ in the lambda calculus.+kite :: a -> b -> b+kite _x y = y++-- | O combinator - owl.+owl :: ((a -> b) -> a) -> (a -> b) -> b+owl x y = y (x y)+++-- | (Big) Phi combinator - phoenix - Haskell 'liftM2'.+phoenix :: (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d+phoenix f g h x = f (g x) (h x)+++-- | Q4 combinator - quacky bird.+quacky :: a -> (a -> b) -> (b -> c) -> c +quacky x f g = g (f x)++-- | Q combinator - queer bird.+--+-- Haskell @(\#\#)@ in Peter Thiemann\'s Wash, reverse composition.+queer :: (a -> b) -> (b -> c) -> a -> c+queer f g x = g (f x)++-- | Q3 combinator - quirky bird.+quirky :: (a -> b) -> a -> (b -> c) -> c+quirky f x g = g (f x)+++-- | Q1 combinator - quixotic bird.+quixotic :: (b -> c) -> a -> (a -> b) -> c+quixotic f x g = f (g x)++-- | Q2 combinator - quizzical bird.+quizzical :: a -> (b -> c) -> (a -> b) -> c+quizzical x f g = f (g x)+++-- | R combinator - robin.+robin :: a -> (b -> a -> c) -> b -> c+robin x f y = f y x +++-- | R* combinator - robin once removed.+robinstar :: (b -> c -> a -> d) -> a -> b -> c -> d+robinstar f x y z = f y z x++-- | R* combinator - robin twice removed.+robinstarstar :: (a -> c -> d -> b -> e) -> a -> b -> c -> d -> e+robinstarstar f s t u v = f s u v t++-- | S combinator - starling. +-- +-- Haskell: Applicative\'s @(\<*\>)@ on functions.+--+-- Substitution.+starling :: (a -> b -> c) -> (a -> b) -> a -> c+starling f g x = f x (g x)+++-- | S' combinator - starling prime - Turner\'s big phi. +-- Haskell: Applicative\'s liftA2 on functions.+starling' :: (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d+starling' f g h x = f (g x) (h x)+++-- | T combinator - thrush.+-- Haskell @(\#)@ in Peter Thiemann\'s Wash, reverse application.+thrush :: a -> (a -> b) -> b+thrush x f = f x++-- | V combinator - vireo.+vireo :: a -> b -> (a -> b -> c) -> c+vireo x y f = f x y++-- | V* combinator - vireo once removed.+vireostar :: (b -> a -> b -> d) -> a -> b -> b -> d+vireostar f x y z = f y x z++-- | V** combinator - vireo twice removed.+vireostarstar :: (a -> c -> b -> c -> e) -> a -> b -> c -> c -> e+vireostarstar f s t u v = f s v t u+++-- | W combinator - warbler - elementary duplicator.+warbler :: (a -> a -> b) -> a -> b+warbler f x = f x x++-- | W1 combinator - converse warbler.+-- 'warbler' with the arguments reversed.+warbler1 :: a -> (a -> a -> b) -> b+warbler1 x f = f x x++-- | W* combinator - warbler once removed.+warblerstar :: (a -> b -> b -> c) -> a -> b -> c+warblerstar f x y = f x y y++-- | W** combinator - warbler twice removed.+warblerstarstar :: (a -> b -> c -> c -> d) -> a -> b -> c -> d+warblerstarstar f x y z = f x y z z
+ src/Data/Aviary/BirdsInter.hs view
@@ -0,0 +1,363 @@+{-# OPTIONS -Wall #-}++-----------------------------------------------------------------------------+-- |+-- Module      :  Data.Aviary.BirdsInter+-- Copyright   :  (c) Stephen Peter Tetley 2009+-- License     :  BSD3+--+-- Maintainer  :  stephen.tetley@gmail.com+-- Stability   :  experimental+-- Portability :  to be determined+--+-- Bird monickered combinators interdefined.+-- +-- 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)\' } +--+-----------------------------------------------------------------------------++module Data.Aviary.BirdsInter+  ( +  -- * Data.Function combinators as birds+    idiot+  , kestrel+  , bluebird+  , cardinal+  , applicator+  , psi+  +  -- * Other birds (alphabetical)+  , becard+  , blackbird+  , bluebird'+  , bunting+  , cardinal'+  , cardinalstar+  , cardinalstarstar+  , dove+  , dickcissel+  , dovekie+  , eagle+  , eaglebald+  , finch+  , finchstar+  , finchstarstar+  , goldfinch+  , hummingbird+  , idstar+  , idstarstar+  , jalt+  , jalt'+  , jay+  , kite+  , owl+  , phoenix+  , quacky+  , queer+  , quirky+  , quixotic+  , quizzical+  , robin+  , robinstar+  , robinstarstar+  , starling+  , starling'+  , thrush+  , vireo+  , vireostar+  , vireostarstar+  , warbler+  , warbler1+  , warblerstar+  , warblerstarstar++  ) where++++--------------------------------------------------------------------------------+-- Combinators++-- Bird named versions from Data.Function+++++-- | I combinator - identity bird / idiot bird - Haskell 'id'.+idiot :: a -> a +idiot = starling kestrel kestrel ++-- | K combinator - kestrel - Haskell 'const'.+-- Corresponds to the encoding of @true@ in the lambda calculus.+--+-- Not interdefined.+kestrel :: a -> b -> a+kestrel a _b = a ++-- | B combinator - bluebird - Haskell ('.').+bluebird :: (b -> c) -> (a -> b) -> a -> c+bluebird = starling (kestrel starling) kestrel+++-- | C combinator - cardinal - Haskell 'flip'.+cardinal :: (a -> b -> c) -> b -> a -> c+cardinal = starling (bluebird bluebird starling) (kestrel kestrel)++-- | A combinator - apply / applicator - Haskell ('$').+--+-- Note: the definition here is @- C (B B I) I -@ and not the +-- familiar @- S (S K) -@ which as far as Haskell is concerned+-- has a different type. +-- +-- @ (S(SK)) :: ((a -> b) -> a) -> (a -> b) -> a @+applicator :: (a -> b) -> a -> b+applicator = cardinal (bluebird bluebird idiot) idiot++++-- 'fix' - which Y is Haskell\'s fix? (certainly it\'s the least +-- fixed point)++-- | Psi combinator - psi bird (?) - Haskell 'on'.  +psi :: (b -> b -> c) -> (a -> b) -> a -> a -> c+psi = c (b s (b (b c) (b (b (b b)) (c (b b (b b i)) (c (b b i) i))))) (c (b b i) i)+  where+    c = cardinal+    b = bluebird+    s = starling+    i = idiot++  -- TODO - This definition was built with a combinator calculator+  -- For sanity it ought to be reduced ++--------------------------------------------------------------------------------+-- Other birds++++-- | B3 combinator - becard.+becard :: (c -> d) -> (b -> c) -> (a -> b) -> a -> d+becard = bluebird (bluebird bluebird) bluebird++-- | B1 combinator - blackbird - specs 'oo'.+blackbird :: (c -> d) -> (a -> b -> c) -> a -> b -> d+blackbird = bluebird bluebird bluebird+++-- | B' combinator - bluebird prime.+bluebird' :: (a -> c -> d) -> a -> (b -> c) -> b -> d+bluebird' = bluebird bluebird+++-- | B2 combinator - bunting - specs 'ooo'.+bunting :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e+bunting = bluebird (bluebird bluebird bluebird) bluebird++++-- | C' combinator - no name.+cardinal' :: (c -> a -> d) -> (b -> c) -> a -> b -> d+cardinal' = bluebird (bluebird cardinal) bluebird++-- | C* combinator - cardinal once removed.+cardinalstar :: (a -> c -> b -> d) -> a -> b -> c -> d+cardinalstar = bluebird cardinal++-- | C** combinator - cardinal twice removed.+cardinalstarstar :: (a -> b -> d -> c -> e) -> a -> b -> c -> d -> e+cardinalstarstar = bluebird cardinalstar+++-- | D1 combinator - dickcissel.+dickcissel :: (a -> b -> d -> e) -> a -> b -> (c -> d) -> c -> e+dickcissel = bluebird (bluebird bluebird)+++-- | D combinator - dove.+dove :: (a -> c -> d) -> a -> (b -> c) -> b -> d+dove = bluebird bluebird+++-- | D2 combinator - dovekie.+dovekie :: (c -> d -> e) -> (a -> c) -> a -> (b -> d) -> b -> e+dovekie = bluebird bluebird (bluebird bluebird)++-- | E combinator - eagle.+eagle :: (a -> d -> e) -> a -> (b -> c -> d) -> b -> c -> e+eagle = bluebird (bluebird bluebird bluebird) +++-- | E \^ - bald eagle.+-- For alphabetical regularity it is somewhat misnamed here as +-- eaglebald.+eaglebald :: (e -> f -> g) +          -> (a -> b -> e) +          -> a -> b +          -> (c -> d -> f) +          -> c -> d -> g  +eaglebald = +    bluebird (bluebird bluebird bluebird) (bluebird (bluebird bluebird bluebird))++++-- | F combinator - finch.+finch :: a -> b -> (b -> a -> c) -> c+finch = eagle thrush thrush eagle thrush++-- | F* combinator - finch once removed.+finchstar :: (c -> b -> a -> d) -> a -> b -> c -> d+finchstar = bluebird cardinalstar robinstar ++-- | F** combinator - finch once removed.+finchstarstar :: (a -> d -> c -> b -> e) -> a -> b -> c -> d -> e+finchstarstar = bluebird finchstar+++-- | G combinator - goldfinch.+goldfinch :: (b -> c -> d) -> (a -> c) -> a -> b -> d+goldfinch = bluebird bluebird cardinal++-- | H combinator - hummingbird.+hummingbird :: (a -> b -> a -> c) -> a -> b -> c +hummingbird = bluebird warbler (bluebird cardinal)++-- | I* combinator - identity bird once removed.+-- Alias of 'applicator', Haskell\'s ('$').+-- Type signature +idstar :: (a -> b) -> a -> b+idstar = cardinal (bluebird bluebird idiot) idiot+++-- | I** combinator - identity bird twice removed.+idstarstar :: (a -> b -> c) -> a -> b -> c+idstarstar = bluebird idstar++-- | 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 -> c) -> a -> b -> c+jalt = bluebird kestrel+++-- | J' combinator - from Joy, Rayward-Smith and Burton.+-- See the comment to 'jalt'.+jalt' :: (a -> b -> d) -> a -> b -> c -> d+jalt' = bluebird (bluebird kestrel)+++-- | J combinator - jay.+--+-- This is the usual J combinator.+jay :: (a -> b -> b) -> a -> b -> a -> b+jay = bluebird (bluebird cardinal) +               (warbler (bluebird cardinal +                                  (bluebird (bluebird bluebird bluebird))))+++-- | Ki - kite.+-- Corresponds to the encoding of @false@ in the lambda calculus.+kite :: a -> b -> b+kite = kestrel idiot++-- | O combinator - owl.+owl :: ((a -> b) -> a) -> (a -> b) -> b+owl = starling idiot+++-- | (Big) Phi combinator - phoenix - Haskell 'liftM2'.+phoenix :: (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d+phoenix = bluebird (bluebird starling) bluebird+++-- | Q4 combinator - quacky bird.+quacky :: a -> (a -> b) -> (b -> c) -> c +quacky = finchstar bluebird++-- | Q combinator - queer bird.+--+-- Haskell @(\#\#)@ in Peter Thiemann\'s Wash, reverse composition.+queer :: (a -> b) -> (b -> c) -> a -> c+queer = cardinal bluebird++-- | Q3 combinator - quirky bird.+quirky :: (a -> b) -> a -> (b -> c) -> c+quirky = bluebird thrush++-- | Q1 combinator - quixotic bird.+quixotic :: (b -> c) -> a -> (a -> b) -> c+quixotic = bluebird cardinal bluebird++-- | Q2 combinator - quizzical bird.+quizzical :: a -> (b -> c) -> (a -> b) -> c+quizzical = cardinal (bluebird cardinal bluebird)+++-- | R combinator - robin.+robin :: a -> (b -> a -> c) -> b -> c+robin = bluebird bluebird thrush+++-- | R* combinator - robin once removed.+robinstar :: (b -> c -> a -> d) -> a -> b -> c -> d+robinstar = cardinalstar cardinalstar++-- | R** combinator - robin twice removed.+robinstarstar :: (a -> c -> d -> b -> e) -> a -> b -> c -> d -> e+robinstarstar = bluebird robinstar+++-- | S combinator - starling. +-- +-- Haskell: Applicative\'s @(\<*\>)@ on functions.+--+-- Not interdefined.+starling :: (a -> b -> c) -> (a -> b) -> a -> c+starling f g x = f x (g x)+++-- | S' combinator - starling prime - Turner\'s big phi. +-- Haskell: Applicative\'s liftA2 on functions.+starling' :: (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d+starling' = bluebird (bluebird starling) bluebird+++-- | T combinator - thrush.+-- Haskell @(\#)@ in Peter Thiemann\'s Wash, reverse application.+thrush :: a -> (a -> b) -> b+thrush = cardinal idiot++-- | V combinator - vireo.+vireo :: a -> b -> (a -> b -> b) -> b+vireo = bluebird cardinal thrush++-- | V* combinator - vireo once removed.+vireostar :: (b -> a -> b -> d) -> a -> b -> b -> d+vireostar = cardinalstar finchstar++-- | V** combinator - vireo twice removed.+vireostarstar :: (a -> c -> b -> c -> e) -> a -> b -> c -> c -> e+vireostarstar = bluebird vireostar+++-- | W combinator - warbler - elementary duplicator.+warbler :: (a -> a -> b) -> a -> b+warbler = cardinal starling idiot++-- | W1 combinator - converse warbler.+-- 'warbler' with the arguments reversed.+warbler1 :: a -> (a -> a -> b) -> b+warbler1 = cardinal warbler++-- | W* combinator - warbler once removed.+warblerstar :: (a -> b -> b -> c) -> a -> b -> c+warblerstar = bluebird warbler++-- | W** combinator - warbler twice removed.+warblerstarstar :: (a -> b -> c -> c -> d) -> a -> b -> c -> d+warblerstarstar = bluebird warblerstar