From: Siraaj Khandkar Date: Wed, 13 Aug 2014 02:24:02 +0000 (-0400) Subject: Fix incorrect result pipe return. X-Git-Tag: 1.0.0~17 X-Git-Url: https://git.xandkar.net/?p=hope.git;a=commitdiff_plain;h=3efbdbc9782dc7d9a9f6c3d7e0305978950c5236 Fix incorrect result pipe return. --- diff --git a/src/hope_result.erl b/src/hope_result.erl index 1b217f8..44f3ddd 100644 --- a/src/hope_result.erl +++ b/src/hope_result.erl @@ -24,7 +24,8 @@ , Error :: any() , F :: fun((X) -> t(Ok, Error)) . -pipe([] , X) -> X; +pipe([], X) -> + {ok, X}; pipe([F|Fs], X) -> case F(X) of {error, _}=E -> E