{"id":18387543,"url":"https://github.com/j5ik2o/rust-fp","last_synced_at":"2025-04-07T01:31:12.566Z","repository":{"id":40445974,"uuid":"237819329","full_name":"j5ik2o/rust-fp","owner":"j5ik2o","description":"The Library for Functional Programming in Rust","archived":false,"fork":false,"pushed_at":"2023-12-15T05:52:18.000Z","size":50,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T01:17:15.858Z","etag":null,"topics":["functional-programming","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/j5ik2o.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-02-02T18:51:29.000Z","updated_at":"2023-12-13T11:37:43.000Z","dependencies_parsed_at":"2024-01-15T06:07:28.307Z","dependency_job_id":null,"html_url":"https://github.com/j5ik2o/rust-fp","commit_stats":{"total_commits":54,"total_committers":1,"mean_commits":54.0,"dds":0.0,"last_synced_commit":"171f9a321d3ecbe35cb4c9b096ad563b43951d11"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Frust-fp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Frust-fp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Frust-fp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Frust-fp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j5ik2o","download_url":"https://codeload.github.com/j5ik2o/rust-fp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247577856,"owners_count":20961189,"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":["functional-programming","rust"],"created_at":"2024-11-06T01:26:43.134Z","updated_at":"2025-04-07T01:31:12.553Z","avatar_url":"https://github.com/j5ik2o.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-fp\n\nrust-fp is a library for functional programming in Rust.\n\n## Install\n\n```toml\n[dependencies]\nrust-fp-categories = \"0.0.1\"\nrust-fp-pfds = \"0.0.1\"\n```\n\n## Type-classes for categories\n\n|type-class|j5ik2o/rust-fp|[JasonShin/fp-core.rs](https://github.com/JasonShin/fp-core.rs)|[kitfre/Kinder](https://github.com/kitfre/Kinder)|[14427/hkt.rs](https://gist.github.com/14427/af90a21b917d2892eace)|[aoprisan/func](https://github.com/aoprisan/func)|\n|:-----------------------|:------|:------|:------|:------|:------|\n|Functor                 |✓|✓|✓|✓|-|\n|Pure                    |✓|✓|-|-|-|\n|Apply                   |✓|✓|-|-|-|\n|Applicativie(Pure+Apply)|✓|✓|✓|✓|-|\n|Bind                    |✓|✓|-|-|-|\n|Monad(Applicative+Bind) |✓|✓|✓|✓|-|\n|Empty                   |✓|✓|-|-|-|\n|Semigroup               |✓|✓|-|-|-|\n|Monoid(Empty+Semigroup) |✓|✓|✓|✓|-|\n|Foldable                |✓|✓|✓|-|-|\n|Show                    |✓|-|-|-|✓|\n|HList                   |✓|-|-|-|✓|\n|ForYield                |✓|✓|✓|-|-|\n|TailRec                 |✓|-|-|-|✓|\n\n\n## Purely functional data structures\n\n|data name|j5ik2o/rust-fp|[aoprisan/func](https://github.com/aoprisan/func)|\n|:---------|:------|:------|\n|Stack|✓|-|\n|Set|✓|-|\n|Lazy|-|✓|\n|IO|-|✓|\n|Free|-|✓|\n|Computation|-|✓|\n\n## Performance Benchmarks\n\nBelow are benchmark results comparing rust-fp data structures with competing libraries.\n\n### Queue Operations\n\n| Implementation | enqueue (µs) | dequeue (µs) |\n|----------------|--------------|--------------|\n| ArrayQueue     | 7.07         | 3.33         |\n| ListQueue      | 4.09         | 2.96         |\n| OptimizedQueue | 4.77         | 2.89         |\n| im::Vector     | 0.76         | 0.82         |\n| rpds::Queue    | 5.09         | -            |\n\n### Stack Operations\n\n| Implementation   | push (ns) | pop (µs) | peek (ns) |\n|------------------|-----------|----------|-----------|\n| ArrayStack       | 274.52    | 1.76     | -         |\n| PersistentStack  | 2345.0    | 0.15     | -         |\n| im::Vector       | 744.53    | 0.63     | -         |\n| rpds::Stack      | 5091.4    | 1.82     | -         |\n\n### Set Operations\n\n| Implementation      | insert (µs) | member (µs) |\n|---------------------|-------------|-------------|\n| BTreeSet            | 190.53      | 8.06        |\n| HashSet             | 2.34        | 2.74        |\n| TreeOptimized       | 129.28      | 16.65       |\n| im::OrdSet          | 2.42        | 0.83        |\n| std::BTreeSet       | 2.61        | 0.82        |\n| std::HashSet        | 2.89        | 1.10        |\n\n*Lower values indicate better performance. Benchmarks run on a standard development machine.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj5ik2o%2Frust-fp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj5ik2o%2Frust-fp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj5ik2o%2Frust-fp/lists"}