home
/
code
/
hope.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ignore outputs of side-effecting, element-handler functions.
[hope.git]
/
src
/
hope_option.erl
diff --git
a/src/hope_option.erl
b/src/hope_option.erl
index
996e342
..
c645c53
100644
(file)
--- a/
src/hope_option.erl
+++ b/
src/hope_option.erl
@@
-57,10
+57,13
@@
return(X, Condition) ->
map({some, X}, F) -> {some, F(X)};
map(none , _) -> none.
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.
ok.
-iter({some, X}, F) -> ok = F(X);
-iter(none , _) -> ok.
-spec pipe([fun((A) -> t(B))], A) ->
t(B).
-spec pipe([fun((A) -> t(B))], A) ->
t(B).
This page took
0.025519 seconds
and
4
git commands to generate.