Day14, move stuff to libraries, aoc2024 -> samples, fix FC on an error

This commit is contained in:
2024-12-14 08:14:43 -08:00
parent 29abacfa6c
commit c5368edbbf
64 changed files with 241 additions and 1121 deletions

View File

@@ -65,5 +65,11 @@ number = stringToInt ∘ pack <$> some (satisfy isDigit)
-- digs <- some (satisfy isDigit)
-- pure $ stringToInt $ pack digs
optional : a. Parser a Parser (Maybe a)
optional pa = Just <$> pa <|> pure Nothing
ws : Parser Unit
ws = many (match ' ') >> pure MkUnit
token : String Parser Unit
token str = string str >> ws