tag:blogger.com,1999:blog-8286606670338692791.post1977167084711483719..comments2023-10-08T04:09:50.485-07:00Comments on weima learns to program: sicp exercise 3.7weimahttp://www.blogger.com/profile/13250647442722796831noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8286606670338692791.post-64208735591658725592011-03-16T04:18:21.083-07:002011-03-16T04:18:21.083-07:00ferd's solution is more elegant, since it does...ferd's solution is more elegant, since it doesn't require changes to pre-existing code.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8286606670338692791.post-48894540687082423432009-10-22T13:32:39.114-07:002009-10-22T13:32:39.114-07:00As i have already mentioned in the solution that &...As i have already mentioned in the solution that "The solution is to seperate the account balance management and password management."<br /><br />Thats why my solution is so elaborate.<br /><br />Thanks for your comment :)weimahttps://www.blogger.com/profile/13250647442722796831noreply@blogger.comtag:blogger.com,1999:blog-8286606670338692791.post-36601307862054644612009-10-22T10:53:25.373-07:002009-10-22T10:53:25.373-07:00This seemed to work fine, while being shorter:
(d...This seemed to work fine, while being shorter:<br /><br />(define (make-joint account oldpass newpass)<br /> (lambda (try method)<br /> (if (eq? try newpass)<br /> (account oldpass method)<br /> (error "Incorrect password"))))<br /><br />Any apparent problem with that approach?MononcQchttps://www.blogger.com/profile/09399002406489554558noreply@blogger.com