[{"name":"Burrito.Callback","comment":" Callbacks to allow for information to be passed _up_ in the update tree.\nSee the `hello-button` example for basic use.\n\n@docs apply, runCallbacks, andApply\n\n","unions":[],"aliases":[],"values":[{"name":"andApply","comment":" Shortcut for `andThen << apply`\n","type":"t -> Burrito.Update.Update a msg t -> Burrito.Update.Update a msg t"},{"name":"apply","comment":" Append a callback to the list of functions that subsequently get applied to the returned value using `runCallbacks`.\n","type":"t -> a -> Burrito.Update.Update a msg t"},{"name":"runCallbacks","comment":" Sequentially compose the list of monadic functions (callbacks) produced by a nested update call.\n","type":"Burrito.Update.Update a msg (a -> Burrito.Update.Update a msg t) -> Burrito.Update.Update a msg t"}],"binops":[]},{"name":"Burrito.Update","comment":" Monadic-style interface for state updates.\n\n> In standard use, you will not need the third type parameter of `Update`. See [`Burrito.Update.Simple`](Burrito.Update.Simple) in that case.\n\n\n# Update\n\n@docs Update, save, addCmd, map, mapCmd, join, kleisli\n\n\n## Chaining Updates\n\n@docs andThen, sequence\n\n\n## Applicative Interface\n\nThese functions address the need to map over functions of more than one argument.\n\n@docs andMap, ap, map2, map3, map4, map5, map6, map7\n\n\n# Program Integration\n\n@docs run, run2, run3\n\n\n# Helpers\n\n@docs andAddCmd, using, with\n\n","unions":[],"aliases":[{"name":"Update","comment":" Type wrapper for Elm's `( model, Cmd msg )` tuple.\n","args":["a","msg","t"],"type":"( a, List.List (Platform.Cmd.Cmd msg), List.List t )"}],"values":[{"name":"addCmd","comment":" Add a command to an `Update` pipeline. For example;\n\n    update msg state =\n        case msg of\n            SomeMsg someMsg ->\n                state\n                    |> addCmd someCommand\n                    |> andThen (addCmd someOtherCommand)\n                    |> andThen (setStatus Done)\n\nIn this example, `andThen (addCmd someOtherCommand)` can also be shortened to\n[`andAddCmd`](#andAddCmd)`someOtherCommand`.\n\n","type":"Platform.Cmd.Cmd msg -> a -> Burrito.Update.Update a msg t"},{"name":"andAddCmd","comment":" Shortcut for `andThen << addCmd`\n","type":"Platform.Cmd.Cmd msg -> Burrito.Update.Update a msg t -> Burrito.Update.Update a msg t"},{"name":"andMap","comment":" Trying to map over a function `number -> number -> number`,\n\n    map (+) (save 4)\n\nwe end up with a result of type `Update (number -> number) msg t`. To apply the function inside this value to another `Update number msg t` value, we can write&hellip;\n\n    map (+) (save 4) |> andMap (save 5)\n\nin `elm repl`, we can verify that the result is what we expect:\n\n    > (map (+) (save 4) |> andMap (save 5)) == save 9\n    True : Bool\n\nThis pattern scales in a nice way to functions of any number of arguments:\n\n    let\n        f x y z =\n            x + y + z\n    in\n    map f (save 1)\n        |> andMap (save 1)\n        |> andMap (save 1)\n\nIf not sooner, you'll need this when you want to `mapN` and N > 7.\n\nSee also [`map2`](#map2), [`map3`](#map3), etc.\n\n","type":"Burrito.Update.Update a msg t -> Burrito.Update.Update (a -> b) msg t -> Burrito.Update.Update b msg t"},{"name":"andThen","comment":" Sequential composition of updates. This function is especially useful in combination\nwith the forward pipe operator (`|>`), for writing code in the style of pipelines. To chain\nupdates, we compose functions of the form `something -> State -> Update State msg t`:\n\n    say : String -> State -> Update State msg t\n    say what state = ...\n\n    save state\n        |> andThen (say \"hello\")\n        |> andThen doSomethingElse\n\n_Aside:_ `andThen` is like the monadic bind `(>>=)` operator in Haskell, but with the arguments interchanged.\n\n","type":"(b -> Burrito.Update.Update a msg t) -> Burrito.Update.Update b msg t -> Burrito.Update.Update a msg t"},{"name":"ap","comment":" This function is like [`andMap`](#andMap), but with the arguments interchanged.\n","type":"Burrito.Update.Update (a -> b) msg t -> Burrito.Update.Update a msg t -> Burrito.Update.Update b msg t"},{"name":"join","comment":" Remove one level of monadic structure. It may suffice to know that some other\nfunctions in this library are implemented in terms of `join`. In particular, `andThen f = join << map f`\n","type":"Burrito.Update.Update (Burrito.Update.Update a msg t) msg t -> Burrito.Update.Update a msg t"},{"name":"kleisli","comment":" Right-to-left (Kleisli) composition of two functions that return `Update` values,\npassing the state part of the first return value to the second function.\n","type":"(b -> Burrito.Update.Update d msg t) -> (a -> Burrito.Update.Update b msg t) -> a -> Burrito.Update.Update d msg t"},{"name":"map","comment":" Apply a function to the state portion of a value.\n","type":"(a -> b) -> Burrito.Update.Update a msg t -> Burrito.Update.Update b msg t"},{"name":"map2","comment":" Apply a function of two arguments to the state portion of a value.\nEquivalently, we can think of this as taking a function `a -> b -> c` and\ntransforming it into a “lifted” function of type `Update a msg t -> Update b msg t -> Update c msg t`.\n","type":"(p -> q -> r) -> Burrito.Update.Update p msg t1 -> Burrito.Update.Update q msg t1 -> Burrito.Update.Update r msg t1"},{"name":"map3","comment":" Apply a function of three arguments to the state portion of a value.\n","type":"(p -> q -> r -> s) -> Burrito.Update.Update p msg t1 -> Burrito.Update.Update q msg t1 -> Burrito.Update.Update r msg t1 -> Burrito.Update.Update s msg t1"},{"name":"map4","comment":" Apply a function of four arguments to the state portion of a value.\n","type":"(p -> q -> r -> s -> t) -> Burrito.Update.Update p msg t1 -> Burrito.Update.Update q msg t1 -> Burrito.Update.Update r msg t1 -> Burrito.Update.Update s msg t1 -> Burrito.Update.Update t msg t1"},{"name":"map5","comment":" Apply a function of five arguments to the state portion of a value.\n","type":"(p -> q -> r -> s -> t -> u) -> Burrito.Update.Update p msg t1 -> Burrito.Update.Update q msg t1 -> Burrito.Update.Update r msg t1 -> Burrito.Update.Update s msg t1 -> Burrito.Update.Update t msg t1 -> Burrito.Update.Update u msg t1"},{"name":"map6","comment":" Apply a function of six arguments to the state portion of a value.\n","type":"(p -> q -> r -> s -> t -> u -> v) -> Burrito.Update.Update p msg t1 -> Burrito.Update.Update q msg t1 -> Burrito.Update.Update r msg t1 -> Burrito.Update.Update s msg t1 -> Burrito.Update.Update t msg t1 -> Burrito.Update.Update u msg t1 -> Burrito.Update.Update v msg t1"},{"name":"map7","comment":" Apply a function of seven arguments to the state portion of a value.\n","type":"(p -> q -> r -> s -> t -> u -> v -> w) -> Burrito.Update.Update p msg t1 -> Burrito.Update.Update q msg t1 -> Burrito.Update.Update r msg t1 -> Burrito.Update.Update s msg t1 -> Burrito.Update.Update t msg t1 -> Burrito.Update.Update u msg t1 -> Burrito.Update.Update v msg t1 -> Burrito.Update.Update w msg t1"},{"name":"mapCmd","comment":" Map over the `Cmd` contained in the provided `Update`.\n","type":"(msg -> msg1) -> Burrito.Update.Update a msg t -> Burrito.Update.Update a msg1 t"},{"name":"run","comment":" Translate a function that returns an `Update` into one that returns a plain `( model, cmd )` pair.\n","type":"(p -> Burrito.Update.Update a msg t) -> p -> ( a, Platform.Cmd.Cmd msg )"},{"name":"run2","comment":" Same as [`run`](#run), but for functions of two arguments.\n","type":"(p -> q -> Burrito.Update.Update a msg t) -> p -> q -> ( a, Platform.Cmd.Cmd msg )"},{"name":"run3","comment":" Same as [`run`](#run), but for functions of three arguments.\n","type":"(p -> q -> r -> Burrito.Update.Update a msg t) -> p -> q -> r -> ( a, Platform.Cmd.Cmd msg )"},{"name":"save","comment":" Lifts a value into the `Update` context. For example,\n\n    save model\n\ncorresponds to `( model, Cmd.none )` in code that doesn't use this library.\n\n","type":"a -> Burrito.Update.Update a msg t"},{"name":"sequence","comment":" Take a list of `a -> Update a msg t` values and run them sequentially, in a left-to-right manner.\n","type":"List.List (a -> Burrito.Update.Update a msg t) -> a -> Burrito.Update.Update a msg t"},{"name":"using","comment":" Combinator useful for pointfree style. For example;\n\n    nextPage state =\n        goToPage (state.current + 1) state\n\ncan be changed to\n\n    nextPage =\n        using (\\{ current } -> goToPage (current + 1))\n\n","type":"(a -> a -> b) -> a -> b"},{"name":"with","comment":" Combinator useful for pointfree style. For example, to get rid of the lambda in the following code;\n\n    update msg state =\n        case msg of\n            Click ->\n                state\n                    |> updateSomething\n                    |> andThen (\\s -> setCounterValue (s.counter + 1) s)\n\nwe can write:\n\n    update msg state =\n        case msg of\n            Click ->\n                state\n                    |> updateSomething\n                    |> andThen (with .counter (setCounterValue << (+) 1))\n\n","type":"(a -> b) -> (b -> a -> c) -> a -> c"}],"binops":[]},{"name":"Burrito.Update.Browser","comment":"\n\n@docs application, document\n\n","unions":[],"aliases":[],"values":[{"name":"application","comment":" Used as a drop-in replacement for `Browser.application`, but instead creates a `Program`\nwhere `init` and `update` are based on the `Update` type of this library.\n\n    init : flags -> Url -> Navigation.Key -> Update model msg\n\n    update : msg -> model -> Update model msg\n\n","type":"{ init : flags -> Url.Url -> Browser.Navigation.Key -> Burrito.Update.Update model msg t, onUrlChange : Url.Url -> msg, onUrlRequest : Browser.UrlRequest -> msg, subscriptions : model -> Platform.Sub.Sub msg, update : msg -> model -> Burrito.Update.Update model msg t, view : model -> Browser.Document msg } -> Platform.Program flags model msg"},{"name":"document","comment":" Used as a drop-in replacement for `Browser.document`, but instead creates a `Program`\nwhere `init` and `update` are based on the `Update` type of this library.\n\n    init : flags -> Update model msg\n\n    update : msg -> model -> Update model msg\n\n","type":"{ init : flags -> Burrito.Update.Update model msg t, subscriptions : model -> Platform.Sub.Sub msg, update : msg -> model -> Burrito.Update.Update model msg t, view : model -> Browser.Document msg } -> Platform.Program flags model msg"}],"binops":[]},{"name":"Burrito.Update.Simple","comment":" This module exposes an API identical to [`Burrito.Update`](Burrito.Update) except a simpler\nversion of the `Update` type alias with two type parameters instead of three, which is sufficient in most cases.\n\n@docs Update, save, addCmd, map, mapCmd, join, kleisli, andThen, sequence, andMap, ap, map2, map3, map4, map5, map6, map7, run, run2, run3, andAddCmd, with\n\n","unions":[],"aliases":[{"name":"Update","comment":" See [`Burrito.Update.Update`](Burrito.Update#Update).\n","args":["a","msg"],"type":"Burrito.Update.Update a msg ()"}],"values":[{"name":"addCmd","comment":" See [`Burrito.Update.addCmd`](Burrito.Update#addCmd).\n","type":"Platform.Cmd.Cmd msg -> a -> Burrito.Update.Simple.Update a msg"},{"name":"andAddCmd","comment":" See [`Burrito.Update.andAddCmd`](Burrito.Update#andAddCmd).\n","type":"Platform.Cmd.Cmd msg -> Burrito.Update.Simple.Update a msg -> Burrito.Update.Simple.Update a msg"},{"name":"andMap","comment":" See [`Burrito.Update.andMap`](Burrito.Update#andMap).\n","type":"Burrito.Update.Simple.Update a msg -> Burrito.Update.Simple.Update (a -> b) msg -> Burrito.Update.Simple.Update b msg"},{"name":"andThen","comment":" See [`Burrito.Update.andThen`](Burrito.Update#andThen).\n","type":"(b -> Burrito.Update.Simple.Update a msg) -> Burrito.Update.Simple.Update b msg -> Burrito.Update.Simple.Update a msg"},{"name":"ap","comment":" See [`Burrito.Update.ap`](Burrito.Update#ap).\n","type":"Burrito.Update.Simple.Update (a -> b) msg -> Burrito.Update.Simple.Update a msg -> Burrito.Update.Simple.Update b msg"},{"name":"join","comment":" See [`Burrito.Update.join`](Burrito.Update#join).\n","type":"Burrito.Update.Simple.Update (Burrito.Update.Simple.Update a msg) msg -> Burrito.Update.Simple.Update a msg"},{"name":"kleisli","comment":" See [`Burrito.Update.kleisli`](Burrito.Update#kleisli).\n","type":"(b -> Burrito.Update.Simple.Update d msg) -> (a -> Burrito.Update.Simple.Update b msg) -> a -> Burrito.Update.Simple.Update d msg"},{"name":"map","comment":" See [`Burrito.Update.map`](Burrito.Update#map).\n","type":"(a -> b) -> Burrito.Update.Simple.Update a msg -> Burrito.Update.Simple.Update b msg"},{"name":"map2","comment":" See [`Burrito.Update.map2`](Burrito.Update#map2).\n","type":"(p -> q -> r) -> Burrito.Update.Simple.Update p msg -> Burrito.Update.Simple.Update q msg -> Burrito.Update.Simple.Update r msg"},{"name":"map3","comment":" See [`Burrito.Update.map3`](Burrito.Update#map3).\n","type":"(p -> q -> r -> s) -> Burrito.Update.Simple.Update p msg -> Burrito.Update.Simple.Update q msg -> Burrito.Update.Simple.Update r msg -> Burrito.Update.Simple.Update s msg"},{"name":"map4","comment":" See [`Burrito.Update.map4`](Burrito.Update#map4).\n","type":"(p -> q -> r -> s -> t) -> Burrito.Update.Simple.Update p msg -> Burrito.Update.Simple.Update q msg -> Burrito.Update.Simple.Update r msg -> Burrito.Update.Simple.Update s msg -> Burrito.Update.Simple.Update t msg"},{"name":"map5","comment":" See [`Burrito.Update.map5`](Burrito.Update#map5).\n","type":"(p -> q -> r -> s -> t -> u) -> Burrito.Update.Simple.Update p msg -> Burrito.Update.Simple.Update q msg -> Burrito.Update.Simple.Update r msg -> Burrito.Update.Simple.Update s msg -> Burrito.Update.Simple.Update t msg -> Burrito.Update.Simple.Update u msg"},{"name":"map6","comment":" See [`Burrito.Update.map6`](Burrito.Update#map6).\n","type":"(p -> q -> r -> s -> t -> u -> v) -> Burrito.Update.Simple.Update p msg -> Burrito.Update.Simple.Update q msg -> Burrito.Update.Simple.Update r msg -> Burrito.Update.Simple.Update s msg -> Burrito.Update.Simple.Update t msg -> Burrito.Update.Simple.Update u msg -> Burrito.Update.Simple.Update v msg"},{"name":"map7","comment":" See [`Burrito.Update.map7`](Burrito.Update#map7).\n","type":"(p -> q -> r -> s -> t -> u -> v -> w) -> Burrito.Update.Simple.Update p msg -> Burrito.Update.Simple.Update q msg -> Burrito.Update.Simple.Update r msg -> Burrito.Update.Simple.Update s msg -> Burrito.Update.Simple.Update t msg -> Burrito.Update.Simple.Update u msg -> Burrito.Update.Simple.Update v msg -> Burrito.Update.Simple.Update w msg"},{"name":"mapCmd","comment":" See [`Burrito.Update.mapCmd`](Burrito.Update#mapCmd).\n","type":"(msg -> msg1) -> Burrito.Update.Simple.Update a msg -> Burrito.Update.Simple.Update a msg1"},{"name":"run","comment":" See [`Burrito.Update.run`](Burrito.Update#run).\n","type":"(p -> Burrito.Update.Simple.Update a msg) -> p -> ( a, Platform.Cmd.Cmd msg )"},{"name":"run2","comment":" See [`Burrito.Update.run2`](Burrito.Update#run2).\n","type":"(p -> q -> Burrito.Update.Simple.Update a msg) -> p -> q -> ( a, Platform.Cmd.Cmd msg )"},{"name":"run3","comment":" See [`Burrito.Update.run3`](Burrito.Update#run3).\n","type":"(p -> q -> r -> Burrito.Update.Simple.Update a msg) -> p -> q -> r -> ( a, Platform.Cmd.Cmd msg )"},{"name":"save","comment":" See [`Burrito.Update.save`](Burrito.Update#save).\n","type":"a -> Burrito.Update.Simple.Update a msg"},{"name":"sequence","comment":" See [`Burrito.Update.sequence`](Burrito.Update#sequence).\n","type":"List.List (a -> Burrito.Update.Simple.Update a msg) -> a -> Burrito.Update.Simple.Update a msg"},{"name":"with","comment":" See [`Burrito.Update.with`](Burrito.Update#with).\n","type":"(a -> b) -> (b -> a -> c) -> a -> c"}],"binops":[]}]