day 1: init

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2025-12-02 01:03:20 +05:30
commit 94cc545d4f
11 changed files with 284 additions and 0 deletions

8
lib/AoC.hs Normal file
View File

@@ -0,0 +1,8 @@
module AoC where
import Text.Parsec (ParseError)
-- extract Right value after parsing
extract :: Either ParseError a -> a
extract (Left err) = error ("Parsing failed: " ++ show err)
extract (Right val) = val