{"id":15732960,"url":"https://github.com/packquickly/little_lambda","last_synced_at":"2025-03-31T03:44:06.085Z","repository":{"id":192439973,"uuid":"645174888","full_name":"packquickly/little_lambda","owner":"packquickly","description":"Function composition, the un-Pythonic way!","archived":false,"fork":false,"pushed_at":"2023-09-04T09:30:38.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T08:24:18.954Z","etag":null,"topics":["functional-programming","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/packquickly.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,"governance":null}},"created_at":"2023-05-25T04:54:52.000Z","updated_at":"2023-09-03T18:35:31.000Z","dependencies_parsed_at":"2023-09-04T19:46:54.572Z","dependency_job_id":null,"html_url":"https://github.com/packquickly/little_lambda","commit_stats":null,"previous_names":["packquickly/little_lambda"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packquickly%2Flittle_lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packquickly%2Flittle_lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packquickly%2Flittle_lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packquickly%2Flittle_lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/packquickly","download_url":"https://codeload.github.com/packquickly/little_lambda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246413229,"owners_count":20773053,"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":["functional-programming","python"],"created_at":"2024-10-04T00:40:26.472Z","updated_at":"2025-03-31T03:44:06.064Z","avatar_url":"https://github.com/packquickly.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align='center'\u003eLittle λ\u003c/h1\u003e\nLittle λ is a tiny python utility for function composition!\n\nLittle λ supports a functional-like syntax for function composition by\nextending the `@` operator used for linear function composition to\nnonlinear functions.\n\nTo use, simply put a little `λ` at the start of the functions\nyou want to compose separated by composition operators `@`:\n\n```python\nn_unique = λ @ len @ set\nn_unique([1, 1, 4, 5])\n# returns 3\n```\n\nThe `λ` can also be used to generate simple lambda functions from\nmost binary operations, which can themselves be composed:\n\n```python\nis_even = (λ == 0) @ (λ % 2)\n```\n\nNote that the term `(λ == 0)` counts as a `λ` at the start of the\ncomposition.\n\nFinally, Little `λ` can be used for partial application via `λ(fn, *args, **kwargs)`.\nThis makes it particularly easy to use `λ` with higher-order functions:\n\n```python\nsum_of_squares = λ @ sum @ λ(map, λ ** 2)\n```\n\nHere, `λ(map, λ ** 2)` is the map function, partially applied with the square function.\n\n\nLittle λ makes your functional Python code look the part!\n```python\nsum_of_even_squares = λ @ sum @ λ(map, λ ** 2) @ λ(filter, (λ == 0) @ (λ % 2))\n```\n\n\n\u003ch1 align='center'\u003eWARNING\u003c/h1\u003e\nLittle λ is not a maintained package and is not intended for serious use.\nIt is by design not Pythonic, and it likely has many edge-cases I'm unaware of,\nand may not ever fix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackquickly%2Flittle_lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpackquickly%2Flittle_lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackquickly%2Flittle_lambda/lists"}