{application, hope,
[
{description, "Higher Order Programming in Erlang"},
- {vsn, "3.9.0"},
+ {vsn, "4.0.0"},
{registered, []},
{applications, [
kernel,
Acc.
-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
-callback of_kv_list([{K, V}]) ->
end.
-spec iter(t(K, V), fun((K, V) -> any())) ->
- ok.
+ {}.
iter(T, F1) ->
F2 = lift_map(F1),
- lists:foreach(F2, T).
+ ok = lists:foreach(F2, T),
+ {}.
-spec map(t(K, V), fun((K, V) -> V)) ->
t(K, V).
map(none , _) -> none.
-spec iter(t(A), fun((A) -> (any()))) ->
- ok.
+ {}.
iter({some, X}, F) ->
_ = F(X),
- ok;
+ {};
iter(none, _) ->
- ok.
+ {}.
-spec pipe([fun((A) -> t(B))], A) ->
t(B).
t_iter(_Cfg) ->
Key = key,
- Put = fun (Val) -> _ = put(Key, Val), ok end,
+ Put = fun (Val) -> put(Key, Val) end,
Get = fun () -> get(Key) end,
Val = foo,
- ok = hope_option:iter(none , Put),
+ {} = hope_option:iter(none , Put),
undefined = Get(),
- ok = hope_option:iter({some, Val}, Put),
+ {} = hope_option:iter({some, Val}, Put),
Val = Get().
t_of_result(_Cfg) ->