{"id":18324699,"url":"https://github.com/tchoutri/zippy","last_synced_at":"2025-04-06T00:31:00.870Z","repository":{"id":57558579,"uuid":"81734961","full_name":"tchoutri/Zippy","owner":"tchoutri","description":"Zippy is an Elixir library that implements various zipper data structures (lists, binary trees and forests)","archived":false,"fork":false,"pushed_at":"2017-02-20T13:57:44.000Z","size":28,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T13:53:18.773Z","etag":null,"topics":["elixir-lang","functional-data-structure","zipper"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/zippy/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tchoutri.png","metadata":{"files":{"readme":"README.rst","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":"2017-02-12T15:17:19.000Z","updated_at":"2020-01-20T17:43:39.000Z","dependencies_parsed_at":"2022-09-15T19:30:58.281Z","dependency_job_id":null,"html_url":"https://github.com/tchoutri/Zippy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchoutri%2FZippy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchoutri%2FZippy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchoutri%2FZippy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchoutri%2FZippy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchoutri","download_url":"https://codeload.github.com/tchoutri/Zippy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419597,"owners_count":20936009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["elixir-lang","functional-data-structure","zipper"],"created_at":"2024-11-05T18:35:33.722Z","updated_at":"2025-04-06T00:30:59.959Z","avatar_url":"https://github.com/tchoutri.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"==============================\nZippy |elixir| |hex| |license|\n==============================\n\nZippy is an Elixir implementation of Fred Hebert's Zippers_ erlang library.\nThe main motivation was of course to better grasp this kind of data structures, but I also added my own grain of salt in some parts:\n\n* When returning an ``{:ok, value}`` tuple in case of success, functions will also return a ``{:error, nil}`` in case of failure.\n* All ``:undefined`` atoms have been replaced by ``nil``, which I find more idiomatic.\n* Idiomatic function names (``if_leaf`` ➜ ``leaf?``) when needed.\n* Functions' first argument is the data structure, which allows chaining operations on it with the ``|\u003e`` operator.\n\nThis package follows semantic versioning::\n    \n    Major.Minor.Patch\n      └────┼─────┼──\u003e Incompatible API changes\n           └─────┼────\u003e More features\n                 └──────\u003e Bug Fixing\n\n\nExamples\n--------\n\nLet's say we can modelize the wanderings of a user in their filesystem's hierarchy with a ``{timestamp, path}`` tuple.\nThe code would look like that:\n\n.. code:: Elixir\n\n    alias Zippy.ZList, as: Z\n    zlist = Z.new\n    timestamp = fn -\u003e DateTime.utc_now \\|\u003e DateTime.to_unix end\n\n    hist0 = zlist \\|\u003e Z.insert({timestamp.(), \"/home\"})\n    hist1 = hist0 \\|\u003e Z.next \\|\u003e Z.insert({timestamp.(), \"/home/foo\"})\n    hist2 = hist1 \\|\u003e Z.next \\|\u003e Z.insert({timestamp.(), \"/home/foo/.local\"})\n    hist3 = hist2 \\|\u003e Z.next \\|\u003e Z.insert({timestamp.(), \"/home/foo/.local/bin\"})\n\nIf we wanted to browse the events list, we would use the ``next/2`` and ``prev/2`` functions from ``Zippy.ZList``.\n\n.. code:: Elixir\n\n\n\nInstallation\n------------\n\n.. code:: elixir\n\n    def deps do\n      [{:zippy, \"~\u003e 0.0.1\"}]\n    end\n\nLicense\n-------\n\nMIT License\n\nCopyright © 2017 Théophile Choutri\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n.. _Zippers: https://github.com/ferd/zippers/\n\n.. |elixir| image:: https://cdn.rawgit.com/tchoutri/Exon/master/elixir.svg\n            :target: http://elixir-lang.org\n            :alt: Made in Elixir\n\n.. |hex| image:: https://img.shields.io/hexpm/v/zippy.svg\n         :target: https://hex.pm/packages/zippy\n         :alt: Version on Hex.PM\n\n.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg\n             :target: https://opensource.org/licenses/MIT \n             :alt: MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchoutri%2Fzippy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchoutri%2Fzippy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchoutri%2Fzippy/lists"}