Skip to content

Commit

Permalink
📝 update README
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdd authored Feb 15, 2024
1 parent 2349b76 commit ee5b4d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ ok(42) == {:ok, 42}
err(:not_found) == {:error, :not_found}
# true

:ok |> is_ok?()
:ok |> ok?()
# true

ok(42) |> is_ok?()
ok(42) |> ok?()
# true

err(:not_found) |> is_err?()
err(:not_found) |> err?()
# true

ok(1) |> map(fn v -> v + 1 end)
Expand Down Expand Up @@ -130,10 +130,10 @@ With function guards:
```elixir
import Rustic.Result

def handle_result(val) when is_ok_result(val) do
def handle_result(val) when is_ok(val) do
# ...
end
def handle_result(val) when is_err_result(val) do
def handle_result(val) when is_err(val) do
# ...
end
def handle_result(val) do
Expand Down

0 comments on commit ee5b4d0

Please sign in to comment.