From c8281f27857533e87f38ee9eca2554df988ea4e0 Mon Sep 17 00:00:00 2001 From: Natty Date: Fri, 1 Dec 2023 15:59:39 +0100 Subject: [PATCH] Cleanup --- day01a/day01a.cabal | 3 --- day01a/package.yaml | 4 ---- day01b/day01b.cabal | 3 --- day01b/package.yaml | 4 ---- day01b/src/Main.hs | 3 +-- template00/package.yaml | 4 ---- 6 files changed, 1 insertion(+), 20 deletions(-) diff --git a/day01a/day01a.cabal b/day01a/day01a.cabal index df06633..8a1f4d7 100644 --- a/day01a/day01a.cabal +++ b/day01a/day01a.cabal @@ -11,9 +11,6 @@ author: Natty maintainer: natty.sh.git@gmail.com copyright: 2023 Natty build-type: Simple -extra-source-files: - README.md - CHANGELOG.md executable day01a main-is: Main.hs diff --git a/day01a/package.yaml b/day01a/package.yaml index 81e3b70..778df2f 100644 --- a/day01a/package.yaml +++ b/day01a/package.yaml @@ -4,10 +4,6 @@ author: "Natty" maintainer: "natty.sh.git@gmail.com" copyright: "2023 Natty" -extra-source-files: -- README.md -- CHANGELOG.md - description: Please see the README at dependencies: diff --git a/day01b/day01b.cabal b/day01b/day01b.cabal index 384c27b..73065c7 100644 --- a/day01b/day01b.cabal +++ b/day01b/day01b.cabal @@ -11,9 +11,6 @@ author: Natty maintainer: natty.sh.git@gmail.com copyright: 2023 Natty build-type: Simple -extra-source-files: - README.md - CHANGELOG.md executable day01b main-is: Main.hs diff --git a/day01b/package.yaml b/day01b/package.yaml index 8e72168..61888d8 100644 --- a/day01b/package.yaml +++ b/day01b/package.yaml @@ -4,10 +4,6 @@ author: "Natty" maintainer: "natty.sh.git@gmail.com" copyright: "2023 Natty" -extra-source-files: -- README.md -- CHANGELOG.md - description: Please see the README at dependencies: diff --git a/day01b/src/Main.hs b/day01b/src/Main.hs index f046eed..d2c9e43 100644 --- a/day01b/src/Main.hs +++ b/day01b/src/Main.hs @@ -30,8 +30,7 @@ findDigitFirst (_ : t) = findDigitFirst t findDigitFirst _ = Nothing findDigitLast :: String -> Maybe Integer -findDigitLast t@(findDigit -> Just d) = findDigitLast (tail t) <|> Just d -findDigitLast (_ : t) = findDigitLast t +findDigitLast (x:xs) = findDigitLast xs <|> findDigit (x : xs) findDigitLast [] = Nothing main :: IO () diff --git a/template00/package.yaml b/template00/package.yaml index 7761ab9..72c3f37 100644 --- a/template00/package.yaml +++ b/template00/package.yaml @@ -4,10 +4,6 @@ author: "Natty" maintainer: "natty.sh.git@gmail.com" copyright: "2023 Natty" -extra-source-files: -- README.md -- CHANGELOG.md - description: Please see the README at dependencies: