[{"name":"Combinators","comment":"\n\n@docs a, b, b1, b2, b3, bp, c, cp, cs, css, d, d1, d2, e, eb, f, fs, fss, g, h, i, is, iss, j, js, jp, k, ki, o, p, px, q, q1, q2, q3, q4, r, rs, rss, s, sp, t, v, vs, vss, w, w1, ws, wss\n\n","unions":[],"aliases":[],"values":[{"name":"a","comment":" The A combinator.\n\nImplemented in terms of the [I](#i) combinator.\n\n    Combinators.a String.fromInt 1 --> \"1\"\n\n    Combinators.a List.sum [ 1, 2, 3 ] --> 6\n\n","type":"(a -> b) -> a -> b"},{"name":"b","comment":" The B combinator.\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    Combinators.b not isEven 2 --> False\n    Combinators.b not isEven 1 --> True\n    Combinators.b String.fromInt double 4 --> \"8\"\n\n","type":"(b -> c) -> (a -> b) -> a -> c"},{"name":"b1","comment":" The B1 combinator.\n\n    Combinators.b1 String.toFloat String.append \"3\" \".14\" --> Just 3.14\n\n    Combinators.b1 (modBy 2) (\\x y -> x * y) 2 3 --> 0\n\n","type":"(b -> c) -> (a -> d -> b) -> a -> d -> c"},{"name":"b2","comment":" The B2 combinator.\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    Combinators.b2 List.sum (\\x y z -> [x, y, z]) 1 2 3 --> 6\n    Combinators.b2 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":"b3","comment":" The B3 combinator.\n\n    Combinators.b3 (\\n -> n + 15) (\\n -> n - 10) (\\n -> n * 2) 50 --> 105\n\n    Combinators.b3 (Combinators.c String.append \"1\") ((++) \"2\") String.fromInt 50 --> \"2501\"\n\n","type":"(c -> d) -> (b -> c) -> (a -> b) -> a -> d"},{"name":"bp","comment":" The B Prime (B') combinator.\n\n    Combinators.bp (+) 1 Basics.identity 2 --> 3\n\n    Combinators.bp (++) [ 1, 2, 3 ] List.singleton 4 --> [1, 2, 3, 4]\n\n","type":"(a -> c -> d) -> a -> (b -> c) -> b -> d"},{"name":"c","comment":" The C combinator.\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    Combinators.c 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        |> Combinators.c multiplyList 5\n        |> List.sum\n    --> 30\n\n","type":"(a -> b -> c) -> b -> a -> c"},{"name":"cp","comment":" The C Prime (C') combinator.\n\n    Combinators.cp (+) (\\x -> x * 2) 3 4 --> 11\n\n    Combinators.cp List.append List.singleton [ 3, 2, 1 ] 4 --> [4, 3, 2, 1]\n\n","type":"(c -> a -> d) -> (b -> c) -> a -> b -> d"},{"name":"cs","comment":" The C Star (C\\*) combinator.\n\nFlips the third and fourth arguments when applied to the given ternary function.\n\n    Combinators.cs Basics.clamp 100 200 150 --> 150\n\n    Combinators.cs (\\four six three -> four + six * three) 4 3 6 --> 22\n\n","type":"(a -> c -> b -> d) -> a -> b -> c -> d"},{"name":"css","comment":" The C Star Star (C\\*\\*) combinator.\n\nFlips the fourth and fifth arguments when applied to the given quaternary function.\n\n    Combinators.css (\\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":"d","comment":" The D combinator.\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    Combinators.d (+) 5 Basics.identity 2 --> 7\n\n","type":"(a -> c -> d) -> a -> (b -> c) -> b -> d"},{"name":"d1","comment":" The D1 Combinator.\n\n    Combinators.d1 Basics.clamp 100 200 ((*) 2) 110 --> 200\n\n","type":"(a -> b -> d -> e) -> a -> b -> (c -> d) -> c -> e"},{"name":"d2","comment":" The D2 combinator.\n\n    Combinators.d2 (+) Basics.identity 2 ((*) 2) 11 --> 24\n\n","type":"(c -> d -> e) -> (a -> c) -> a -> (b -> d) -> b -> e"},{"name":"e","comment":" The E combinator.\n\n    Combinators.e (+) 6 (*) 2 3 --> 12\n\n","type":"(a -> d -> e) -> a -> (b -> c -> d) -> b -> c -> e"},{"name":"eb","comment":" The Ê Combinator.\n\nNamed 'eb' for alphabetic consistency with the [e combinator](#e).\n\nI would have named this function 'ê' but Elm does not support that as a function name in the @docs block. Accordingly, this was the next best name I could think of based on other language / library implementations I have seen.\n\n    Combinators.eb (+) (-) 50 25 (*) 3 2 --> 31\n\n","type":"(e -> f -> g) -> (a -> b -> e) -> a -> b -> (c -> d -> f) -> c -> d -> g"},{"name":"f","comment":" The F combinator.\n\n    Combinators.f 6 2 (-) --> -4\n\n    Combinators.f \"Hi\" 3 String.repeat --> \"HiHiHi\"\n\n","type":"a -> b -> (b -> a -> c) -> c"},{"name":"fs","comment":" The F Star (F\\*) combinator.\n\nEquivilant to [S Prime](#sp) here and known to Haskell programmers as liftA2 and liftM2 for the Applicative and Monadic instances of (->).\n\n    Combinators.fs Basics.clamp 120 200 100 --> 120\n\n","type":"(c -> b -> a -> d) -> a -> b -> c -> d"},{"name":"fss","comment":" The F Star Star (F\\*\\*) combinator.\n\nFlips the third and fifth arguments when applied to the given quaternary function.\n\n","type":"(a -> d -> c -> b -> e) -> a -> b -> c -> d -> e"},{"name":"g","comment":" The G combinator.\n\n    Combinators.g (+) ((*) 2) 6 1 --> 13\n\n","type":"(b -> c -> d) -> (a -> c) -> a -> b -> d"},{"name":"h","comment":" The H combinator.\n\n    Combinators.h (\\x1 y x2 -> ( x1, x2, y )) 1 2 --> (1, 1, 2)\n\n","type":"(a -> b -> a -> c) -> a -> b -> c"},{"name":"i","comment":" The I combinator.\n\nReturns whatever it is given.\n\n    Combinators.i 1 --> 1\n\n    Combinators.i [ 1, 2, 3 ] --> [1, 2, 3]\n\n    Combinators.i String.fromInt --> String.fromInt\n\n","type":"a -> a"},{"name":"is","comment":" The I Star (I\\*) combinator\n\nImplemented in terms of the [I](#i) combinator.\n\n    Combinators.is (\\n -> n - 1) 10 --> 9\n\n","type":"(a -> b) -> a -> b"},{"name":"iss","comment":" The I Star Star (I\\*\\*) combinator.\n\nImplemented in terms of the [I](#i) combinator.\n\n    Combinators.iss (\\n m -> n - m) 10 4 --> 6\n\n","type":"(a -> b -> c) -> a -> b -> c"},{"name":"j","comment":" The J combinator.\n\nThis is the J combinator of the literature.\n\n    Combinators.j (+) 10 20 40 --> 70\n\n","type":"(a -> b -> b) -> a -> b -> a -> b"},{"name":"jp","comment":" The J Prime (J') combinator - prime of the [J Star](#js) (Joy) combinator.\n\nCredit: Rayward-Smith and Burton (See Antoni Diller 'Compiling Functional Languages' page 104).\n\n    Combinators.jp (+) 10 20 40 --> 30\n\n","type":"(a -> b -> d) -> a -> b -> c -> d"},{"name":"js","comment":" The J Star (J\\*) combinator.\n\nThis is the J combinator of Joy. It is not the jay combinator (J) of the literature.\n\nCredit: Rayward-Smith and Burton (See Antoni Diller 'Compiling Functional Languages' page 104).\n\n    Combinators.js Basics.identity 10 20 --> 10\n\n","type":"(a -> c) -> a -> b -> c"},{"name":"k","comment":" The K combinator.\n\nCorresponds to the encoding of `true` in lambda calculus.\n\nReturns the first argument provided, ignoring the second.\n\n    Combinators.k \"hello\" 2 --> \"hello\"\n\n    Combinators.k Nothing [ 1, 2, 3 ] --> Nothing\n\n    Combinators.k String.fromInt (Just 2) --> String.fromInt\n\n","type":"a -> b -> a"},{"name":"ki","comment":" The KI combinator.\n\nCorresponds to the encoding of `false` in lambda calculus.\n\nReturns the second argument provided, ignoring the first.\n\n    Combinators.ki \"hello\" 2 --> 2\n\n    Combinators.ki Nothing [ 1, 2, 3 ] --> [ 1, 2, 3 ]\n\n    Combinators.ki String.fromInt (Just 2) --> Just 2\n\n","type":"a -> b -> b"},{"name":"o","comment":" The O combinator.\n\n    Combinators.o (\\f -> f 2 6) (+) 5 --> 13\n\n","type":"((a -> b) -> a) -> (a -> b) -> b"},{"name":"p","comment":" The P combinator.\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    Combinators.p add double 3 12 --> 30\n\n","type":"(b -> b -> c) -> (a -> b) -> a -> a -> c"},{"name":"px","comment":" The Pheonix (Big Phi) combinator, also known as Turner's S Prime (S') combinator.\n\nEquivilant to [S Prime](#sp) here and known to Haskell programmers as liftA2 and liftM2 for the Applicative and Monadic instances of (->).\n\n    Combinators.px (+) ((*) 2) ((-) 3) 5 --> 8\n\n","type":"(b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d"},{"name":"q","comment":" The Q combinator.\n\nReverse function composition.\n\n    Combinators.q ((+) 2) ((*) 4) 10 --> 48\n\n    Combinators.q String.toUpper (\\name -> \"My name is \" ++ name) \"John\" --> \"My name is JOHN\"\n\n","type":"(a -> b) -> (b -> c) -> a -> c"},{"name":"q1","comment":" The Q1 combinator.\n\n    Combinators.q1 ((+) 2) 10 ((*) 4) --> 42\n\n    Combinators.q1 String.toUpper \"John\" (\\name -> \"My name is \" ++ name) --> \"MY NAME IS JOHN\"\n\n","type":"(b -> c) -> a -> (a -> b) -> c"},{"name":"q2","comment":" The Q2 combinator.\n\n    Combinators.q2 10 ((+) 2) ((*) 4) --> 42\n\n    Combinators.q2 \"John\" String.toUpper (\\name -> \"My name is \" ++ name) --> \"MY NAME IS JOHN\"\n\n","type":"a -> (b -> c) -> (a -> b) -> c"},{"name":"q3","comment":" The Q3 combinator.\n\n    Combinators.q3 ((+) 2) 10 ((*) 4) --> 48\n\n    Combinators.q3 String.toUpper \"John\" (\\name -> \"My name is \" ++ name) --> \"My name is JOHN\"\n\n","type":"(a -> b) -> a -> (b -> c) -> c"},{"name":"q4","comment":" The Q4 combinator.\n\n    Combinators.q4 10 ((+) 2) ((*) 4) --> 48\n\n    Combinators.q4 \"John\" String.toUpper (\\name -> \"My name is \" ++ name) --> \"My name is JOHN\"\n\n","type":"a -> (a -> b) -> (b -> c) -> c"},{"name":"r","comment":" The R combinator.\n\n    Combinators.r 10 (-) 12 --> 2\n\n    Combinators.r \"second\" (\\a b -> a ++ \" \" ++ b) \"first\" --> \"first second\"\n\n","type":"a -> (b -> a -> c) -> b -> c"},{"name":"rs","comment":" The R Star (R\\*) combinator.\n\nReverses the second, third and fourth arguments when applied to the given ternary function.\n\n    Combinators.rs Basics.clamp 10 100 200 --> 100\n\n    Combinators.rs Basics.clamp 110 100 200 --> 110\n\n    Combinators.rs Basics.clamp 220 100 200 --> 200\n\n","type":"(b -> c -> a -> d) -> a -> b -> c -> d"},{"name":"rss","comment":" The R Star Star (R\\*\\*) combinator.\n\nFlips the third and fifth arguments when applied to the given quaternary function.\n\n    Combinators.rss (\\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":"s","comment":" The S combinator.\n\n    Combinators.s (+) ((*) 2) 10 --> 30\n\n    Combinators.s (-) (\\v -> v * 7) 4 --> -24\n\n    Combinators.s (\\user newAge -> { user | age = newAge }) (\\user -> user.age + 1) { age = 35 } --> { age = 36 }\n\n","type":"(a -> b -> c) -> (a -> b) -> a -> c"},{"name":"sp","comment":" The S Prime (S') combinator.\n\n    Combinators.sp (+) ((*) 2) ((-) 3) 5 --> 8\n\n","type":"(b -> c -> d) -> (a -> b) -> (a -> c) -> a -> d"},{"name":"t","comment":" The T combinator.\n\nSometimes referred to as \"the forward pipe operator\".\n\nThe equivilent of the \"pipe right\" operator `(|>)` in Elm.\n\n    Combinators.t 1 Basics.identity --> 1\n\n    Combinators.t 20 ((+) 2) --> 22\n\n    Combinators.t \"Hello\" (\\v -> v ++ \" world!\") --> \"Hello world!\"\n\n","type":"a -> (a -> b) -> b"},{"name":"v","comment":" The V combinator.\n\n    Combinators.v 1 2 (+) --> 3\n\n    Combinators.v 3 \"Hello\" String.repeat --> \"HelloHelloHello\"\n\n","type":"a -> b -> (a -> b -> c) -> c"},{"name":"vs","comment":" The V Star (V\\*) combinator.\n\n    Combinators.vs (\\two one three -> one + two - three) 1 2 3 --> 0\n\n","type":"(b -> a -> b -> d) -> a -> b -> b -> d"},{"name":"vss","comment":" The V Star Star (V\\*\\*) combinator.\n\n    Combinators.vss (\\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":"w","comment":" The W combinator.\n\nProvides a given argument as both values to a given binary function.\n\n    Combinators.w (+) 2 --> 4\n\n","type":"(a -> a -> b) -> a -> b"},{"name":"w1","comment":" The W1 combinator.\n\nThe [W](#w) combinator but with the arguments reversed.\n\nConverse warbler.\n\n    Combinators.w1 2 (+) --> 4\n\n","type":"a -> (a -> a -> b) -> b"},{"name":"ws","comment":" The W Star (W\\*) combinator.\n\nWarbler once removed.\n\n    Combinators.ws (\\x y z -> [ x, y, z ]) 1 2 --> [1, 2, 2]\n\n","type":"(a -> b -> b -> c) -> a -> b -> c"},{"name":"wss","comment":" The W Star Star (W\\*\\*) combinator.\n\nWarbler twice removed.\n\n    Combinators.wss (\\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":[]},{"name":"Combinators.Future","comment":" Future combinators.\n\n@docs bo, bt, ckm, km, l, m, m2, u, y\n\n","unions":[],"aliases":[],"values":[{"name":"bo","comment":" The Big Omega (Ω) combinator.\n\nNamed 'bo' due to Elm's lack of Unicode support in function names.\n\nCurrently unable to implement due the M combinator requiring infinite type recursion.\n\nImplementable as `Combinators.Future.m Combinators.Future.m` if that happens.\n\n    Combinators.Future.bo --> Err \"Unimplementable until the M combinator is implemented.\"\n\n","type":"Result.Result String.String value"},{"name":"bt","comment":" The Big Theta (ϴ) combinator.\n\nNamed 'bt' due to Elm's lack of Unicode support in function names.\n\nCurrently unable to implement due the M combinator requiring infinite type recursion.\n\nImplementable as `Combinators.Future.y Combinators.o` if that happens.\n\n    Combinators.Future.bt --> Err \"Unimplementable until the M combinator is implemented.\"\n\n","type":"Result.Result String.String value"},{"name":"ckm","comment":" The Crossed Konstant Mocker combinator.\n\nCurrently unable to implement due the M combinator requiring infinite type recursion.\n\nImplementable as `Combinators.Future.c (Combinators.k Combinators.m)` if that happens.\n\n    Combinators.Future.ckm --> Err \"Unimplementable until the M combinator is implemented.\"\n\n","type":"Result.Result String.String value"},{"name":"km","comment":" The Konstant Mocker combinator.\n\nCurrently unable to implement due the M combinator requiring infinite type recursion.\n\nImplementable as `Combinators.k Combinators.Future.m` if that happens.\n\n    Combinators.Future.km --> Err \"Unimplementable until the M combinator is implemented.\"\n\n","type":"Result.Result String.String value"},{"name":"l","comment":" The L combinator.\n\nCurrently unable to implement due the M combinator requiring infinite type recursion.\n\nImplementable as `Combinators.c Combinators.b Combinators.Future.m` if that ever becomes possible.\n\n    Combinators.Future.l --> Err \"Unimplementable until the M combinator is implemented.\"\n\n","type":"Result.Result String.String value"},{"name":"m","comment":" The M combinator.\n\nCurrently unable to implement due to requiring infinite type recursion.\n\nImplementable as `Combinators.s Combinators.i Combinators.i` if that ever becomes possible.\n\n    Combinators.Future.m --> Err \"Unimplemented currently.\"\n\n","type":"Result.Result String.String value"},{"name":"m2","comment":" The M2 combinator.\n\nCurrently unable to implement due the M combinator requiring infinite type recursion.\n\nImplementable as `Combinators.b Combinators.Future.m` if that happens.\n\n    Combinators.Future.m2 --> Err \"Unimplementable until the M combinator is implemented.\"\n\n","type":"Result.Result String.String value"},{"name":"u","comment":" The U combinator.\n\nCurrently unable to implement due the M combinator requiring infinite type recursion.\n\nImplementable as `Combinators.Future.l Combinators.o` if that happens.\n\n    Combinators.Future.u --> Err \"Unimplementable until the M combinator is implemented.\"\n\n","type":"Result.Result String.String value"},{"name":"y","comment":" The Y combinator.\n\nCurrently unable to implement due the M combinator requiring infinite type recursion.\n\nImplementable as `Combinators.s Combinators.Future.l Combinators.Future.l` if that happens.\n\n    Combinators.Future.y --> Err \"Unimplementable until the M combinator is implemented.\"\n\n","type":"Result.Result String.String value"}],"binops":[]}]