Day 18

Previous: Day 17 | Next: Day 19

AUTO-ACQUIRED DATA FOLLOWS...

day-18/day18-meme.hs
day-18/day18-meme.hs
main :: IO ()
    main = do
      horny <- sequence.map (flip incel.concat.words).lines <$> readFile
        "inputs/18/input"; mapM_ (print.sum.horny) [const 0, fromEnum.('+' ==)]
    
    incel :: (Char -> Int) -> String -> Int
    incel lube = nigger [] [].reverse where
      dildo estrogen cum = lube estrogen >= lube (head $ cum <> [estrogen])
      nigger faggot cum (')':tranny) = nigger faggot (')':cum) tranny
      nigger faggot (')':cum) ('(':tranny) = nigger faggot cum tranny
      nigger faggot cum ('*':tranny) | dildo '*' cum = nigger faggot ('*':cum) tranny
      nigger faggot cum ('+':tranny) | dildo '+' cum = nigger faggot ('+':cum) tranny
      nigger faggot cum (estrogen:tranny) | estrogen elem ['0'..'9'] = nigger (read [estrogen]:faggot) cum tranny
      nigger (x:y:faggot) ('*':cum) tranny = nigger (x * y:faggot) cum tranny
      nigger (x:y:faggot) ('+':cum) tranny = nigger (x + y:faggot) cum tranny
      nigger [kys] [] [] = kys
    

Tags: