Packages
pipe_operators
0.1.1
This lib adds a "new" pipe operator that is similar to the Maybe type on other functional programming languages.
Current section
Files
Jump to
Current section
Files
lib/pipe_operators.ex
defmodule PipeOperators.SkipOnErrorPipe do
defmacro previous_value ~> function do
quote do
unquote(previous_value)
|> case do
{:error, error} -> {:error, error}
result -> result |> unquote(function)
end
end
end
end