{"id":16720312,"url":"https://github.com/tomokimiyauci/curry","last_synced_at":"2025-04-10T09:53:50.926Z","repository":{"id":37055090,"uuid":"376560195","full_name":"TomokiMiyauci/curry","owner":"TomokiMiyauci","description":"Currying and partial application utilities","archived":false,"fork":false,"pushed_at":"2023-06-05T15:39:21.000Z","size":164,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T04:07:48.114Z","etag":null,"topics":["curry","currying","papply","partial-application","partial-apply"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/TomokiMiyauci.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":"TomokiMiyauci","patreon":"tomoki_miyauci"}},"created_at":"2021-06-13T14:11:35.000Z","updated_at":"2024-03-01T19:36:35.000Z","dependencies_parsed_at":"2024-06-21T07:32:40.642Z","dependency_job_id":"bf9aca8a-0b01-4cb2-9734-94ed45215fbb","html_url":"https://github.com/TomokiMiyauci/curry","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.23076923076923073","last_synced_commit":"b85c229b35a8a519e8f09e16b7b00a9bce443985"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomokiMiyauci%2Fcurry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomokiMiyauci%2Fcurry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomokiMiyauci%2Fcurry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomokiMiyauci%2Fcurry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomokiMiyauci","download_url":"https://codeload.github.com/TomokiMiyauci/curry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198483,"owners_count":21063626,"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":["curry","currying","papply","partial-application","partial-apply"],"created_at":"2024-10-12T22:06:33.176Z","updated_at":"2025-04-10T09:53:50.897Z","avatar_url":"https://github.com/TomokiMiyauci.png","language":"TypeScript","funding_links":["https://github.com/sponsors/TomokiMiyauci","https://patreon.com/tomoki_miyauci"],"categories":[],"sub_categories":[],"readme":"# curry\n\n[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno)](https://deno.land/x/curry)\n[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/curry/mod.ts)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/TomokiMiyauci/curry)](https://github.com/TomokiMiyauci/curry/releases)\n[![codecov](https://codecov.io/github/TomokiMiyauci/curry/branch/main/graph/badge.svg)](https://codecov.io/gh/TomokiMiyauci/curry)\n[![GitHub](https://img.shields.io/github/license/TomokiMiyauci/curry)](https://github.com/TomokiMiyauci/curry/blob/main/LICENSE)\n\n[![test](https://github.com/TomokiMiyauci/curry/actions/workflows/test.yaml/badge.svg)](https://github.com/TomokiMiyauci/curry/actions/workflows/test.yaml)\n[![NPM](https://nodei.co/npm/@miyauci/curry.png?mini=true)](https://nodei.co/npm/@miyauci/curry/)\n\nCurrying and partial application utilities.\n\n## Currying\n\nProvides features related to currying.\n\n\u003e currying is the technique of translating the evaluation of a function that\n\u003e takes multiple arguments into evaluating a sequence of functions, each with a\n\u003e single argument.\n\n### curry\n\n[![curry:curry](https://deno.bundlejs.com/?q=https://deno.land/x/curry/mod.ts\u0026treeshake=[{+curry+}]\u0026badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fcurry%2Fmod.ts\u0026treeshake=%5B%7B+curry+%7D%5D#sharing)\n\n`curry` returns curried function.\n\n```ts\nimport { curry } from \"https://deno.land/x/curry@$VERSION/mod.ts\";\n\ndeclare const fn: (a: string, b: number, c: boolean) =\u003e void;\nconst curriedFn = curry(fn);\n\ncurriedFn(\"\")(0)(false);\ncurriedFn(\"\", 0)(false);\ncurriedFn(\"\", 0, false);\n```\n\n## Partial application\n\nPartial application refers to the process of fixing a number of arguments to a\nfunction, producing another function of smaller arity.\n\nIt has the following characteristics:\n\n- The `length` property is not strict.\n- The `name` property is `bound`.\n\n### papplyLeft\n\n[![curry:papplyLeft](https://deno.bundlejs.com/?q=https://deno.land/x/curry/mod.ts\u0026treeshake=[{+papplyLeft+}]\u0026badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fcurry%2Fmod.ts\u0026treeshake=%5B%7B+papplyLeft+%7D%5D#sharing)\n\nCreate a bound function with arguments fixed from the left.\n\n```ts\nimport { papplyLeft } from \"https://deno.land/x/curry@$VERSION/mod.ts\";\n\ndeclare const fn: (a: string, b: number, c: boolean) =\u003e void;\n\nconst ternary = papplyLeft(fn);\nconst binary = papplyLeft(fn, \"\");\nconst unary = papplyLeft(fn, \"\", 0);\nconst nullary = papplyLeft(fn, \"\", 0, false);\n```\n\n### papplyRight\n\n[![curry:partialRight](https://deno.bundlejs.com/?q=https://deno.land/x/curry/mod.ts\u0026treeshake=[{+partialRight+}]\u0026badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fcurry%2Fmod.ts\u0026treeshake=%5B%7B+partialRight+%7D%5D#sharing)\n\nCreate a bound function with arguments fixed from the right\n\n```ts\nimport { papplyRight } from \"https://deno.land/x/curry@$VERSION/mod.ts\";\n\ndeclare const fn: (a: string, b: number, c: boolean) =\u003e void;\n\nconst binary = papplyRight(fn, false);\nconst unary = papplyRight(fn, false, 0);\nconst nullary = papplyRight(fn, false, 0, \"\");\n```\n\n### papplyRest\n\n[![curry:papplyRest](https://deno.bundlejs.com/?q=https://deno.land/x/curry/mod.ts\u0026treeshake=[{+papplyRest+}]\u0026badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fcurry%2Fmod.ts\u0026treeshake=%5B%7B+papplyRest+%7D%5D#sharing)\n\nCreate a bound function with fixed arguments except the first one.\n\n```ts\nimport { papplyRest } from \"https://deno.land/x/curry@$VERSION/mod.ts\";\n\ndeclare const fn: (a: string, b: number, c: boolean) =\u003e void;\n\nconst binary = papplyRest(fn, 0);\nconst unary = papplyRest(fn, 0, false);\n```\n\n## API\n\nSee [deno doc](https://deno.land/x/curry/mod.ts) for all APIs.\n\n## License\n\nCopyright © 2023-present [Tomoki Miyauchi](https://github.com/TomokiMiyauci).\n\nReleased under the [MIT](./LICENSE) license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomokimiyauci%2Fcurry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomokimiyauci%2Fcurry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomokimiyauci%2Fcurry/lists"}