El Monads v0.1.1 ElMonads.Try View Source
This is Try
monad. It contains 2 public methods: m
and get
.
Use m
method to combain your actions:
result = Try.m(fn -> foo() end) |> Try.m(fn e -> bar(e) end) |> Try.get
.
It’ll pass the result of your actions to result
.
If any function return or raise error, result
will be nil.
Link to this section Summary
Link to this section Functions
Link to this function
m(computations, f)
View Source
m([any], function) :: [any]
m(any, function) :: [any]