From 3efbdbc9782dc7d9a9f6c3d7e0305978950c5236 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Tue, 12 Aug 2014 22:24:02 -0400 Subject: [PATCH] Fix incorrect result pipe return. --- src/hope_result.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.20.1