diff --git a/core/Maybe.carp b/core/Maybe.carp index 431c4417..6b7345c1 100644 --- a/core/Maybe.carp +++ b/core/Maybe.carp @@ -66,4 +66,7 @@ It is the inverse of [`just?`](#just?).") (if (null? a) (Nothing) (Just @(Pointer.to-ref a)))) + + (doc zero "returns `Nothing`.") + (defn zero [] (Nothing)) ) diff --git a/core/Result.carp b/core/Result.carp index 607dc17c..7cca62f2 100644 --- a/core/Result.carp +++ b/core/Result.carp @@ -106,6 +106,9 @@ It is the inverse of [`success?`](#success?).") (match @b (Success _) false (Error y) (= x y)))) + + (doc zero "returns `(Success (zero))`.") + (defn zero [] (Success (zero))) ) (defmodule Maybe