{"id":33180736,"url":"https://github.com/mndrix/function_expansion","last_synced_at":"2025-11-20T21:04:47.173Z","repository":{"id":6456227,"uuid":"7695922","full_name":"mndrix/function_expansion","owner":"mndrix","description":"Help for writing function-like macros","archived":true,"fork":false,"pushed_at":"2016-10-27T19:06:47.000Z","size":152,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T22:45:07.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Prolog","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mndrix.png","metadata":{"files":{"readme":"README","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":"2013-01-18T22:49:52.000Z","updated_at":"2023-01-28T15:51:15.000Z","dependencies_parsed_at":"2022-08-06T19:15:38.893Z","dependency_job_id":null,"html_url":"https://github.com/mndrix/function_expansion","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mndrix/function_expansion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mndrix%2Ffunction_expansion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mndrix%2Ffunction_expansion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mndrix%2Ffunction_expansion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mndrix%2Ffunction_expansion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mndrix","download_url":"https://codeload.github.com/mndrix/function_expansion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mndrix%2Ffunction_expansion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285512111,"owners_count":27184310,"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-11-20T02:00:05.334Z","response_time":54,"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":[],"created_at":"2025-11-16T04:00:23.089Z","updated_at":"2025-11-20T21:04:47.167Z","avatar_url":"https://github.com/mndrix.png","language":"Prolog","funding_links":[],"categories":["Development"],"sub_categories":[],"readme":"# Synopsis\n\n    :- use_module(library(function_expansion)).\n    user:function_expansion(incr(N), X, X is N+1).\n    main :-\n        format('After 2 comes ~p~n', [incr(2)]).\n\n# Description\n\nProlog doesn't offer function syntax.  Anything one can do with\nfunctions, she can do with predicates. The syntax is a little\nverbose because it requires an auxiliary variable.\n\nFor example, one might approximate pi:\n\n    pi(3.14159).\n    main :-\n        pi(Pi),\n        format('pi is roughly ~p~n', [Pi]).\n\nIt's often obnoxious to think up a name for an auxiliary variable.\nfunction_expansion/3 lets you write macros so that `pi` can be included\ndirectly in format's arguments.  Auxiliary variables are generated for\nyou at compile time.\n\nRepository available on GitHub: https://github.com/mndrix/function_expansion\n\n# Installation\n\nUsing SWI-Prolog 6.3 or later:\n\n    $ swipl\n    1 ?- pack_install(function_expansion).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmndrix%2Ffunction_expansion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmndrix%2Ffunction_expansion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmndrix%2Ffunction_expansion/lists"}