{"id":16603179,"url":"https://github.com/laserpants/resilient","last_synced_at":"2026-04-20T15:31:36.717Z","repository":{"id":30027356,"uuid":"33576273","full_name":"laserpants/resilient","owner":"laserpants","description":"Persistent data structures","archived":false,"fork":false,"pushed_at":"2015-04-13T11:11:35.000Z","size":156,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T17:45:29.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laserpants.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":"2015-04-08T00:50:54.000Z","updated_at":"2017-02-26T03:11:41.000Z","dependencies_parsed_at":"2022-09-13T04:15:49.054Z","dependency_job_id":null,"html_url":"https://github.com/laserpants/resilient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laserpants/resilient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserpants%2Fresilient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserpants%2Fresilient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserpants%2Fresilient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserpants%2Fresilient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laserpants","download_url":"https://codeload.github.com/laserpants/resilient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laserpants%2Fresilient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32053173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-10-12T00:48:06.480Z","updated_at":"2026-04-20T15:31:36.686Z","avatar_url":"https://github.com/laserpants.png","language":"Haskell","readme":"# resilient\n\nPersistent data structures\n\n## Binomial Heap\n\n```\nmodule Queue.BinomHeap\n  ( BinomTree\n  , order\n  , nodeCount\n  , node\n  , tree\n  , tree1\n  , root\n  , mergeTrees\n  , insertTree\n  , insertNode\n  , fromList\n  , findMinimum\n  , takeMinimum\n  ) where\n```\n\n```\ndata BinomTree a = BNode a | BTree Int a [BinomTree a]\n  deriving (Show, Eq)\n```\n\n```\ntype BinomHeap a = [BinomTree a]\n```\n\n\u003e order :: BinomTree a -\u003e Int\n\nReturn the order of a tree.\n\n---\n\n\u003e nodeCount :: BinomTree a -\u003e Int\n\nReturn the number of nodes in a tree.\n\n---\n\n\u003e node :: a -\u003e BinomTree a\n\nConstruct a node.\n\n---\n\n\u003e tree :: a -\u003e [BinomTree a] -\u003e BinomTree a\n\nConstruct a tree from the given node and a list of sub-trees.\n\n---\n\n\u003e tree1 :: a -\u003e a -\u003e BinomTree a\n\nShortcut for creating a tree with exactly one child node.\n\n---\n\n\u003e root :: BinomTree a -\u003e a\n\nReturn the root node.\n\n---\n\n\u003e mergeTrees :: Ord a =\u003e BinomTree a -\u003e BinomTree a -\u003e BinomTree a\n\nMerge two trees of the same order.\n\n---\n\n\u003e insertTree :: Ord a =\u003e BinomTree a -\u003e [BinomTree a] -\u003e [BinomTree a]\n\nInsert a tree into the list of trees (heap), maintaining the invariant that the orders of trees in the list are distinct and increasing.\n\n---\n\n\u003e insertNode :: Ord a =\u003e a -\u003e [BinomTree a] -\u003e [BinomTree a]\n\nInsert a single node into the list of trees. The same guarantees as for insertTree apply.\n\n---\n\n\u003e fromList :: Ord a =\u003e [a] -\u003e [BinomTree a]\n\nConstruct a heap from a list of node elements.\n\n---\n\n\u003e findMinimum :: Ord a =\u003e [BinomTree a] -\u003e a\n\nReturn the minimum element in the heap.\n\n---\n\n\u003e takeMinimum :: Ord a =\u003e [BinomTree a] -\u003e (a, [BinomTree a])\n\nRemove and return the minimum element of the heap together with a new version, without the removed node.\n\n---\n\n## Union-Find\n\n```\nmodule Set.UnionFind\n  ( Set(..)\n  , union\n  , find\n  , disjoint\n  ) where\n```\n\n```\ndata Set = Set\n    { count :: Int\n    , ids   :: Seq Int\n    , sizes :: Seq Int\n    } \n```\n\n\u003e disjoint :: [Int] -\u003e Set\n\n---\n\n\u003e find :: Set -\u003e Int -\u003e Int\n\n---\n\n\u003e union :: Set -\u003e Int -\u003e Int -\u003e Set\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaserpants%2Fresilient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaserpants%2Fresilient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaserpants%2Fresilient/lists"}