{"id":23149963,"url":"https://github.com/pjiwm/functional-rust","last_synced_at":"2025-09-14T18:53:16.061Z","repository":{"id":268312123,"uuid":"903943575","full_name":"Pjiwm/functional-rust","owner":"Pjiwm","description":"A Rust library for functional programming, providing function composition, currying, and higher-order functions. This crate can be compiled on nightly Rust.","archived":false,"fork":false,"pushed_at":"2024-12-16T00:16:35.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T14:44:28.280Z","etag":null,"topics":["crate","currying","function","functional-programming","library","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Pjiwm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-16T00:04:46.000Z","updated_at":"2024-12-16T00:16:39.000Z","dependencies_parsed_at":"2024-12-16T01:31:34.457Z","dependency_job_id":null,"html_url":"https://github.com/Pjiwm/functional-rust","commit_stats":null,"previous_names":["pjiwm/functional-rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pjiwm/functional-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Ffunctional-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Ffunctional-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Ffunctional-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Ffunctional-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pjiwm","download_url":"https://codeload.github.com/Pjiwm/functional-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pjiwm%2Ffunctional-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275152556,"owners_count":25414450,"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-09-14T02:00:10.474Z","response_time":75,"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":["crate","currying","function","functional-programming","library","rust","rust-lang"],"created_at":"2024-12-17T18:15:46.947Z","updated_at":"2025-09-14T18:53:16.019Z","avatar_url":"https://github.com/Pjiwm.png","language":"Rust","readme":"\n# functional_rs\n`functional_rs` is an experimental crate that brings functional programming concepts to Rust using Nightly features.\nBy implementing `Fn` on structs, it enables function composition, currying, and other higher-order functional programming patterns.\nThe goal is to keep the syntax as concise as possible, making functional patterns easy to use without cluttering the code.\n\nThis crate is designed for **Nightly Rust** and uses experimental features, so it’s not stable yet.\n\n## Example\n\n```rust\nuse functional_rs::{c, f, ComposableFn};\nuse std::str::FromStr;\n\nfn main() {\n    let from_str = i32::from_str;\n    let parse_or_zero = |result: Result\u003ci32, \u003ci32 as FromStr\u003e::Err\u003e| result.unwrap_or(0);\n\n    // Currying with composition\n    let add = c!(|a: i32, b: i32| a + b);\n    let add_10_from_str = f!(from_str) \u003e\u003e f!(parse_or_zero) \u003e\u003e f!(add(10));\n\n    // Using the composed function\n    assert_eq!(add_10_from_str(\"4\"), 14); // (4 -\u003e parse -\u003e add 10) = 14\n    assert_eq!(add_10_from_str(\"not a number\"), 10); // invalid input -\u003e default 10\n}\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjiwm%2Ffunctional-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjiwm%2Ffunctional-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjiwm%2Ffunctional-rust/lists"}