{"id":28629807,"url":"https://github.com/codebox/scheme-interpreter","last_synced_at":"2025-06-12T12:13:40.385Z","repository":{"id":4326172,"uuid":"5460981","full_name":"codebox/scheme-interpreter","owner":"codebox","description":"An interpreter for a basic subset of the Scheme programming language","archived":false,"fork":false,"pushed_at":"2016-01-14T20:57:02.000Z","size":5,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-11T21:48:13.391Z","etag":null,"topics":["interpreter","scheme","scheme-programming-language"],"latest_commit_sha":null,"homepage":"http://codebox.org.uk/pages/scheme-interpreter-in-python","language":"Python","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/codebox.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":"2012-08-18T07:00:50.000Z","updated_at":"2023-01-04T11:00:40.000Z","dependencies_parsed_at":"2022-07-21T12:18:06.664Z","dependency_job_id":null,"html_url":"https://github.com/codebox/scheme-interpreter","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/codebox/scheme-interpreter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fscheme-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fscheme-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fscheme-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fscheme-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebox","download_url":"https://codeload.github.com/codebox/scheme-interpreter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebox%2Fscheme-interpreter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259462576,"owners_count":22861514,"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":["interpreter","scheme","scheme-programming-language"],"created_at":"2025-06-12T12:13:39.329Z","updated_at":"2025-06-12T12:13:40.369Z","avatar_url":"https://github.com/codebox.png","language":"Python","readme":"\u003cp\u003e\nThis is an interpreter for a sub-set of the Scheme programming language. It was written as a learning exercise, and should not be used for anything important.\n\u003c/p\u003e\n\u003cp\u003e\nTo use the interpreter, write your Scheme code into a text file and run \u003ccode\u003escheme.py\u003c/code\u003e, passing the file name and location as a\ncommand-line argument, for example:\n\u003c/p\u003e\n\n\u003cpre\u003e\npython scheme.py mycode.txt\n\u003c/pre\u003e\n\n\u003cp\u003e\nThe interpreter supports basic arithmetic and equality operators, conditional statements, the \u003ccode\u003econs\u003c/code\u003e/\u003ccode\u003ecar\u003c/code\u003e/\u003ccode\u003ecdr\u003c/code\u003e\nlist operations, \u003ccode\u003edefine\u003c/code\u003e and \u003ccode\u003elambda\u003c/code\u003e.\n\u003c/p\u003e\n\u003cp\u003e\nEach statement in the source file will be evaluated in turn, and any printable results will be displayed to standard output. A few\nworking Scheme programs and their resulting output are shown below:\n\u003c/p\u003e\n\n\u003cpre\u003e\n(define factorial (\n    lambda (n) (\n        if (= n 1) \n            1 \n            (* n (factorial (- n 1)))\n        )\n    )\n)\n(factorial 6)\n\u003c/pre\u003e\n\u003cpre\u003e\n720.0\n\u003c/pre\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cpre\u003e\n(define fib (\n    lambda (n) (\n        if (\u0026lt; n 3)\n            1\n            (+ (fib (- n 1)) (fib (- n 2)))\n        )\n    )\n)\n(fib 10)\n\u003c/pre\u003e\n\u003cpre\u003e\n55.0\n\u003c/pre\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cpre\u003e\n(define ackermann (\n        lambda (m n) (\n            if (= m 0)\n                (+ n 1)\n                (if (= n 0)\n                    (ackermann (- m 1) 1)\n                    (ackermann (- m 1) (ackermann m (- n 1))))\n        )\n    )\n)\n(ackermann 3 3)\n\u003c/pre\u003e\n\u003cpre\u003e\n61.0\n\u003c/pre\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebox%2Fscheme-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebox%2Fscheme-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebox%2Fscheme-interpreter/lists"}