Use empty tuple as unit type, for all side-effects.
[hope.git] / src / hope_option.erl
index c645c53..29836f7 100644 (file)
@@ -58,12 +58,12 @@ map({some, X}, F) -> {some, F(X)};
 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).
This page took 0.022086 seconds and 4 git commands to generate.