{"id":13740646,"url":"https://github.com/MystPi/act","last_synced_at":"2025-05-08T20:32:15.938Z","repository":{"id":229502492,"uuid":"776901569","full_name":"MystPi/act","owner":"MystPi","description":"🎬 Compose stateful actions to simulate mutable state","archived":false,"fork":false,"pushed_at":"2024-06-06T12:14:26.000Z","size":20,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T04:50:24.743Z","etag":null,"topics":["functional-programming","gleam","monad","state"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/act","language":"Gleam","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/MystPi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-24T18:54:31.000Z","updated_at":"2025-03-18T14:54:55.000Z","dependencies_parsed_at":"2024-06-06T13:34:12.209Z","dependency_job_id":"5165604c-5f66-4409-a1da-f806f897d1df","html_url":"https://github.com/MystPi/act","commit_stats":null,"previous_names":["mystpi/act"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MystPi%2Fact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MystPi%2Fact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MystPi%2Fact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MystPi%2Fact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MystPi","download_url":"https://codeload.github.com/MystPi/act/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253144994,"owners_count":21861161,"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","gleam","monad","state"],"created_at":"2024-08-03T04:00:50.892Z","updated_at":"2025-05-08T20:32:15.449Z","avatar_url":"https://github.com/MystPi.png","language":"Gleam","funding_links":[],"categories":["Packages"],"sub_categories":["Data Structures"],"readme":"# 🎬 act\n\n[![Package Version](https://img.shields.io/hexpm/v/act)](https://hex.pm/packages/act)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/act/)\n\nGleam is a functional programming language that does not support having _mutable state_. As such, programmers often have to pass state around manually, threading it through functions via arguments and return values. This can become a bit repetitive and clumsy.\n\nWhat if state could be 'threaded' through functions automatically, with a nice API that resembles mutable state? This is the central idea of `act` and the [`Action`](https://hexdocs.pm/act/act.html#Action) type.\n\n```gleam\ntype Action(result, state) = fn(state) -\u003e #(state, result)\n```\n\n\u003e `act` is inspired by the (now outdated) [gleam-eval](https://github.com/hayleigh-dot-dev/gleam-eval) package. `gleam-eval` is super cool, but only supports the `Result` type and was not created with Gleam's `use` feature in mind.\n\n## Installation\n\n```sh\ngleam add act\n```\n\n## Docs \u0026 Example\n\nDocumentation can be found at \u003chttps://hexdocs.pm/act\u003e. A simple example lives in [test/act_test.gleam](https://github.com/MystPi/act/blob/main/test/act_test.gleam).\n\n## Development\n\n```sh\ngleam run   # Run the project\ngleam test  # Run the tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMystPi%2Fact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMystPi%2Fact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMystPi%2Fact/lists"}