Current section
Files
Jump to
Current section
Files
result_macros
README.md
README.md
# Result (macro version)
[](https://github.com/kzemek/result_macros/actions/workflows/ci.yml)
[](https://hex.pm/packages/result_macros)
[](https://hexdocs.pm/result_macros/)
[](https://github.com/kzemek/result_macros/blob/master/LICENSE)
A Result pattern for Elixir.
This is a fork of the [`result`](https://github.com/iodevs/result) library that preserves the same
functions and their semantics, except that everything is implemented as a macro.
I love Rust-like result handling, but incurring a module call overhead every time I'd like to wrap
my values in `{:ok, val}` was too steep a price to pay.
## Installation
The package can be installed by adding `result_macros` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:result_macros, "~> 1.7.2"}
]
end
```