home
/
code
/
hope.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Add dialyzer target.
[hope.git]
/
src
/
hope_result.erl
1
-module(hope_result).
2
3
-export_type([ t/2
4
]).
5
6
-export([ pipe/2
7
]).
8
9
10
-type t(A, B) :: {ok, A} | {error, B}.
11
12
13
pipe([] , X) -> X;
14
pipe([F|Fs], X) ->
15
case F(X)
16
of {error, _}=E -> E
17
; {ok, Y} -> pipe(Fs, Y)
18
end.
This page took
0.055041 seconds
and
4
git commands to generate.