fact :: Expr
fact = (Lam "x"
        (If (BinOp Equal
             (Ident "x")
             (Lit (LInt 0))
            )
            (Lit (LInt 1))
            (BinOp Times
                (Ident "x") (App (Ident "fact") (BinOp Minus (Ident "x") (Lit (LInt 1))))
            )
        )
       )
fact :: Expr
fact = (Lam "x"
        (If (BinOp Equal
             (Ident "x")
             (Lit (LInt 0))
            )
            (Lit (LInt 1))
            (BinOp Times
                (Ident "x") (App (Ident "fact") (BinOp Minus (Ident "x") (Lit (LInt 1))))
            )
        )
       )
fact = (Lam "x"
        (If (BinOp Equal
             (Ident "x")
             (Lit (LInt 0))
            )
            (Lit (LInt 1))
            (BinOp Times
                (Ident "x") (App (Ident "fact") (BinOp Minus (Ident "x") (Lit (LInt 1))))
            )
        )
       )