Skip to content

Commit

Permalink
Year 2023 Part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
MMZK1526 committed Feb 9, 2024
1 parent 7600fc9 commit 54c8667
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/Year2023/Solver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,19 @@ punctuation
= "';.,-!?"

cleanUp :: String -> String
cleanUp
= undefined
cleanUp = map toLower . filter (`notElem` punctuation)

split2 :: [a] -> [([a], [a])]
split2
= undefined
split2 xs = flip splitAt xs <$> [1..(length xs - 1)]

split3 :: [a] -> [([a], [a], [a])]
split3
= undefined
split3 = concatMap worker . split2
where
worker (xs, zs) = (xs, [], zs) : [(xs', ys', zs) | (xs', ys') <- split2 zs]

uninsert :: [a] -> [([a], [a])]
uninsert
= undefined
uninsert = map (\(xs, ys, zs) -> (ys, xs ++ zs)) . split3

{- Uncomment these functions when you have defined the above.
split2M :: [a] -> [([a], [a])]
split2M xs
= sxs ++ [(y, x) | (x, y) <- sxs]
Expand All @@ -43,7 +40,6 @@ split3M xs
= sxs ++ [(z, y, x) | (x, y, z) <- sxs]
where
sxs = split3 xs
-}

------------------------------------------------------
-- Part II
Expand Down

0 comments on commit 54c8667

Please sign in to comment.