From 1c003d17c239bc4a83368139fc52371831c3a28d Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 25 Mar 2015 14:04:31 -0400 Subject: [PATCH] Re-order exports to clearly show monad interface. --- src/hope_option.erl | 13 ++++++++----- src/hope_result.erl | 7 +++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/hope_option.erl b/src/hope_option.erl index 7a87438..02ef2f3 100644 --- a/src/hope_option.erl +++ b/src/hope_option.erl @@ -7,13 +7,16 @@ ]). -export( - [ put/2 - , get/2 - , return/1 - , return/2 + % Generic monad interface + [ return/1 , map/2 - , iter/2 , pipe/2 + + % Specific to hope_option:t() + , return/2 + , put/2 + , get/2 + , iter/2 , of_result/1 , of_undefined/1 ]). diff --git a/src/hope_result.erl b/src/hope_result.erl index 0f9fb05..9d4235b 100644 --- a/src/hope_result.erl +++ b/src/hope_result.erl @@ -9,12 +9,15 @@ ]). -export( + % Generic monad interface [ return/1 - , map/2 % map/2 is alias for map_ok/2 + , map/2 % map/2 is alias for map_ok/2 + , pipe/2 + + % Specific to hope_result:t() , map_ok/2 , map_error/2 , tag_error/2 - , pipe/2 , lift_exn/1 , lift_exn/2 , lift_map_exn/3 -- 2.20.1