port of the haskell package Data.Aviary.Birds. Every thing for your combinatory needs.
JavaScript
Latest commit 6f37c6e Mar 2, 2016 @stoeffel stoeffel update readme
Permalink
Failed to load latest commit information.
src adds example for finch Mar 2, 2016
test algin with fantasy repo structure Feb 17, 2016
.gitignore initial Feb 15, 2016
.travis.yml initial Feb 15, 2016
README.md update readme Mar 2, 2016
README.md.header update readme Feb 16, 2016
fantasy-birds.js algin with fantasy repo structure Feb 17, 2016
package.json Version 0.1.0 Feb 24, 2016

README.md

Fantasy Birds

General

This is a port of the haskell package Data.Aviary.Birds. Every thing for your combinatory needs.

Check out the docs to see all available birds.

Build Status npm version dependecies

Ornithology

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

A combinator or apply

> applicator(x => x + 1)(3)
4

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

B3 combinator or function composition (for three functions)

> becard(x => x * -1)(x => x * 2)(x => x - 1)(3)
-4

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

B1 combinator

> blackbird(x => x * -1)(x => y => x + y)(3)(5)
-8

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

B combinator or function composition

> bluebird(x => x * 2)(x => x - 1)(3)
4

bluebird_ :: (a -> c -> d) -> a -> (b -> c) -> b -> d

B' combinator

> bluebird_(x => y => x * y)(2)(x => x + 1)(2)
6

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

B2 combinator

> bunting(x =>  x * -1)(x => y => z => x + y + z)(1)(2)(3)
-6

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

C combinator or flip

> cardinal(str => prefix => prefix + str)('-')('birds')
'-birds'

cardinal_ :: (c -> a -> d) -> (b -> c) -> a -> b -> d

C' combinator

> cardinal_(x => y => x * y)(x => x + 1)(2)(3)
8

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

C* combinator - cardinal once removed.

> cardinalstar(str => prefix => postfix => prefix + str + postfix)('birds')('!')('-')
'-birds!'

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

C** combinator - cardinal twice removed.

> cardinalstarstar(a => b => separator => postfix => a + separator + b + postfix)('fantasy')('birds')('!')('-')
'fantasy-birds!'

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

D1 combinator

> dickcissel(prefix => postfix => str => prefix + str + postfix)('-')('!')(x => x.toUpperCase())('birds')
'-BIRDS!'

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

D combinator

> dove(postfix => str => str + postfix)('!')(x => x.toUpperCase())('birds')
'BIRDS!'

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

D2 combinator

> dovekie(prefix => str => prefix + str)(x => x.toUpperCase())('fantasy-')(x => x.toLowerCase())('BIRDS')
'FANTASY-birds'

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

E combinator

> eagle(prefix => str => prefix + str)('-')(str => postfix => str + postfix)('birds')('!')
'-birds!'

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

E^ combinator

> eaglebald(x => y => y + x)(a => b => b + a)('!')('birds')(a => b => a + b)('fantasy')('-')
'fantasy-birds!'

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

F combinator

> finch(-1, 3)(x => y => x * y)
-3

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

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

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

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

idiot :: a -> a

identity

> idiot('bird')
'bird'

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

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

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

jalt_ :: (a -> b -> d) -> a -> b -> c -> d

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

kestrel :: a -> b -> a

K combinator or const

> kestrel('bird')('cat')
'bird'

kite :: a -> b -> b

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

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

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

PSI combinator or on

> psi(x => y => x + y)(x => x * -1)(3)(5)
-8

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

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

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

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

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

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

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

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

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

starling_ :: (b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d

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

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

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

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

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

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

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

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