From 0cdb5a2449c996e54a0c777dd807785d3016fd66 Mon Sep 17 00:00:00 2001
From: Andreas Grois <andi@grois.info>
Date: Sun, 3 Dec 2023 21:13:47 +0100
Subject: Day 3

---
 Common/Char.lean | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 Common/Char.lean

(limited to 'Common/Char.lean')

diff --git a/Common/Char.lean b/Common/Char.lean
new file mode 100644
index 0000000..9c727eb
--- /dev/null
+++ b/Common/Char.lean
@@ -0,0 +1,4 @@
+namespace Char
+
+def asDigit (d : Char) (ok : Char.isDigit d = true) : Nat :=
+  d.toNat - 48
-- 
cgit v1.2.3

