module Data.Function.Combinator.Birds
( bluebird
, blackbird
, bunting
, becard
, cardinal
, dove
, dickcissel
, dovekies
, eagle
, baldEagle
, finch
, goldFinch
, hummingbird
, idiot
, jay
, kestrel
, lark
, mockingbird
, doubleMockingbird
, owl
, queerbird
, quixoticbird
, quizzicalbird
, quirkybird
, quackybird
, robin
, starling
, thrush
, turing
, vireo
, warbler
, converseWarbler
, whybird
, idiot'
, warbler'
, cardinal'
, robin'
, finch'
, vireo'
, idiot''
, warbler''
, cardinal''
, robin''
, finch''
, vireo''
, kite
, konstantMocker
, crossedKonstantMocker
, theta
) where
import Unsafe.Coerce (unsafeCoerce)
bluebird :: (b -> c) -> (a -> b) -> a -> c
bluebird f g x = f (g x)
blackbird :: (c -> d) -> (a -> b -> c) -> a -> b -> d
blackbird f g x y = f (g x y)
bunting :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e
bunting f g x y z = f (g x y z)
becard :: (c -> d) -> (b -> c) -> (a -> b) -> a -> d
becard f g h x = f (g ( h x))
cardinal :: (a -> b -> c) -> b -> a -> c
cardinal f x y = f y x
dove :: (a -> c -> d) -> a -> (b -> c) -> b -> d
dove f x g y = f x (g y)
dickcissel :: (a -> b -> c -> d) -> a -> b -> (e -> c) -> e -> d
dickcissel f x y g z = f x y (g z)
dovekies :: (a -> b -> c) -> (d -> a) -> d -> (e -> b) -> e -> c
dovekies f g x h y = f (g x) (h y)
eagle :: (a -> b -> c) -> a -> (d -> e -> b) -> d -> e -> c
eagle f x g y z = f x (g y z)
baldEagle :: (a -> b -> c) -> (d -> e -> a) -> d -> e -> (f -> g -> b) -> f -> g -> c
baldEagle f g x y h v w = f (g x y) (h v w)
finch :: b -> a -> (a -> b -> c) -> c
finch x y f = f y x
goldFinch :: (a -> b -> c) -> (d -> b) -> d -> a -> c
goldFinch f g x y = f y (g x)
hummingbird :: (a -> b -> a -> c) -> a -> b -> c
hummingbird f x y = f x y x
idiot :: a -> a
idiot x = x
jay :: (a -> b -> b) -> a -> a -> b -> b
jay f x y z = f x (f y z)
kestrel :: a -> b -> a
kestrel x _ = x
lark :: (b -> c) -> (a -> b) -> c
lark f g = f (g g') where g' = unsafeCoerce g
mockingbird :: (a -> b) -> b
mockingbird x = x x' where x' = unsafeCoerce x
doubleMockingbird :: (a -> b -> c) -> a -> c
doubleMockingbird f x = mockingbird (f x)
owl :: ((a -> b) -> a) -> (a -> b) -> b
owl f g = g (f g)
queerbird :: (a -> b) -> (b -> c) -> a -> c
queerbird f g x = g (f x)
quixoticbird :: (a -> b) -> c -> (c -> a) -> b
quixoticbird f x g = f (g x)
quizzicalbird :: a -> (b -> c) -> (a -> b) -> c
quizzicalbird x f g = f (g x)
quirkybird :: (a -> b) -> a -> (b -> c) -> c
quirkybird f x g = g (f x)
quackybird :: a -> (a -> b) -> (b -> c) -> c
quackybird x f g = g (f x)
robin :: b -> (a -> b -> c) -> a -> c
robin x f y = f y x
starling :: (a -> b -> c) -> (a -> b) -> a -> c
starling f g x = f x (g x)
thrush :: a -> (a -> b) -> b
thrush x f = f x
turing :: (a -> (b -> c) -> b) -> (b -> c) -> c
turing f g = g (f f' g) where f' = unsafeCoerce f
vireo :: a -> b -> (a -> b -> c) -> c
vireo x y f = f x y
warbler :: (a -> a -> b) -> a -> b
warbler f x = f x x
converseWarbler :: a -> (a -> a -> b) -> b
converseWarbler = cardinal warbler
whybird :: (x -> x) -> x
whybird x = x (whybird x)
idiot' :: ((a -> b) -> a) -> (a -> b) -> a
idiot' f g = f g
warbler' :: (a -> b -> b -> c) -> a -> b -> c
warbler' f x y = f x y y
cardinal' :: (a -> b -> c -> d) -> a -> c -> b -> d
cardinal' f x y z = f x z y
robin' :: (a -> b -> c -> d) -> c -> a -> b -> d
robin' f x y z = f y z x
finch' :: (a -> b -> c -> d) -> c -> b -> a -> d
finch' f x y z = f z y x
vireo' :: (a -> b -> c -> d) -> b -> a -> c -> d
vireo' f x y z = f y x z
idiot'' :: (a -> b -> c) -> a -> b -> c
idiot'' f g h = f g h
warbler'' :: (a -> b -> c -> c -> d) -> a -> b -> c -> d
warbler'' f x y z = f x y z z
cardinal'' :: (a -> b -> c -> d -> e) -> a -> b -> d -> c -> e
cardinal'' f x y z w = f x y w z
robin'' :: (a -> b -> c -> d -> e) -> a -> d -> b -> c -> e
robin'' f x y z w = f x z w y
finch'' :: (a -> b -> c -> d -> e) -> a -> d -> c -> b -> e
finch'' f x y z w = f x w z y
vireo'' :: (a -> b -> c -> d -> e) -> a -> c -> d -> b -> e
vireo'' f x y z w = f x w y z
kite :: a -> b -> b
kite _ y = y
konstantMocker :: c -> (a -> b) -> b
konstantMocker = kestrel mockingbird
crossedKonstantMocker :: (a -> b) -> c -> b
crossedKonstantMocker = cardinal konstantMocker
theta :: (a -> a) -> a
theta = whybird owl