Not exactly what I meant. Check out these two AoC 2022 Day 10 solutions.

This one contains lots of vocab, language extensions, functors: chocolate sundae with sprinkles

```
{-|
Module: Day10
Description: <https://adventofcode.com/2022/day/10 Day 10: Cathode-Ray Tube>
-}
{-# LANGUAGE OverloadedStrings, ViewPatterns #-}
module Day10 (day10a, day10b) where
import qualified Data.IntMap as IntMap (fromDistinctAscList, lookupLT)
import Data.Ix (inRange)
import Data.List (intercalate, unfoldr)
import Data.List.Split (chunksOf)
import Data.Maybe (mapMaybe)
import Data.Text (Text)
import qualified Data.Text as T (lines, stripPrefix)
import qualified Data.Text.Read as T (decimal, signed)
parse :: (Integral a) => Text -> [(Int, a)]
parse = scanl f (0, 1) . T.lines where
f (i, x) "noop" = (i + 1, x)
f (i, x) (T.stripPrefix "addx " -> Just (T.signed T.decimal -> Right (dx, ""))) = (i + 2, x + dx)
day10a :: Text -> Int
day10a input = sum . zipWith (*) taps . map snd $ mapMaybe (flip IntMap.lookupLT signals) taps where
signals = IntMap.fromDistinctAscList $ parse input
taps = [20, 60, 100, 140, 180, 220]
day10b :: Text -> String
day10b input = intercalate "\n" $ take 6 rows where
sprites = concat $ unfoldr f (0, 1, parse input)
f (i, x, (j, y):signals) = Just (replicate (j - i) x, (j, y, signals))
f (_, x, _) = Just (repeat x, undefined)
rows = zipWith draw [0..] <$> chunksOf 40 sprites
draw i x = if inRange (-1, 1) $ x - i then '\x2593' else '\x2591'
```

This one imports printf. No fancy footwork, smaller vocabular: vanilla ice-cream

```
#!/usr/bin/env runhaskell
import Text.Printf (printf)
parse :: [String] -> [(Int,Int)]
parse ls = zip (scanl (+) 1 [x | (x,_) <- ws]) (scanl (+) 1 [y | (_,y) <- ws])
where ws = map (p' . words) ls
p' ["addx",n] = (2,read n :: Int)
p' _ = (1,0)
main :: IO ()
main = do
str <- getContents --readFile "input.txt"
let cmds = parse (lines str)
val n = snd $ last $ takeWhile ((<= n) . fst) cmds
mx = maximum $ map fst cmds
part1 = sum [j * val j | j <- takeWhile (<= mx) [20,60..]]
chk v = abs (mod (v-1) 40 - (val v)) <= 1
xs = map (\i-> if chk i then '#' else '.') [1..mx]
grp = takeWhile (/=[]) $ map (take 40) $ iterate (drop 40) xs
printf "Part 1: %s, Part 2:\n\n" (show $ part1)
mapM_ putStrLn $ grp
```

The vanilla here has considerably fewer lines of code than the chocolate sundae but solves the same problem. *Ceteris paribus* by default I prefer vanilla. But I’m starting to understand more why in the grand scheme the chocolate Sundae might be better.

What I implicitly understand from the commenters is that had the two authors written 10,000 lines of code each in their styles above, what appears more verbose and redundant in these small puzzles would have out-sized benefits.