home
/
code
/
hope.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
405f2e04eb9f9589731039d867f921b2a75189e1
[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.044174 seconds
and
3
git commands to generate.