Copyright | (c) Eric Mertens 2022 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2022/day/21
>>>
:{
:main + "root: pppw + sjmn\n\ \dbpl: 5\n\ \cczh: sllz + lgvd\n\ \zczc: 2\n\ \ptdq: humn - dvpt\n\ \dvpt: 3\n\ \lfqf: 4\n\ \humn: 5\n\ \ljgn: 2\n\ \sjmn: drzm * dbpl\n\ \sllz: 4\n\ \pppw: cczh / lfqf\n\ \lgvd: ljgn * ptdq\n\ \drzm: hmdt - zczc\n\ \hmdt: 32\n" :} 152 301
Synopsis
- main :: IO ()
- evalRoot :: Map String (Expr String) -> Fix Expr
- tie :: (Functor f, Ord a) => Map a (Fix f) -> f a -> Fix f
- buildMap :: [(String, Either Int (String, Char, String))] -> Map String (Expr String)
- constProp :: Fix Expr -> Fix Expr
- equal :: Fix Expr -> Int -> Int
- pattern I :: Int -> Fix Expr
- data Expr a