{"id":17130699,"url":"https://github.com/jechol/reather","last_synced_at":"2025-04-12T13:51:48.573Z","repository":{"id":39874388,"uuid":"451394236","full_name":"jechol/reather","owner":"jechol","description":"Either transformed Reader monad (reather = REAder + eiTHER)","archived":false,"fork":false,"pushed_at":"2024-05-03T08:35:36.000Z","size":341,"stargazers_count":11,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T06:09:14.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jechol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-01-24T09:16:37.000Z","updated_at":"2023-10-22T07:17:31.000Z","dependencies_parsed_at":"2023-01-21T04:15:10.661Z","dependency_job_id":"1e1065ee-02f0-44e0-968d-e4011dde9ad9","html_url":"https://github.com/jechol/reather","commit_stats":{"total_commits":334,"total_committers":7,"mean_commits":"47.714285714285715","dds":"0.28742514970059885","last_synced_commit":"539917435c28d84bc2c0dbf46c276cc3c0c994c4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jechol%2Freather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jechol%2Freather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jechol%2Freather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jechol%2Freather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jechol","download_url":"https://codeload.github.com/jechol/reather/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248575794,"owners_count":21127276,"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-14T19:12:59.722Z","updated_at":"2025-04-12T13:51:48.551Z","avatar_url":"https://github.com/jechol.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![mix test](https://github.com/jechol/reather/workflows/mix%20test/badge.svg)](https://github.com/jechol/reather/actions)\n[![Hex version badge](https://img.shields.io/hexpm/v/reather.svg)](https://hex.pm/packages/reather)\n[![License badge](https://img.shields.io/hexpm/l/reather.svg)](https://github.com/jechol/reather/blob/main/LICENSE.md)\n[![Coverage Status](https://coveralls.io/repos/github/jechol/reather/badge.svg?branch=main)](https://coveralls.io/github/jechol/reather?branch=main)\n\n`reather`\u003csub\u003e[ˈriːθə(r)]\u003c/sub\u003e is `def` for Witchcraft's Reader + Either monads.\n\n## Installation\n\nThe package can be installed by adding `reather` to your list of dependencies\nin `mix.exs`:\n\n```elixir\ndef deps do\n  [{:reather, \"~\u003e 0.1\"}]\nend\n```\n\nTo format `reather` like `def`, add following to your `.formatter.exs`\n\n```elixir\nlocals_without_parens: [reather: 2]\n```\n\n## Usage\n\n#### `reather`, `ask`, `let`, `run`\n\n```elixir\ndefmodule Example do\n  use Reather\n\n  reather next(number) do\n    n \u003c- number\n    %{step: step} \u003c- Reather.ask()\n\n    let sum = n + step\n    sum\n  end\n\n  test \"next/1\" do\n    assert Right.new(15) == next(10) |\u003e Reather.run(%{step: 5})\n    assert Right.new(15) == next(Right.new(10)) |\u003e Reather.run(%{step: 5})\n    assert Right.new(15) == next(Reather.of(10)) |\u003e Reather.run(%{step: 5})\n\n    assert Left.new(:NaN) == next(Left.new(:NaN)) |\u003e Reather.run(%{step: 5})\n    assert Left.new(:NaN) == next(Reather.of(Left.new(:NaN))) |\u003e Reather.run(%{step: 5})\n  end\nend\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjechol%2Freather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjechol%2Freather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjechol%2Freather/lists"}