[{"name":"Aviary.Birds","comment":" This library exposes an elm implementation of the birds from combinatory logic.\n\nEach bird in the Aviary represents a [function composition pattern](https://en.wikipedia.org/wiki/Function_composition) and each bird is implemented, as far as is possible, using [SKI combinator calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus) under the hood.\n\n\n# Usage\n\nTo import all birds, add the following at the top of your file:\n\n    import Aviary.Birds exposing (..)\n\nYou can also just import specific birds such as the [Kestrel](#kestrel) and [Psi](#psi) for example:\n\n    import Aviary.Birds exposing (kestrel, psi)\n\n\n# Birds\n\n@docs identity, kestrel, bluebird, cardinal, applicator, psi, becard, blackbird, bluebirdPrime, bunting, cardinalPrime, cardinalStar, cardinalStarStar, dickcissel, dove, dovekie, eagle, eaglebald, finch, finchStar, finchStarStar, goldfinch, hummingbird, identityStar, identityStarStar, jayStar, jayPrime, jay, kite, owl, phoenix, quacky, queer, quirky, quixotic, quizzical, robin, robinStar, robinStarStar, starling, starlingPrime, thrush, vireo, vireoStar, vireoStarStar, warbler, warbler1, warblerStar, warblerStarStar\n\n","unions":[],"aliases":[],"values":[{"name":"applicator","comment":" Applicator.\n\nCalls a given function with a given argument.\n\nSometimes referred to as \"the reverse pipe operator\".\n\nThe equivilent of the \"pipe left\" operator `(<|)` in Elm.\n\n    applicator String.fromInt 1 == \"1\"\n\n    applicator List.sum [ 1, 2, 3 ] == 6\n\n    applicator Result.fromMaybe Nothing == Err\n\n","type":"(a -> b) -> a -> b"},{"name":"becard","comment":" Becard.\n\nTriple composition of a given value.\n\n    becard (\\n -> n + 15) (\\n -> n - 10) (\\n -> n * 2) 50 --> 105\n\n    becard (Aviary.Birds.cardinal String.append \"1\") ((++) \"2\") String.fromInt 50 --> \"2501\"\n\n","type":"(c -> d) -> (b -> c) -> (a -> b) -> a -> d"},{"name":"blackbird","comment":" Blackbird.\n\n    blackbird String.toFloat String.append \"3\" \".14\" --> Just 3.14\n\n    blackbird (modBy 2) (\\x y -> x * y) 2 3 --> 0\n\n","type":"(b -> c) -> (a -> d -> b) -> a -> d -> c"},{"name":"bluebird","comment":" Bluebird.\n\nComposes the given functions with the final value.\n\nThe equivilent of the composition operator `(<<)` in Elm.\n\n    isEven : Int -> Bool\n    isEven n = modBy 2 n == 0\n\n    double : number -> number\n    double = ((*) 2)\n\n    bluebird not isEven 2 --> False\n    bluebird not isEven 1 --> True\n    bluebird String.fromInt double 4 --> \"8\"\n\n","type":"(b -> c) -> (a -> b) -> a -> c"},{"name":"bluebirdPrime","comment":" Bluebird prime.\n\n    bluebirdPrime (+) 1 Aviary.Birds.identity 2 --> 3\n\n    bluebirdPrime (++) [ 1, 2, 3 ] List.singleton 4 --> [1, 2, 3, 4]\n\n","type":"(a -> c -> d) -> a -> (b -> c) -> b -> d"},{"name":"bunting","comment":" Bunting.\n\n    createUser : String -> Int -> Bool -> { name : String , age : Int , online : Bool }\n    createUser name age online = {\n        name = name ,\n        age = age ,\n        online = online\n        }\n\n    incrementUserAge : { name : String , age : Int , online : Bool } -> { name : String , age : Int , online : Bool }\n    incrementUserAge user =\n        { user | age = user.age + 1 }\n\n    bunting List.sum (\\x y z -> [x, y, z]) 1 2 3 --> 6\n    bunting incrementUserAge createUser \"John\" 36 True --> { name = \"John\", age = 37, online = True }\n\n","type":"(d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e"},{"name":"cardinal","comment":" Cardinal, also known as \"flip\".\n\nTakes a binary function and two further arguments which are then applied inversely.\n\n    multiplyList : List Int -> Int -> List Int\n    multiplyList items multiple =\n        List.map ((*) multiple) items\n\n    cardinal multiplyList 10 [1, 2, 3] --> [10, 20, 30]\n\nUseful in pipelines where the piped value is required to be the first argument to a function.\n\n    [1, 2, 3]\n        |> cardinal multiplyList 5\n        |> List.sum\n    --> 30\n\n","type":"(a -> b -> c) -> b -> a -> c"},{"name":"cardinalPrime","comment":" Cardinal Prime.\n\n    cardinalPrime (+) ((-) 1) 5 10 --> -4\n\n    cardinalPrime List.append List.singleton [ 3, 2, 1 ] 4 --> [4, 3, 2, 1]\n\n","type":"(c -> a -> d) -> (b -> c) -> a -> b -> d"},{"name":"cardinalStar","comment":" Cardinal once removed.\n\nFlips the third and fourth arguments when applied to the given ternary function.\n\n    cardinalStar Basics.clamp 100 200 150 --> 150\n\n    cardinalStar (\\four six three -> four + six * three) 4 3 6 --> 22\n\n","type":"(a -> c -> b -> d) -> a -> b -> c -> d"},{"name":"cardinalStarStar","comment":" Cardinal twice removed.\n\nFlips the fourth and fifth arguments when applied to the given quaternary function.\n\n    cardinalStarStar (\\two four six three -> (two - four + six) * three) 2 4 3 6 --> 12\n\n","type":"(a -> b -> d -> c -> e) -> a -> b -> c -> d -> e"},{"name":"dickcissel","comment":" Dickcissel.\n\n    dickcissel Basics.clamp 100 200 ((*) 2) 110 --> 200\n\n","type":"(a -> b -> d -> e) -> a -> b -> (c -> d) -> c -> e"},{"name":"dove","comment":" Dove.\n\n    dove (+) 5 Basics.identity 2 --> 7\n\n","type":"(a -> c -> d) -> a -> (b -> c) -> b -> d"},{"name":"dovekie","comment":" Dovekie.\n\n    dovekie (+) Basics.identity 2 ((*) 2) 11 --> 24\n\n","type":"(c -> d -> e) -> (a -> c) -> a -> (b -> d) -> b -> e"},{"name":"eagle","comment":" Eagle.\n\n    eagle (+) 6 (*) 2 3 --> 12\n\n","type":"(a -> d -> e) -> a -> (b -> c -> d) -> b -> c -> e"},{"name":"eaglebald","comment":" Bald eagle.\n\n    eaglebald (+) (-) 50 25 (*) 3 2 --> 31\n\n","type":"(e -> f -> g) -> (a -> b -> e) -> a -> b -> (c -> d -> f) -> c -> d -> g"},{"name":"finch","comment":" Finch.\n\n    finch 6 2 (-) --> -4\n\n    finch \"Hi\" 3 String.repeat --> \"HiHiHi\"\n\n","type":"a -> b -> (b -> a -> c) -> c"},{"name":"finchStar","comment":" Finch once removed.\n\nReverses the second, third and fourth arguments when applied to the given ternary function.\n\n    finchStar Basics.clamp 120 200 100 --> 120\n\n","type":"(c -> b -> a -> d) -> a -> b -> c -> d"},{"name":"finchStarStar","comment":" Finch twice removed.\n\nFlips the third and fifth arguments when applied to the given quaternary function.\n\n    finchStar Basics.clamp 120 200 100 --> 120\n\n","type":"(a -> d -> c -> b -> e) -> a -> b -> c -> d -> e"},{"name":"goldfinch","comment":" Goldfinch.\n\n    goldfinch (+) ((*) 2) 6 1 --> 13\n\n","type":"(b -> c -> d) -> (a -> c) -> a -> b -> d"},{"name":"hummingbird","comment":" Hummingbird.\n\n    hummingbird (\\x1 y x2 -> ( x1, x2, y )) 1 2 --> (1, 1, 2)\n\n","type":"(a -> b -> a -> c) -> a -> b -> c"},{"name":"identity","comment":" Identity, also known as \"idiot\".\n\nReturns whatever it is given.\n\n    Aviary.Birds.identity 1 --> 1\n    Aviary.Birds.identity [1, 2, 3] --> [1, 2, 3]\n    Aviary.Birds.identity String.fromInt = String.fromInt\n\n","type":"a -> a"},{"name":"identityStar","comment":" Identity bird once removed.\n\n    identityStar (\\n -> n - 1) 10 --> 9\n\n","type":"(a -> b) -> a -> b"},{"name":"identityStarStar","comment":" Identity bird twice removed\n\n    identityStarStar (\\n m -> n - m) 10 4 --> 6\n\n","type":"(a -> b -> c) -> a -> b -> c"},{"name":"jay","comment":" Jay.\n\n    jay (+) 10 20 40 --> 70\n\n","type":"(a -> b -> b) -> a -> b -> a -> b"},{"name":"jayPrime","comment":" Jay Prime.\n\n    jayPrime (+) 10 20 40 --> 30\n\n","type":"(a -> b -> d) -> a -> b -> c -> d"},{"name":"jayStar","comment":" Jay once removed.\n\n    jayStar Basics.identity 10 20 --> 10\n\n","type":"(a -> c) -> a -> b -> c"},{"name":"kestrel","comment":" Kestrel.\n\nReturns the first argument provided, ignoring the second.\n\n    kestrel \"hello\" 2 --> \"hello\"\n\n    kestrel Nothing [ 1, 2, 3 ] --> Nothing\n\n    kestrel String.fromInt (Just 2) --> String.fromInt\n\n","type":"a -> b -> a"},{"name":"kite","comment":" Kite.\n\nReturns the second argument provided, ignoring the first.\n\n    kite \"hello\" 2 --> 2\n\n    kite Nothing [ 1, 2, 3 ] --> [ 1, 2, 3 ]\n\n    kite String.fromInt (Just 2) --> Just 2\n\n","type":"a -> b -> b"},{"name":"owl","comment":" Owl.\n\n    owl (\\f -> f 2 6) (+) 5 --> 13\n\n","type":"((a -> b) -> a) -> (a -> b) -> b"},{"name":"phoenix","comment":" Phoenix.\n\nThis is equivilant to the [Starling Prime](#starlingPrime) combinator.\n\n    phoenix (+) ((*) 2) ((-) 3) 5 --> 8\n\n","type":"(b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d"},{"name":"psi","comment":" Psi.\n\nTransforms two inputs and combines the outputs.\n\nEquivelent of the [on](https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Function.html#v:on) operator in Haskell.\n\n    add : number -> number -> number\n    add = (+)\n\n    double : number -> number\n    double = ((*) 2)\n\n    psi add double 3 12 --> 30\n\n","type":"(b -> b -> c) -> (a -> b) -> a -> a -> c"},{"name":"quacky","comment":" Quacky bird.\n\n    quacky 10 ((+) 2) ((*) 4) --> 48\n\n    quacky \"John\" String.toUpper (\\name -> \"My name is \" ++ name) --> \"My name is JOHN\"\n\n","type":"a -> (a -> b) -> (b -> c) -> c"},{"name":"queer","comment":" Queer bird.\n\nReverse function composition.\n\n    queer ((+) 2) ((*) 4) 10 --> 48\n\n    queer String.toUpper (\\name -> \"My name is \" ++ name) \"John\" --> \"My name is JOHN\"\n\n","type":"(a -> b) -> (b -> c) -> a -> c"},{"name":"quirky","comment":" Quirky bird.\n\n    quirky ((+) 2) 10 ((*) 4) --> 48\n\n    quirky String.toUpper \"John\" (\\name -> \"My name is \" ++ name) --> \"My name is JOHN\"\n\n","type":"(a -> b) -> a -> (b -> c) -> c"},{"name":"quixotic","comment":" Quixotic bird.\n\n    quixotic ((+) 2) 10 ((*) 4) --> 42\n\n    quixotic String.toUpper \"John\" (\\name -> \"My name is \" ++ name) --> \"MY NAME IS JOHN\"\n\n","type":"(b -> c) -> a -> (a -> b) -> c"},{"name":"quizzical","comment":" Quizzical bird.\n\n    quizzical 10 ((+) 2) ((*) 4) --> 42\n\n    quizzical \"John\" String.toUpper (\\name -> \"My name is \" ++ name) --> \"MY NAME IS JOHN\"\n\n","type":"a -> (b -> c) -> (a -> b) -> c"},{"name":"robin","comment":" Robin.\n\n    robin 10 (-) 12 --> 2\n\n    robin \"second\" (\\a b -> a ++ \" \" ++ b) \"first\" --> \"first second\"\n\n","type":"a -> (b -> a -> c) -> b -> c"},{"name":"robinStar","comment":" Robin once removed.\n\n    robinStar Basics.clamp 10 100 200 --> 100\n\n    robinStar Basics.clamp 110 100 200 --> 110\n\n    robinStar Basics.clamp 220 100 200 --> 200\n\n","type":"(b -> c -> a -> d) -> a -> b -> c -> d"},{"name":"robinStarStar","comment":" Robin twice removed.\n\n    robinStarStar (\\six nine ten four -> six - nine + ten * four) 6 4 9 10 --> 37\n\n","type":"(a -> c -> d -> b -> e) -> a -> b -> c -> d -> e"},{"name":"starling","comment":" Starling.\n\n    starling (+) ((*) 2) 10 --> 30\n\n    starling (-) (\\v -> v * 7) 4 --> -24\n\n    starling (\\user newAge -> { user | age = newAge }) (\\user -> user.age + 1) { age = 35 } --> { age = 36 }\n\n","type":"(a -> b -> c) -> (a -> b) -> a -> c"},{"name":"starlingPrime","comment":" Starling Prime.\n\n    starlingPrime (+) ((*) 2) ((-) 3) 5 --> 8\n\n","type":"(b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d"},{"name":"thrush","comment":" Thrush.\n\nSometimes referred to as \"the forward pipe operator\".\n\nThe equivilent of the \"pipe right\" operator `(|>)` in Elm.\n\n    thrush 1 Basics.identity --> 1\n\n    thrush 20 ((+) 2) --> 22\n\n    thrush \"Hello\" (\\v -> v ++ \" world!\") --> \"Hello world!\"\n\n","type":"a -> (a -> b) -> b"},{"name":"vireo","comment":" Vireo.\n\n    vireo 1 2 (+) --> 3\n\n    vireo 3 \"Hello\" String.repeat --> \"HelloHelloHello\"\n\n","type":"a -> b -> (a -> b -> c) -> c"},{"name":"vireoStar","comment":" Vireo once removed.\n\n    vireoStar (\\two one three -> one + two - three) 1 2 3 --> 0\n\n","type":"(b -> a -> b -> d) -> a -> b -> b -> d"},{"name":"vireoStarStar","comment":" Vireo twice removed.\n\n    vireoStarStar (\\one four two three -> (one + two) - (three + four)) 1 2 3 4 --> -4\n\n","type":"(a -> c -> b -> c -> e) -> a -> b -> c -> c -> e"},{"name":"warbler","comment":" Warbler.\n\nProvides a given argument as both values to a given binary function.\n\n    warbler (+) 2 --> 4\n\n","type":"(a -> a -> b) -> a -> b"},{"name":"warbler1","comment":" Converse warbler.\n\nThe [warbler](#warbler) but with the input arguments reversed.\n\n    warbler1 2 (+) --> 4\n\n","type":"a -> (a -> a -> b) -> b"},{"name":"warblerStar","comment":" Warbler once removed.\n\n    warblerStar (\\x y z -> [ x, y, z ]) 1 2 --> [1, 2, 2]\n\n","type":"(a -> b -> b -> c) -> a -> b -> c"},{"name":"warblerStarStar","comment":" Warbler twice removed.\n\n    warblerStarStar (\\w x y z -> [ w, x, y, z ]) 1 2 3 --> [1, 2, 3, 3]\n\n","type":"(a -> b -> c -> c -> d) -> a -> b -> c -> d"}],"binops":[]}]