{"id":18016918,"url":"https://github.com/fitzgen/cl-pattern-matching","last_synced_at":"2025-04-04T15:32:59.323Z","repository":{"id":915910,"uuid":"677623","full_name":"fitzgen/cl-pattern-matching","owner":"fitzgen","description":"Erlang/Haskell style pattern matching macros for Common Lisp.","archived":false,"fork":false,"pushed_at":"2012-11-16T18:53:19.000Z","size":103,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T11:59:39.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Common Lisp","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/fitzgen.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}},"created_at":"2010-05-20T18:53:26.000Z","updated_at":"2022-05-20T13:36:56.000Z","dependencies_parsed_at":"2022-08-16T11:25:25.286Z","dependency_job_id":null,"html_url":"https://github.com/fitzgen/cl-pattern-matching","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/fitzgen%2Fcl-pattern-matching","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Fcl-pattern-matching/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Fcl-pattern-matching/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzgen%2Fcl-pattern-matching/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzgen","download_url":"https://codeload.github.com/fitzgen/cl-pattern-matching/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247202666,"owners_count":20900826,"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":[],"created_at":"2024-10-30T04:19:41.546Z","updated_at":"2025-04-04T15:32:59.302Z","avatar_url":"https://github.com/fitzgen.png","language":"Common Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"CL-Pattern-Matching\n===================\n\n`let-match`\n===========\n\n    CL-USER\u003e (let-match ((1 2 ?three) '(1 2 3))\n               (* ?three ?three))\n    9\n    T\n    CL-USER\u003e (let-match ((1 2 ?three) '(3 2 1))\n               (* ?three ?three))\n    NIL\n    NIL\n    CL-USER\u003e (let-match ((1 2 ?three) '(1 2 3))\n               nil)\n    NIL\n    T\n\n`cond-match`\n============\n\n    CL-USER\u003e (defvar form nil)\n    FORM\n    CL-USER\u003e (cond-match form\n               (nil \"Nil!\")\n               (1 \"One!\")\n               (?x ?x))\n    \"Nil!\"\n    CL-USER\u003e (setf form 1)\n    1\n    CL-USER\u003e (cond-match form\n               (nil \"Nil!\")\n               (1 \"One!\")\n               (?x ?x))\n    \"One!\"\n    CL-USER\u003e (setf form \"Yo mama!\")\n    \"Yo mama!\"\n    CL-USER\u003e (cond-match form\n               (nil \"Nil!\")\n               (1 \"One!\")\n               (?x ?x))\n    \"Yo mama!\"\n\n`defun-match`\n=============\n\n    CL-USER\u003e (defun-match desc-args\n               (nil \"No args!\")\n               ((?x) \"One argument!\")\n               ((?x ?y) \"Two arguments!\")\n               ((?x ?y . ?z) \"More than two arguments!\"))\n    DESC-ARGS\n    CL-USER\u003e (desc-args)\n    \"No args!\"\n    CL-USER\u003e (desc-args 1)\n    \"One argument!\"\n    CL-USER\u003e (desc-args 1 2)\n    \"Two arguments!\"\n    CL-USER\u003e (desc-args 1 2 3)\n    \"More than two arguments!\"\n    CL-USER\u003e (defun-match my-map\n               ((?fn nil) nil)\n               ((?fn (?car . ?cdr)) (cons (funcall ?fn ?car)\n                                          (my-map ?fn ?cdr))))\n    MY-MAP\n    CL-USER\u003e (my-map #'(lambda (x) (* x x))\n                     '(1 2 3 4 5 6))\n    (1 4 9 16 25 36)\n    CL-USER\u003e (defun-match factorial\n               ((0) 1)\n               ((?x) (* ?x (factorial (- ?x 1)))))\n    FACTORIAL\n    CL-USER\u003e (factorial 1)\n    1\n    CL-USER\u003e (factorial 3)\n    6\n    CL-USER\u003e (factorial 5)\n    120\n    CL-USER\u003e (factorial 7)\n    5040\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitzgen%2Fcl-pattern-matching","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffitzgen%2Fcl-pattern-matching","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitzgen%2Fcl-pattern-matching/lists"}