{"id":13776408,"url":"https://github.com/dwayne/elm-monkey-interpreter","last_synced_at":"2025-10-28T09:04:45.990Z","repository":{"id":138664399,"uuid":"499126688","full_name":"dwayne/elm-monkey-interpreter","owner":"dwayne","description":"A Monkey interpreter written in Elm.","archived":false,"fork":false,"pushed_at":"2022-06-06T11:20:01.000Z","size":120,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-16T03:17:52.194Z","etag":null,"topics":["elm","interpreter","monkey"],"latest_commit_sha":null,"homepage":"https://elm-monkey-interpreter.netlify.app/","language":"Elm","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/dwayne.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":"2022-06-02T12:29:16.000Z","updated_at":"2024-08-03T18:10:21.862Z","dependencies_parsed_at":null,"dependency_job_id":"0a51a332-d3fc-4d92-9abc-80b848cae26f","html_url":"https://github.com/dwayne/elm-monkey-interpreter","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/dwayne%2Felm-monkey-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwayne%2Felm-monkey-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwayne%2Felm-monkey-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwayne%2Felm-monkey-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwayne","download_url":"https://codeload.github.com/dwayne/elm-monkey-interpreter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223286474,"owners_count":17120000,"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":["elm","interpreter","monkey"],"created_at":"2024-08-03T18:00:24.977Z","updated_at":"2025-10-28T09:04:40.965Z","avatar_url":"https://github.com/dwayne.png","language":"Elm","funding_links":[],"categories":["Languages"],"sub_categories":["Interpreters"],"readme":"# Elm Monkey Interpreter ([Playground](https://elm-monkey-interpreter.netlify.app/))\n\nA [Monkey](https://monkeylang.org/) interpreter written in\n[Elm](https://elm-lang.org/).\n\nMonkey is a programming language designed by\n[Thorsten Ball](https://thorstenball.com/) that is fully described in his\n[interpreter](https://interpreterbook.com/) book.\n\n## Syntax\n\nThe syntax of Monkey is scattered throughout the pages of the book. However, I\nextracted a [context-free grammar](grammar.ebnf) that you can use to learn the\nsyntax.\n\n```\nlet filter = fn (pred, arr) {\n  let iter = fn (arr, accumulated) {\n    if (len(arr) == 0) {\n      accumulated\n    } else {\n      if (pred(first(arr))) {\n        iter(rest(arr), push(accumulated, first(arr)))\n      } else {\n        iter(rest(arr), accumulated)\n      }\n    }\n  };\n  iter(arr, [])\n};\n\nlet mod = fn (a, b) {\n  a - a / b * b\n};\n\nlet isEven = fn (n) {\n  mod(n, 2) == 0\n};\n\nfilter(isEven, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n```\n\nYou can also use the [parser tests](tests/Test/Monkey/Parser.elm) as a guide.\n\n## Semantics\n\nThe semantics is defined by the [interpreter](src/Monkey/Interpreter.elm). You\ncan get a sense for it by reading through the extensive suite of\n[interpreter tests](tests/Test/Monkey/Interpreter.elm).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwayne%2Felm-monkey-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwayne%2Felm-monkey-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwayne%2Felm-monkey-interpreter/lists"}