{"id":25696664,"url":"https://github.com/tizee/zig-fp","last_synced_at":"2026-03-15T08:02:47.166Z","repository":{"id":51537958,"uuid":"519655824","full_name":"tizee/zig-fp","owner":"tizee","description":"some iterator patterns for Zig lang","archived":false,"fork":false,"pushed_at":"2022-08-07T09:38:18.000Z","size":93,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T09:51:12.307Z","etag":null,"topics":["iterator","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tizee.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}},"created_at":"2022-07-31T01:37:43.000Z","updated_at":"2024-11-08T22:24:33.000Z","dependencies_parsed_at":"2022-08-22T06:40:58.054Z","dependency_job_id":null,"html_url":"https://github.com/tizee/zig-fp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tizee%2Fzig-fp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tizee%2Fzig-fp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tizee%2Fzig-fp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tizee%2Fzig-fp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tizee","download_url":"https://codeload.github.com/tizee/zig-fp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319606,"owners_count":21570428,"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":["iterator","zig"],"created_at":"2025-02-25T01:54:57.382Z","updated_at":"2026-03-15T08:02:42.130Z","avatar_url":"https://github.com/tizee.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zig-fp\n\nFunctional programmimng style patterns in Zig lang.\n\n```\nzig version\n0.10.0-dev.3340+c6f5832bb\n```\n\n## Features\n\n- Iterators\n- Monad\n\n## Usage\n\n```zig\nconst std = @import(\"std\");\nconst it = @import(\"zig-fp\");\n\nfn isEven(val: u32) bool {\n  return val % 2 == 0;\n}\n\nfn toChar(val: u32) u8 {\n  if(val % 4 == 0) {\n    return '0';\n  }else{\n    return '1';\n  }\n}\n\nfn print(val: u8) void{\n  std.debug.print(\"{}\\n\", .{val});\n}\n\n\nit.range(u32,0,100,1)\n  .filter(isEven)\n  .map(toChar)\n  .for_each(print);\n```\n\n\u003e Currently Zig does not support closure but we can achieve similar functionality with `comptime` and `type` to build the context for reusing the same iterator interface.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftizee%2Fzig-fp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftizee%2Fzig-fp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftizee%2Fzig-fp/lists"}