+-spec map_result([A], fun((A) -> (hope_result:t(B, C)))) ->
+ hope_result:t([B], C).
+map_result([], _) ->
+ {ok, []};
+map_result([X | Xs], F) ->
+ case F(X)
+ of {ok, Y} ->
+ case map_result(Xs, F)
+ of {ok, Ys} ->
+ {ok, [Y | Ys]}
+ ; {error, _}=Error ->
+ Error
+ end
+ ; {error, _}=Error ->
+ Error
+ end.