crafty-chameleon: ch 5 ex clarity

6 views
Skip to first unread message

Adrian Mowat

unread,
Jul 14, 2012, 3:47:16 PM7/14/12
to fp...@googlegroups.com
Brian

In chapter 5, exercise 3, I found the challenge hard to understand

However, you already have points in your program. What happens? To find out, do this at the repl:

user=> (def my-point (a Point 1 2)) #'user/my-point
user=> ;; Implement :origin
user=> (def Point .... your new definition ...) #'user/Point
user=> (send-to my-point :origin)
????

Can you explain what happened?

My first impression was that I should define origin as a standalone function and it took me a while to understand that you meant the comment to simply be explaining Point is being redefined in the next statement.  Although it's obvious when you understand, I think it might be helpful to make this a bit more explicit.

Thanks

Adrian




Reply all
Reply to author
Forward
0 new messages