All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
result?
andassert_result!
- Restore direct raising of exceptions with
Result.unwrap!/1
; that is,Result.unwrap!({:error, reason})
will simply reraisereason
ifreason
is an exception, and otherwise raiseRuntimeError
.
- Support raising from
Result.unwrap!/1
whatever the type of the error reason.
- Add
or_else
to return ok values and execute fallback logic on errors. - Add
collect
to turn a list of results into a result of a list - Add
~>/2
again under the suggestively namedResult.Dangerous
- More detailed typespecs
- Rename
~>/2
to&&&/2
in order to demote the operator's precedence below|>
. This is uglier but gives the typically desired behaviour when continuing a pipeline, e.g.{:error, nil} &&& f() |> g()
will return{:error, nil}
whereas{:error, nil} ~> f() |> g()
would pipe{:error, nil}
intog
.
- Add
tap_ok
andtap_err
- Result types
t()
,t(v)
andt(v, e)
, and specs forOxide.Result
. - More docs
- Changelog
- Garbled exdoc summary rendering
- Initial incomplete release