{"id":17796389,"url":"https://github.com/d-plaindoux/mfun","last_synced_at":"2025-09-03T04:33:01.868Z","repository":{"id":47058474,"uuid":"102581673","full_name":"d-plaindoux/mfun","owner":"d-plaindoux","description":"Micro functional langage","archived":false,"fork":false,"pushed_at":"2021-09-15T11:33:50.000Z","size":2353,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T03:14:24.160Z","etag":null,"topics":["compiler","embedded-language","functional-programming","parser-combinators"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-plaindoux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-06T08:11:45.000Z","updated_at":"2023-03-29T12:28:22.000Z","dependencies_parsed_at":"2022-09-03T01:10:43.238Z","dependency_job_id":null,"html_url":"https://github.com/d-plaindoux/mfun","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/d-plaindoux/mfun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fmfun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fmfun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fmfun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fmfun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-plaindoux","download_url":"https://codeload.github.com/d-plaindoux/mfun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fmfun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273392047,"owners_count":25097255,"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-09-03T02:00:09.631Z","response_time":76,"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":["compiler","embedded-language","functional-programming","parser-combinators"],"created_at":"2024-10-27T11:45:18.356Z","updated_at":"2025-09-03T04:33:01.782Z","avatar_url":"https://github.com/d-plaindoux.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# F\u0026micro;N\n\n[![Build Status](https://travis-ci.org/d-plaindoux/mfun.svg)](https://travis-ci.org/d-plaindoux/mfun)\n[![Coverage Status](https://coveralls.io/repos/d-plaindoux/mfun/badge.png?branch=master)](https://coveralls.io/r/d-plaindoux/mfun?branch=master)\n[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)\n\n## Introduction\n\n[Slides](http://d.plaindoux.free.fr/talks/lambdalille/mfun/index.html#/)\n\nF\u0026micro;N is a micro functional language designed for compilation explanation purpose equiped with primitive data and a naive Javascript interoperability.\n\n## Grammar\n\n```\nId  ::= [a-zA-Z_][a-zA-Z0-9_$?]*\nexp ::= Id                            -- Identifier\n      | Number                        -- Float literal e.g. -1.3e2\n      | String                        -- String literal e.g. \"o_O\"\n      | \"native\" String               -- Native binding\n      | '(' ')'                       -- Unit\n      | '(' exp+ ')'                  -- Block of application\n      | '$' exp+                      -- Infix application\n      | '{' (Id+ \"-\u003e\")? exp+ '}'      -- Abstraction à la Kotlin\n      | \"let\" Id '=' exp+ \"in\" exp+   -- Binding\ndef ::= \"let\" Id '=' exp+\ns0  ::= def* \n```\n\n## Example\n\n```\nlet leq   { l r t f -\u003e native \"leq\"   }\nlet mult  { l r     -\u003e native \"mult\"  }\nlet minus { l r     -\u003e native \"minus\" }\n\nlet cond { c t f -\u003e c t f () }\n\nlet fact { a -\u003e\n    cond (leq a 1)\n         { 1 }\n         { mult a $ fact $ minus a 1 }\n}         \n\nlet _ = fact 12\n```\n\n## License\n\nCopyright (C)2019-2020 D. Plaindoux.\n\nThis program is  free software; you can redistribute  it and/or modify\nit  under the  terms  of  the GNU  Lesser  General  Public License  as\npublished by  the Free Software  Foundation; either version 2,  or (at\nyour option) any later version.\n\nThis program  is distributed in the  hope that it will  be useful, but\nWITHOUT   ANY  WARRANTY;   without  even   the  implied   warranty  of\nMERCHANTABILITY  or FITNESS  FOR  A PARTICULAR  PURPOSE.  See the  GNU\nLesser General Public License for more details.\n\nYou  should have  received a  copy of  the GNU  Lesser General  Public\nLicense along with  this program; see the file COPYING.  If not, write\nto the  Free Software Foundation,  675 Mass Ave, Cambridge,  MA 02139,\nUSA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-plaindoux%2Fmfun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-plaindoux%2Fmfun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-plaindoux%2Fmfun/lists"}