{"id":18447064,"url":"https://github.com/zot/go-fingertree","last_synced_at":"2025-10-30T17:48:46.492Z","repository":{"id":57550208,"uuid":"307963407","full_name":"zot/go-fingertree","owner":"zot","description":"A Fingertree implementation in Go","archived":false,"fork":false,"pushed_at":"2020-10-28T10:06:21.000Z","size":1148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T09:55:22.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/zot.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":"2020-10-28T09:16:41.000Z","updated_at":"2020-10-28T10:00:11.000Z","dependencies_parsed_at":"2022-09-10T06:10:44.776Z","dependency_job_id":null,"html_url":"https://github.com/zot/go-fingertree","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zot/go-fingertree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zot%2Fgo-fingertree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zot%2Fgo-fingertree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zot%2Fgo-fingertree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zot%2Fgo-fingertree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zot","download_url":"https://codeload.github.com/zot/go-fingertree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zot%2Fgo-fingertree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281853655,"owners_count":26573095,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"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":[],"created_at":"2024-11-06T07:11:51.887Z","updated_at":"2025-10-30T17:48:46.447Z","avatar_url":"https://github.com/zot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fingertree\n\n[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/zot/go-fingertree)\n\nPackage fingertree implements finger trees in Go.\n\n```\nWikipedia: [https://en.wikipedia.org/wiki/Finger_tree](https://en.wikipedia.org/wiki/Finger_tree)\n```\n\nThe finger tree is an incredibly versatile, customizable data\nstructure that functions more or less like a random-access list\nexcept that, rather than using indexes to access the items, you\ndefine \"measurements\" for that. This key distinction provides a\nlarge amount of power and flexibility. Measurements give you a way\nto define a sort of \"width-space\" for items, specifying how \"wide\"\neach item is and accessing items by \"offsets in the\nwidth-space\". Measurements can be simple numbers or they can be\ncomplex structures, allowing you to index items on multiple aspects\nsimultaneously (see examples/textLines.go which lets you find lines\nof text by either line number or character offset). I can't say\nenough about how interesting and powerful finger trees are.\n\nFinger trees are reasonably performant although specialized data\nstructures will perform better for their targeted tasks.\nNevertheless, finger trees are very easy to use and I often use\nthem for a first-cut before writing a custom data structure -- I've\nfound that it's better to debug and maintain fewer pieces of\ncomplex code than more of them.\n\nThis is a modified port of Xueqiao Xu's JavaScript Fingertree code\n\n```\n[https://github.com/qiao/fingertree.js](https://github.com/qiao/fingertree.js)\n\u003cxueqiaoxu@gmail.com\u003e\n```\n\nWhich is based on:\n\n```\nRalf Hinze and Ross Paterson,\n\"Finger trees: a simple general-purpose data structure\"\n[http://www.soi.city.ac.uk/~ross/papers/FingerTree.html](http://www.soi.city.ac.uk/~ross/papers/FingerTree.html)\n```\n\n## COPYRIGHT\n\n© 2020 William R. Burdick Jr. (Bill Burdick) \u003cbill.burdick@gmail.com\u003e\n\n## MIT License\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use, copy,\nmodify, merge, publish, distribute, sublicense, and/or sell copies\nof 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\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\nBE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\nACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Sub Packages\n\n* [examples](./examples): Text lines example: tracks text offsets by both line and character\n\n* [test](./test)\n\n---\nReadme created from Go doc with [goreadme](https://github.com/posener/goreadme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzot%2Fgo-fingertree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzot%2Fgo-fingertree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzot%2Fgo-fingertree/lists"}