{"id":18000623,"url":"https://github.com/justasmasiulis/args","last_synced_at":"2025-03-26T07:32:12.747Z","repository":{"id":107475853,"uuid":"134899174","full_name":"JustasMasiulis/args","owner":"JustasMasiulis","description":"Header only library for binding, reordering and currying of function arguments without cost","archived":false,"fork":false,"pushed_at":"2018-06-20T17:04:39.000Z","size":15,"stargazers_count":18,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T11:50:24.444Z","etag":null,"topics":["bind","binder","cpp","cpp14","currying","easy-to-use","fast","functional","functional-programming","header-only","modern","modern-cpp","monadic","optimization","reorder","reordering","simple","small","type-erasure"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JustasMasiulis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-05-25T19:55:55.000Z","updated_at":"2025-01-10T12:12:08.000Z","dependencies_parsed_at":"2023-06-12T09:15:20.827Z","dependency_job_id":null,"html_url":"https://github.com/JustasMasiulis/args","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"a2df6b5d47a348b023871ae7b6f00f5350c39df9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustasMasiulis%2Fargs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustasMasiulis%2Fargs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustasMasiulis%2Fargs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustasMasiulis%2Fargs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JustasMasiulis","download_url":"https://codeload.github.com/JustasMasiulis/args/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245611874,"owners_count":20643916,"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":["bind","binder","cpp","cpp14","currying","easy-to-use","fast","functional","functional-programming","header-only","modern","modern-cpp","monadic","optimization","reorder","reordering","simple","small","type-erasure"],"created_at":"2024-10-29T23:13:07.966Z","updated_at":"2025-03-26T07:32:12.375Z","avatar_url":"https://github.com/JustasMasiulis.png","language":"C++","readme":"# args\nA header only functional programming support library without type erasure.\n\n```cpp\nvoid foo(int, float, const char*);\n\n// all of the examples below call foo(1, 2.f, \"3\") and are optimized out in release builds\n\nauto reordered = args::reorder\u003c2, 0, 1\u003e(foo);\nreordered(\"3\", 1, 2.f);\n\nauto bound = args::bind\u003c1\u003e(foo, 2.f);\nbound(1, \"hello\");\n\nauto curried = args::curry\u003c0, 2\u003e(foo);\nauto bound2  = curried(1, \"3\");\nbound2(2.f);\n```\n\n## quick documentation\n* Both functions and arguments are stored by value. Use std::ref to avoid copies.\n* Chaining of the library functions is possible.\n* Type erasure is not performed.\n\n```cpp\ntemplate\u003cstd::size_t... ArgIndices, class Fn\u003e\nconstexpr /* callable object */ reorder(Fn\u0026\u0026 function);\n\nreorder\u003c2, 0, 1\u003e(void(int, float, const char*)) -\u003e void(const char*, int, float)\n```\n\n```cpp\ntemplate\u003cstd::size_t... ArgIndices, class Fn, class... Args\u003e\nconstexpr /* callable object */ bind(Fn\u0026\u0026 function, Args\u0026\u0026... values_to_bind);\n\nbind\u003c1\u003e(void(int, float, const char*), float) -\u003e void(int, const char*)\n```\n\n```cpp\ntemplate\u003cstd::size_t... ArgIndices, class Fn\u003e\nconstexpr /* callable object */ curry(Fn\u0026\u0026 function);\n\ncurry\u003c2\u003e(void(int, float, const char*)) -\u003e (void(int, float))(const char*)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustasmasiulis%2Fargs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustasmasiulis%2Fargs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustasmasiulis%2Fargs/lists"}