Gcode.Result.Enum (gcode v0.4.1)
Common enumerableish functions on results.
Link to this section Summary
Functions
Join the string contents of an ok result.
Maps a collection of results using a mapping function.
As long as the result of the reducer is ok, continue reducing, otherwise short circuit
Reverse the enumerable contents of an ok result.
Link to this section Types
Link to this type
result()
Specs
result() :: Gcode.Result.t()
Link to this type
result(result)
Specs
result(result) :: Gcode.Result.t(result)
Link to this type
result(result, error)
Specs
result(result, error) :: Gcode.Result.t(result, error)
Link to this section Functions
Link to this function
join(arg, joiner)
Specs
Join the string contents of an ok result.
Link to this function
map(arg, mapper)
Specs
Maps a collection of results using a mapping function.
Both the input to the map must be an ok result and the result of each mapping function.
Link to this function
reduce_while_ok(elements, acc, reducer)
Specs
reduce_while_ok( enumerable :: any(), accumulator :: any(), reducer :: (any(), any() -> result(any())) ) :: result(any())
As long as the result of the reducer is ok, continue reducing, otherwise short circuit
Link to this function
reverse(arg)
Specs
Reverse the enumerable contents of an ok result.