-- uvedené typy neupravujte, kromě případného přidávání instancí typových tříd data OpType = Add | Mul deriving Show data Expr a = Con a | Var String | Op OpType [Expr a] | Let String (Expr a) (Expr a) -- let a = x in y deriving Show freeVars :: Expr a -> [String] freeVars = undefined simplifyArity01 :: Num a => Expr a -> Expr a simplifyArity01 = undefined eval :: Num a => Expr a -> [(String, a)] -> Maybe a eval = undefined flatten :: Expr a -> Expr a flatten = undefined simplifyIdentity :: (Eq a, Num a) => Expr a -> Expr a simplifyIdentity = undefined simplifyAnnihilating :: (Eq a, Num a) => Expr a -> Expr a simplifyAnnihilating = undefined simplifyConstants :: Num a => Expr a -> Expr a simplifyConstants = undefined