{"id":29135766,"url":"https://github.com/fccm2/cart-prod","last_synced_at":"2025-06-30T10:08:10.627Z","repository":{"id":297795111,"uuid":"997927862","full_name":"fccm2/cart-prod","owner":"fccm2","description":"Mapping functions on 2 input lists, based on cartesian-product comparision of their elements.","archived":false,"fork":false,"pushed_at":"2025-06-07T14:04:18.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-07T14:35:15.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fccm2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","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,"zenodo":null}},"created_at":"2025-06-07T13:53:15.000Z","updated_at":"2025-06-07T14:05:56.000Z","dependencies_parsed_at":"2025-06-07T14:46:46.148Z","dependency_job_id":null,"html_url":"https://github.com/fccm2/cart-prod","commit_stats":null,"previous_names":["fccm2/cart-prod"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fccm2/cart-prod","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccm2%2Fcart-prod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccm2%2Fcart-prod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccm2%2Fcart-prod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccm2%2Fcart-prod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fccm2","download_url":"https://codeload.github.com/fccm2/cart-prod/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccm2%2Fcart-prod/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262753173,"owners_count":23358884,"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":"2025-06-30T10:08:08.094Z","updated_at":"2025-06-30T10:08:10.610Z","avatar_url":"https://github.com/fccm2.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mapping, and eventually filtering and folding, 2 input lists\nbased on the comparision of their elements as a cartesian-product,\nand while preserving their original structure.\n\nSo the function:  \n```ocaml\nval cart_prod_map :\n  ('a -\u003e 'b -\u003e 'a * 'b) -\u003e 'a list -\u003e 'b list -\u003e 'a list * 'b list\n```\n\nUsed like this:  \n```ocaml\nlet chars = ['A'; 'B'; 'C']\nlet nums = [1; 2; 3; 4]\n\nlet cs, ns =\n  cart_prod_map (fun c n -\u003e\n    if (c, n) = ('A', 3)\n    then ('a', 30)\n    else (c, n)\n  ) chars nums\n```\n\nwill return:  \n```ocaml\nval cs : char list = ['a'; 'B'; 'C']\nval ns : int list = [1; 2; 30; 4]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffccm2%2Fcart-prod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffccm2%2Fcart-prod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffccm2%2Fcart-prod/lists"}