[{"name":"History","comment":" This library gives you a way to manage a series of values where you are only interested in one\nvalue at a time and are interested in potentially revisiting previous values.\n\nThe provided data structure is referred to here as a \"History\", although it is more often referred to as\na [\"Zip List\"][2]. This is meant to provide you with a better idea of what you can effectively use this\nlibrary for. Namely, you can use this data structure to power any feature that fits the pattern of\n\"undo\" and \"redo\".\n\nA History behaves similarly to how a web browser's back and forward buttons work. If you click a link in a browser\n(move the history \"to\" a new location), then the forward button will no longer work and you will only be able\nto move back. If you don't click any links, you can go back and forward as much as you want and you wont affect\nthe overall \"structure\" of the History.\n\nFor more insights on why you might want to use this data structure, I highly recommend watching [this talk][1].\n\nIf you are here looking for a way to manage the actual history of a web browser, you should instead\nbe looking at the [elm/Browser][3] package.\n\n[1]: https://www.youtube.com/watch?v=IcgmSRJHu_8\n[2]: https://en.wikipedia.org/wiki/Zipper_(data_structure)\n[3]: https://package.elm-lang.org/packages/elm/browser/latest/Browser-Navigation#pushUrl\n\n\n# The Data Structure\n\n@docs History\n\n\n# Create\n\n@docs new, fromList\n\n\n# Maneuvering\n\n@docs forward, back, current, to\n\n\n# Transform\n\n@docs map\n\n","unions":[{"name":"History","comment":" A \"History\" of values.\n","args":["a"],"cases":[]}],"aliases":[],"values":[{"name":"back","comment":" Moves backward in the history. If there are no past values\nthen there is no change. This is synonymous with an \"undo\" operation.\n","type":"History.History a -> History.History a"},{"name":"current","comment":" Gets the current value in the History.\n","type":"History.History a -> a"},{"name":"forward","comment":" Moves forward in the history. If there are no values in the future\nthen there is no change. This is synonymous with a \"redo\" operation.\n","type":"History.History a -> History.History a"},{"name":"fromList","comment":" Creates a history from a list. Treats the first element in the list as the present state\nand all the other items as the states that occurred in the past. If the list is empty, then no History will be produced.\n","type":"List.List a -> Maybe.Maybe (History.History a)"},{"name":"map","comment":" Maps a function over all the values in the history.\n","type":"(a -> b) -> History.History a -> History.History b"},{"name":"new","comment":" Creates a new History, starting with the given value.\n","type":"a -> History.History a"},{"name":"to","comment":" Moves the History to a new value. This will erase anything in the future.\nThink of it like time travel: If you go back in time and change what happens next,\nall your knowledge of the future is now irrelevant.\n","type":"History.History a -> a -> History.History a"}],"binops":[]}]