{"id":18006088,"url":"https://github.com/brianhicks/aaron","last_synced_at":"2026-03-19T02:51:21.849Z","repository":{"id":4570885,"uuid":"5712342","full_name":"BrianHicks/aaron","owner":"BrianHicks","description":"Syntactic sugar for function composition","archived":false,"fork":false,"pushed_at":"2012-09-07T14:05:16.000Z","size":152,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-02T06:07:43.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://aaron.readthedocs.org/en/latest/","language":null,"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/BrianHicks.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":"2012-09-07T04:04:29.000Z","updated_at":"2016-09-27T13:26:00.000Z","dependencies_parsed_at":"2022-09-26T16:21:54.914Z","dependency_job_id":null,"html_url":"https://github.com/BrianHicks/aaron","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/BrianHicks%2Faaron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Faaron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Faaron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Faaron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianHicks","download_url":"https://codeload.github.com/BrianHicks/aaron/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166143,"owners_count":20894652,"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-30T00:23:14.588Z","updated_at":"2026-01-19T14:31:59.379Z","avatar_url":"https://github.com/BrianHicks.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aaron\n\n[![Build Status](https://secure.travis-ci.org/BrianHicks/aaron.png)](http://travis-ci.org/BrianHicks/aaron)\n\nAaron adds some syntactic sugar to Python function composition.\n\n## How?\n\nSay you have the following functions:\n\n```python\ndef add_one(n):\n    return n + 1\n\ndef double(n):\n    return n * 2\n\ndef ints_less_than(n):\n    return range(1,n)\n\ndef product(*ns):\n    result = 1\n    for n in ns:\n        result *= n\n\n    return result\n```\n\nYou could do something like this:\n\n```python\ndef two_n_plus_one(n):\n  return add_one(double(n))\n\ndef product_of_lesser_numbers(n):\n  return product(*ints_less_than(n))\n```\n\nOr, you could use Aaron, decorate your functions with `composable`, and do this:\n\n```python\ntwo_n_plus_one = double \u003e add_one\n\nproduct_of_lesser_numbers = ints_less_than \u003e\u003e product\n```\n\nYou've probably figured out by now that `\u003e` is composition, and `\u003e\u003e` is will\nsplat the results into the next function.\n\n## Aaron? What?\n\nYeah, the [composer](http://en.wikipedia.org/wiki/Aaron_Copland). Get it?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhicks%2Faaron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianhicks%2Faaron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhicks%2Faaron/lists"}