{"id":32195455,"url":"https://github.com/randomseed-io/futils","last_synced_at":"2026-02-18T22:02:29.392Z","repository":{"id":62433039,"uuid":"268633918","full_name":"randomseed-io/futils","owner":"randomseed-io","description":"Function Utilities Library for Clojure","archived":false,"fork":false,"pushed_at":"2020-06-25T14:57:01.000Z","size":262,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-30T13:41:48.484Z","etag":null,"topics":["apply","arity","clojure","comp","default-arguments","function-arguments","function-composition","functional","mapply","named-arguments","named-parameters","nameize","repeat","transformation"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/randomseed-io.png","metadata":{"files":{"readme":"README.md","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":"2020-06-01T21:14:37.000Z","updated_at":"2022-04-03T18:11:36.000Z","dependencies_parsed_at":"2022-11-01T21:01:39.558Z","dependency_job_id":null,"html_url":"https://github.com/randomseed-io/futils","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/randomseed-io/futils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomseed-io%2Ffutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomseed-io%2Ffutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomseed-io%2Ffutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomseed-io%2Ffutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randomseed-io","download_url":"https://codeload.github.com/randomseed-io/futils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomseed-io%2Ffutils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["apply","arity","clojure","comp","default-arguments","function-arguments","function-composition","functional","mapply","named-arguments","named-parameters","nameize","repeat","transformation"],"created_at":"2025-10-22T02:12:59.936Z","updated_at":"2026-02-18T22:02:29.387Z","avatar_url":"https://github.com/randomseed-io.png","language":"Clojure","readme":"# futils – Function Utilities Library\n\n[![Futils on Clojars](https://img.shields.io/clojars/v/io.randomseed/futils.svg)](https://clojars.org/io.randomseed/futils)\n[![CircleCI](https://circleci.com/gh/randomseed-io/futils.svg?style=svg)](https://circleci.com/gh/randomseed-io/futils)\n\nThis library defines forms that abstract some common operations on functions,\nincluding counting arguments, creating wrappers, passing proper number of\narguments and transforming positional-based arities into named ones.\n\n## Installation\n\nTo use futils in your project, add the following to dependencies section of\n`project.clj` or `build.boot`:\n\n```clojure\n[io.randomseed/futils \"1.2.3\"]\n```\n\nFor `deps.edn` add the following as an element of a map under `:deps` or\n`:extra-deps` key:\n\n```clojure\nio.randomseed/futils {:mvn/version \"1.2.3\"}\n```\n\nYou can also download JAR from [Clojars](https://clojars.org/io.randomseed/futils).\n\n## Components\n\nCurrently prvided macros and functions are:\n\n* [`argc`][argc] – counts arguments a function takes (for all arities),\n* [`apply`][apply] – works like `clojure.core/apply` but for named arguments,\n* [`comp`][comp] – works like `clojure.core/comp` but for named arguments,\n* [`frepeat`][frepeat] – creates a sequence of returned values using a function\n  with named parameters,\n* [`identity`][identity] – works like `clojure.core/identity` but for named arguments,\n* [`nameize`][nameize] – transforms a function so it accepts named arguments,\n* [`nameize*`][nameize*] – like `nameize` but requires symbols to be quoted,\n* [`relax`][relax] – wraps a function in a way that it accepts any number of\n  arguments,\n* [`relax*`][relax*] – like `relax` but it requires to explicitly\n  describe the accepted arities.\n\n## Documentation\n\nFull documentation with usage examples is available on:\n\n* https://randomseed.io/software/futils/\n\n## Sneak peeks\n\n```clojure\n(require 'futils.args)\n(require 'futils.named)\n\n;; counting arities\n;;\n(futils.args/argc reduce)\n; =\u003e {:arities (2 3)\n      :engine :jvm\n      :variadic false}\n\n;; relaxing arities\n;;\n(def f (futils.args/relax reduce))\n(f + 0 [1 2 3 4] :ignored :args)\n; =\u003e 10\n\n(def f (futils.args/relax #(vector %1 %2)))\n(f 1)\n; =\u003e [1 nil]\n\n(def f (futils.args/relax #(vector %1 %2) :verbose true))\n(f 1)\n; =\u003e {:argc-cutted 0\n; =\u003e  :argc-padded 1\n; =\u003e  :argc-received 1\n; =\u003e  :argc-sent 2\n; =\u003e  :args-received (1)\n; =\u003e  :args-sent (1 nil)\n; =\u003e  :arities (2)\n; =\u003e  :arity-matched 2\n; =\u003e  :engine :jvm\n; =\u003e  :result [1 nil]\n; =\u003e  :variadic false\n; =\u003e  :variadic-used false\n; =\u003e  :verbose true}\n\n;; nameization\n;;\n(def f (futils.named/nameize\n        reduce\n        [f coll]\n        [f val coll]))\n\n(f :f +\n   :coll [1 1 2 3])\n; =\u003e 7\n\n(f :f +\n   :val 1\n   :coll [1 1 2 3])\n; =\u003e 8\n\n;; function composition\n;;\n(defn f1 [\u0026 {:as args}] (assoc args :f1 1))\n(defn f2 [\u0026 {:as args}] (assoc args :f2 2))\n(def f (futils.named/comp f1 f2))\n\n(f :a 1 :b 2)\n; =\u003e {:a 1 :b 2 :f1 1 :f2 2}\n```\n\n## Examples\n\nExamples can be found in the documentation or in test files located under\n`test/futils` subdirectory of the sources.\n\n## Development\n\n### Building docs\n\n```bash\nmake docs\n```\n\n### Building JAR\n\n```bash\nmake jar\n```\n\n### Rebuilding POM\n\n```bash\nmake pom\n```\n\n### Signing POM\n\n```bash\nmake sig\n```\n\n### Deploying to Clojars\n\n```bash\nmake deploy\n```\n\n### Interactive development\n\n```bash\nbin/repl\n```\n\nStarts REPL and nREPL server (port number is stored in `.nrepl-port`).\n\n## License\n\nCopyright © 2015-2020 Paweł Wilk\n\nFutils is copyrighted software owned by Paweł Wilk (pw@gnu.org). You may\nredistribute and/or modify this software as long as you comply with the terms of\nthe [GNU Lesser General Public License][LICENSE] (version 3).\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[NEWS.md]:    https://github.com/siefca/futils/blob/master/NEWS.md\n[LICENSE]:    https://github.com/siefca/futils/blob/master/LICENSE\n[argc]:       https://randomseed.io/software/futils/#argc\n[relax]:      https://randomseed.io/software/futils/#relax\n[relax*]:     https://randomseed.io/software/futils/#relax*\n[nameize]:    https://randomseed.io/software/futils/#nameize\n[nameize*]:   https://randomseed.io/software/futils/#nameize*\n[frepeat]:    https://randomseed.io/software/futils/#frepeat\n[apply]:      https://randomseed.io/software/futils/#apply\n[comp]:       https://randomseed.io/software/futils/#comp\n[identity]:   https://randomseed.io/software/futils/#identity\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomseed-io%2Ffutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandomseed-io%2Ffutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomseed-io%2Ffutils/lists"}