{"id":27040435,"url":"https://github.com/ldb/lambda","last_synced_at":"2025-08-15T23:09:26.592Z","repository":{"id":144290464,"uuid":"314700638","full_name":"ldb/lambda","owner":"ldb","description":"An implementation of the untyped Lambda Calculus.","archived":false,"fork":false,"pushed_at":"2020-12-08T20:41:33.000Z","size":679,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T03:29:09.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/ldb.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-21T00:24:44.000Z","updated_at":"2021-01-07T11:36:30.000Z","dependencies_parsed_at":"2024-04-18T22:55:05.701Z","dependency_job_id":null,"html_url":"https://github.com/ldb/lambda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ldb/lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldb%2Flambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldb%2Flambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldb%2Flambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldb%2Flambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldb","download_url":"https://codeload.github.com/ldb/lambda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldb%2Flambda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270644755,"owners_count":24621332,"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-08-15T02:00:12.559Z","response_time":110,"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":[],"created_at":"2025-04-05T03:29:12.206Z","updated_at":"2025-08-15T23:09:26.567Z","avatar_url":"https://github.com/ldb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lambda\n_lambda_ is an implementation of the untyped Lambda Calculus.\n\n## The Lambda calculus\n\n\"[The Lambda calculus](https://en.wikipedia.org/wiki/Lambda_calculus) is a formal system in mathematical logic for \nexpressing computation based on function abstraction and application using variable binding and substitution.\"\n\n### Grammar\n\nThe grammar for the untyped Lambda calculus is fairly simple. Here it is in [EBNF](https://en.wikipedia.org/wiki/Extended_Backus–Naur_form):\n```\nvariable    = \"v\" | variable, \"'\";\napplication = term, \" \", term;\nabstraction = \"λ\", letter, \".\", term;\nterm        = variable | \"(\", application, \")\" | \"(\", abstraction, \")\";\n``` \n\nExamples for valid `terms` (\"lambda-terms\"):\n\n```\nv\n(v v')\n(λv.v)\n(λv.(v v')\n((λv.((λv''.(v'' v')) v)) v''')\n```\n\n## The _lambda_ language\n### Grammar\nWe make some small changes to the lambda calculus' grammar for our convenience:\n\nFirst, we replace the variable rule by the following one:\n```\nvariable = \"a\" | \"b\" | ... | \"z\";\n```\nWhile the original rule technically allowed for an infinite number of variables, \nwe very likely won't run into issues limiting ourselves to just 26 variable names.\n\nSecondly, we add a rule to allow omitting the outermost parentheses:\n```\nlambdaterm  = variable | application | abstraction | term;\n```\n\nNow, we make a small change to the `abstraction` rule:\n```\nabstraction = \"\\\", letter, \".\" , ( abstraction | term );\n```\nThis is allows us to write nested abstractions more easily, without having to use many parentheses, for example `λx.λy.(x y)`.\n\nFinally, also substitute the `λ` symbol for `\\ ` to make it easier to type.\n\nAs a result, these are also valid terms in _lambda_:\n\n```\nx y\n\\x.x\n\\x.(x y)\n(x y) (x y)\n\\x.\\y.(x y)\n```\n\nThe final grammar now looks like this:\n\n```\nvariable    = \"a\" | \"b\" | ... | \"z\";\napplication = term, \" \", term;\nabstraction = \"\\\", letter, \".\" , ( abstraction | term );\nterm        = variable | \"(\", application, \")\" | \"(\", abstraction, \")\";\nlambdaterm  = variable | application | abstraction | term;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldb%2Flambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldb%2Flambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldb%2Flambda/lists"}