Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Deal

This module is not about Monad or Maybe... it is just a shortcut over the pattern {:ok, value}.

With Deal, you can write code like that:

Deal.with! do
  f(1)
  g()
  h()
end

instead of:

with
    {:ok, a} <- f(1),
    {:ok, b} <- g(a),
    {:ok, c} <- h(b),
do: {:ok, c}

You can checkout the test file for more examples.

Installation

The package can be installed by adding deal to your list of dependencies in mix.exs:

def deps do
  [
    {:deal, "~> 1.0.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/deal.

About

No description or website provided.

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.