X-Git-Url: https://git.xandkar.net/?p=hope.git;a=blobdiff_plain;f=src%2Fhope_result.erl;h=5d0ea7e42c40521a8a24f65b0fa0ce7f4701153c;hp=a40629a1c52b58629b7a169dc8847c3f93bf83d0;hb=ed9905af6fa1dba6f89759d6dbfc970426122bde;hpb=2a40de4f9404d67967ad486d7d10b354791105fe diff --git a/src/hope_result.erl b/src/hope_result.erl index a40629a..5d0ea7e 100644 --- a/src/hope_result.erl +++ b/src/hope_result.erl @@ -16,6 +16,13 @@ . +-spec pipe([F], X) -> + t(Ok, Error) + when X :: any() + , Ok :: any() + , Error :: any() + , F :: fun((X) -> t(Ok, Error)) + . pipe([] , X) -> X; pipe([F|Fs], X) -> case F(X)