{"id":19211064,"url":"https://github.com/bowbahdoe/elm-history","last_synced_at":"2026-06-10T21:32:18.736Z","repository":{"id":57674879,"uuid":"172307306","full_name":"bowbahdoe/elm-history","owner":"bowbahdoe","description":"A History Data Structure for the Elm Programming Language","archived":false,"fork":false,"pushed_at":"2019-03-18T15:34:08.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-13T21:02:01.591Z","etag":null,"topics":["datastructure","elm","frontend"],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bowbahdoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-24T07:08:08.000Z","updated_at":"2022-01-24T19:47:47.000Z","dependencies_parsed_at":"2022-09-02T17:08:41.151Z","dependency_job_id":null,"html_url":"https://github.com/bowbahdoe/elm-history","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bowbahdoe/elm-history","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowbahdoe%2Felm-history","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowbahdoe%2Felm-history/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowbahdoe%2Felm-history/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowbahdoe%2Felm-history/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bowbahdoe","download_url":"https://codeload.github.com/bowbahdoe/elm-history/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowbahdoe%2Felm-history/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34172196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datastructure","elm","frontend"],"created_at":"2024-11-09T13:40:43.632Z","updated_at":"2026-06-10T21:32:18.709Z","avatar_url":"https://github.com/bowbahdoe.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm-history\n\nThis library provides a data structure for managing the \"History\"\nof some values. It is useful for making features that are along\nthe lines of undo and redo. \n\n[Try it on Ellie][1]\n\n[1]: https://ellie-app.com/52ctv8T5Q2Sa1\n\n```elm\nmodule Main exposing (main)\n\nimport Browser exposing (sandbox)\nimport History exposing (History)\nimport Html exposing (Html, br, button, div, text)\nimport Html.Events exposing (onClick)\n\n\ntype alias Model =\n    History Int\n\n\ntype Msg\n    = Increment\n    | Decrement\n    | TimesFive\n    | Redo\n    | Undo\n\n\ninit : Model\ninit =\n    History.new 0\n\n\nupdate : Msg -\u003e Model -\u003e Model\nupdate msg model =\n    case msg of\n        Increment -\u003e\n            History.to (History.current model + 1) model\n\n        Decrement -\u003e\n            History.to (History.current model - 1) model\n\n        TimesFive -\u003e\n            History.to (History.current model * 5) model\n\n        Undo -\u003e\n            History.back model\n\n        Redo -\u003e\n            History.forward model\n\n\nview : Model -\u003e Html Msg\nview model =\n    div []\n        [ text (String.fromInt (History.current model))\n        , br [] []\n        , button [ onClick Increment ] [ text \"Increment\" ]\n        , br [] []\n        , button [ onClick Decrement ] [ text \"Decrement\" ]\n        , br [] []\n        , button [ onClick TimesFive ] [ text \"Time Five\" ]\n        , br [] []\n        , button [ onClick Redo ] [ text \"Redo\" ]\n        , br [] []\n        , button [ onClick Undo ] [ text \"Undo\" ]\n        ]\n\n\nmain =\n    sandbox { init = init, update = update, view = view }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowbahdoe%2Felm-history","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbowbahdoe%2Felm-history","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowbahdoe%2Felm-history/lists"}