Discussion:
Question 1
(too old to reply)
Razi Asaduddin
2005-03-08 03:30:22 UTC
Permalink
do we have to do question 1a like :
leftAssocSub = do n <- num; nums n

Then what is nums? a normal function ? what is the type of nums?
i dont understand how to implement it that way..


Why cant i just add everything after the first number together and subtract
that result from the first number?



thanks
Jonathan Delgado
2005-03-08 05:23:26 UTC
Permalink
I read the question as saying that it "can" be implemented with a nums
function as it describes. not that it "has to be". I did it your way.
Just be sure you handle a case with double negative signs like 5--2-1 = 6


Jonathan Delgado
Computer Sciences / Pure Mathematics
The University of Texas at Austin
Post by Razi Asaduddin
leftAssocSub = do n <- num; nums n
Then what is nums? a normal function ? what is the type of nums?
i dont understand how to implement it that way..
Why cant i just add everything after the first number together and subtract
that result from the first number?
thanks
Loading...