X-Git-Url: https://git.xandkar.net/?p=hope.git;a=blobdiff_plain;f=src%2Fhope_option.erl;h=622c06df92fd59b2df7df5c3a1e80aba8876fe65;hp=92636c9f7191689526783806cbf85c0e9a7599fb;hb=2a40de4f9404d67967ad486d7d10b354791105fe;hpb=3b156801097bcd07272f1db3a62a675495fa9d77 diff --git a/src/hope_option.erl b/src/hope_option.erl index 92636c9..622c06d 100644 --- a/src/hope_option.erl +++ b/src/hope_option.erl @@ -1,5 +1,6 @@ -module(hope_option). + -export_type( [ t/1 ]). @@ -23,10 +24,8 @@ put(X, F) -> ; false -> none end. - get({some, X}, _) -> X; get(none , Y) -> Y. - map({some, X}, F) -> {some, F(X)}; map(none , _) -> none.