{"id":21730536,"url":"https://github.com/andy2046/y-combinator-node","last_synced_at":"2026-05-10T00:35:50.943Z","repository":{"id":57402639,"uuid":"109208707","full_name":"andy2046/y-combinator-node","owner":"andy2046","description":"implementation of Y combinator in JavaScript for tail call optimization","archived":false,"fork":false,"pushed_at":"2018-03-14T05:09:10.000Z","size":125,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T22:37:16.453Z","etag":null,"topics":["javascript","node","tail-call-optimization","tco","y-combinator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/andy2046.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}},"created_at":"2017-11-02T02:36:33.000Z","updated_at":"2020-06-08T06:27:46.000Z","dependencies_parsed_at":"2022-09-26T17:02:03.020Z","dependency_job_id":null,"html_url":"https://github.com/andy2046/y-combinator-node","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Fy-combinator-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Fy-combinator-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Fy-combinator-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Fy-combinator-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andy2046","download_url":"https://codeload.github.com/andy2046/y-combinator-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244707533,"owners_count":20496749,"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":["javascript","node","tail-call-optimization","tco","y-combinator"],"created_at":"2024-11-26T04:16:15.105Z","updated_at":"2026-05-10T00:35:50.908Z","avatar_url":"https://github.com/andy2046.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# y-combinator-node\ny-combinator-node is an implementation of **Y combinator** in JavaScript for tail call optimization.\n\n## Examples\n```js\nimport { Y } from 'y-combinator-node';\n\nconst fibonacci = Y(fib =\u003e (n =\u003e (n \u003c= 2 ? 1 : fib(n - 1) + fib(n - 2))))\n\nconsole.log( fibonacci(10) )\n// 55\n\nconst factorial = Y(f =\u003e (n =\u003e n === 0 ? 1 : n * f(n - 1)))\n\nconsole.log( factorial(10) )\n// 3628800\n\n```\n\n## Installation\n\n```\nnpm install --save y-combinator-node\n```\n\n## Usage\nYou can import from `y-combinator-node`:\n\n```js\nimport { Y } from 'y-combinator-node';\n// or\nconst { Y } = require('y-combinator-node');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy2046%2Fy-combinator-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandy2046%2Fy-combinator-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy2046%2Fy-combinator-node/lists"}