{application, hope,
[
{description, "Higher Order Programming in Erlang"},
- {vsn, "3.8.1"},
+ {vsn, "3.9.0"},
{registered, []},
{applications, [
kernel,
-callback fold(t(K, V), fun((K, V, Acc) -> Acc), Acc) ->
Acc.
--callback iter(t(K, V), fun((K, V) -> ok)) ->
+-callback iter(t(K, V), fun((K, V) -> any())) ->
ok.
%% TODO: Decide if validation is to be done. If yes - wrap in hope_result:t/1
; false -> {none , T1}
end.
--spec iter(t(K, V), fun((K, V) -> ok)) ->
+-spec iter(t(K, V), fun((K, V) -> any())) ->
ok.
iter(T, F1) ->
F2 = lift_map(F1),
map({some, X}, F) -> {some, F(X)};
map(none , _) -> none.
--spec iter(t(A), fun((A) -> (ok))) ->
+-spec iter(t(A), fun((A) -> (any()))) ->
+ ok.
+iter({some, X}, F) ->
+ _ = F(X),
+ ok;
+iter(none, _) ->
ok.
-iter({some, X}, F) -> ok = F(X);
-iter(none , _) -> ok.
-spec pipe([fun((A) -> t(B))], A) ->
t(B).