Gcode. Result. Enum
(gcode v1.0.2)
Copy Markdown
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
@type result() :: Gcode.Result.t()
@type result(result) :: Gcode.Result.t(result)
@type result(result, error) :: Gcode.Result.t(result, error)
Functions
Join the string contents of an ok result.
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.
@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
Reverse the enumerable contents of an ok result.