Gcode.Result.Enum (gcode v1.0.1)
Common enumerableish functions on results.
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.
Types
Link to this type
result()
@type result() :: Gcode.Result.t()
Link to this type
result(result)
@type result(result) :: Gcode.Result.t(result)
Link to this type
result(result, error)
@type result(result, error) :: Gcode.Result.t(result, error)
Functions
Link to this function
join(arg, joiner)
Join the string contents of an ok result.
Link to this function
map(arg, mapper)
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)
@spec 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)
Reverse the enumerable contents of an ok result.