From 5d08e39abca75b775bb7636973bb9c9a3bb908ac Mon Sep 17 00:00:00 2001
From: Andreas Grois <andi@grois.info>
Date: Mon, 23 Sep 2024 21:31:41 +0200
Subject: Continue Day12

---
 Common/Option.lean | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'Common/Option.lean')

diff --git a/Common/Option.lean b/Common/Option.lean
index 9344d83..f0d43fa 100644
--- a/Common/Option.lean
+++ b/Common/Option.lean
@@ -16,3 +16,7 @@ def bindWithProof (o : Option α) (f : (v : α) → (o = some v) → Option β)
   | .none => none
 
 def mapWithProof (o : Option α) (f : (v : α) → (o = some v) → β) : Option β := bindWithProof o (some $ f · ·)
+
+def ofBool : Bool → Option Unit
+  | .false => none
+  | .true => some ()
-- 
cgit v1.2.3

