
Hello All~ I have been reading the book "Haskell for real programmers" and am presently on chapter 03. There was a small program demonstrated by the author on "let". The problem is that when I cut and paste authors code into eclipse, the program works fine, where as when I write my own copy of the program I am getting an error. I figured out that when I remove the function any one function lend or bend, the file compiles and runs fine. My question is why does the Haskell compiler complains, in the case 2 functions with the same signature and logic, even though their names are different. module Lending where {-- snippet lend --} lend amount balance = let reserve = 100 newBalance = balance - amount in if balance < reserve then Nothing else Just newBalance {-- /snippet lend --} bend amount balance = let reserver = 100 newBalance=balance-amount in if balance < reserver then Nothing else Just newBalance Regards -Vivek Ramaswamy- ........................................................................ ........................................................................ ............................................ Disclaimer: This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. ........................................................................ ........................................................................ ..........................................