Coder Social home page Coder Social logo

fantasy-birds's Introduction

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

A combinator or apply

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

B3 combinator or function composition (for three functions)

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

B1 combinator

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

B combinator or function composition

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

B' combinator

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

B2 combinator

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

C combinator or flip

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

C' combinator

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

C* combinator - cardinal once removed.

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

C** combinator - cardinal twice removed.

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

D1 combinator

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

D combinator

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

D2 combinator

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

E combinator

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

E^ combinator

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

F combinator

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

identity

> idiot('bird')
'bird'

K combinator or const

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

PSI combinator or on

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.