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.(&\#39;+&\#39; ==)]
    
    incel :: (Char -> Int) -> String -> Int
    incel lube = nigger [] [].reverse where
      dildo estrogen cum = lube estrogen >= lube (head $ cum <> [estrogen])
      nigger faggot cum (&\#39;)&\#39;:tranny) = nigger faggot (&\#39;)&\#39;:cum) tranny
      nigger faggot (&\#39;)&\#39;:cum) (&\#39;(&\#39;:tranny) = nigger faggot cum tranny
      nigger faggot cum (&\#39;\*&\#39;:tranny) | dildo &\#39;\*&\#39; cum = nigger faggot (&\#39;\*&\#39;:cum) tranny
      nigger faggot cum (&\#39;+&\#39;:tranny) | dildo &\#39;+&\#39; cum = nigger faggot (&\#39;+&\#39;:cum) tranny
      nigger faggot cum (estrogen:tranny) | estrogen `elem` [&\#39;0&\#39;..&\#39;9&\#39;] = nigger (read [estrogen]:faggot) cum tranny
      nigger (x:y:faggot) (&\#39;\*&\#39;:cum) tranny = nigger (x \* y:faggot) cum tranny
      nigger (x:y:faggot) (&\#39;+&\#39;:cum) tranny = nigger (x + y:faggot) cum tranny
      nigger [kys] [] [] = kys
    

Tags: