(datatype stack _____________________ (empty-stack) : (stack A); ________________________________ push : (A --> (stack A) --> (stack A)); __________________ top : ((stack A) --> A); ______________________ pop : ((stack A) --> (stack A));) (define empty-stack -> (/. X (if (or (= X pop) (= X top)) (error "~this stack is empty~%") (error "~A is not an operation on stacks.~%")))) (define push X S -> (/. Y (if (= Y pop) S (if (= Y top) X (error "~A is not an operation on stacks.~%"))))) (define top S -> (S top)) " (tc +) (empty-stack) (push 0 (empty-stack)) (push a (push 0 (empty-stack))) (top (push 0 (empty-stack))) "