Doubt in Assignment
Issue #1
resolved
Sir,
for UPLUS, do you mean than function takes some parameter (say 'a') and return 'a'? or 'a + 1'?
similarly does UMINUS take 'a' and return '-a' or 'a - 1?.
Also, If we take the constructor of real, which is 'C' the type would of the respective functions would be:
binopDenote : binop -> expr * expr -> real uniopDenote : uniop -> expr -> real etc..
So you want this to be the case or that given in assignment?
Comments (2)
-
repo owner -
repo owner - changed status to resolved
This has been answered so closing
- Log in to comment
On Tue, Aug 21, 2018 at 07:16:17AM +0000, SOURABH AGGARWAL wrote:
Unary minus means negation, i.e. -a. In the calculator you can give something like -2 + 3, which will evaluate to 1. Unary plus is essentially identity but is given for symmetry with the negation case. So +a is essentially just a.