From eea431a9124e1d6defff004ba99c0296003e9d79 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Tue, 27 Jan 2026 11:24:46 +1000 Subject: [PATCH] clean maybe.nix --- nt/primitives/bootstrap/maybe.nix | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/nt/primitives/bootstrap/maybe.nix b/nt/primitives/bootstrap/maybe.nix index 0479bbb..653fd71 100644 --- a/nt/primitives/bootstrap/maybe.nix +++ b/nt/primitives/bootstrap/maybe.nix @@ -38,32 +38,13 @@ in rec { assert enfIsMaybe T "isMaybeNone"; ! T._some; - # TODO: ensure you check isNone if isSome fails (otherwise it could be another type!) - # Unwrap (Monadic Return Operation) - # unwrapMaybe = f: g: T: - # if isSome T - # then f T._value_ - # else g T._value_; - # unwrapSome = unwrapMaybe (v: v); - # unwrapNone = f: unwrapMaybe f (v: v); - # Monadic Bind Operation bindMaybe = f: T: if isSome T then Some (f T._value) else T; - # Conditionals - # someOr = f: T: - # if isSome T - # then T - # else f T; - - # noneOr = f: T: - # if isNone T - # then T - # else f T; - + # Utility Functions boolToMaybe = x: if x then Some true @@ -73,6 +54,4 @@ in rec { if x == null then None else Some x; - - maybeTobool = isSome; }