-1
type exptree = Num of float | Add of exptree*exptree | Sub of exptree*exptree | Div of exptree*exptree | Mult of exptree*exptree | Sqrt of exptree| Sin of exptree | Log of exptree | Cos of exptree | Tan of exptree | Abs of exptree | Exp of exptree*exptree | Eexp of exptree;;
let rec solve t l1 = match t with Num(x) -> x::l1
| Add(t1, t2) -> match (append (solve t1 []) (solve t2 [])) with x::y::xs -> [x+.y]@l1
| Mult (t1,t2) -> match (append (solve t1 []) (solve t2 [])) with x::y::xs -> [x*.y]@l1;;
解決是給下面的錯誤:程序顯示錯誤
Characters 145-148:
| Add(t1, t2) -> match (append (solve t1 []) (solve t2 [])) with x::y::xs -> [x+.y]@l1;;
^^^
Error: The variant type list has no constructor Add