Some comments on crafty-chameleon

15 views
Skip to first unread message

JuanManuel Gimeno Illa

unread,
Jul 17, 2012, 5:18:04 AM7/17/12
to fp...@googlegroups.com
- 6.2 Method dispatch: the :__own_symbol for Anything should be 'Anything, not 'Point

- II Working with functions: "... instead of (keyword map) you can use (map keyword)" -> It is not clear that the later works not only for keywords-

- Do these seem like enough exercises? Personally, I like books with lots of exercises so the more of them the better. But only if they're solved in the book or the accompanying code.

- 9.1 Closures and objects both encapsulate data: You code :x and :y differently from :to-string. In one case you use (fn [] x) and in the other (constantly (str [x y])). It is a matter of taste, but for code that is side by side I prefer to use the same style of coding.

- 15.2: Class-defining-functions: I think :up of 'MetaPoint should be 'MetaAnything

Juan Manuel

JuanManuel Gimeno Illa

unread,
Jul 17, 2012, 11:49:02 PM7/17/12
to fp...@googlegroups.com
One more thing:

- 8.4: Exercises: In exercise 5 you ask to compare the solution to the constantly built-in and in exercise 6 you have to implement constantly. If you are doing the exercises sequentially, you already have seen the solution!!!

Juan Manuel

Brian Marick

unread,
Jul 20, 2012, 6:20:41 PM7/20/12
to fp...@googlegroups.com

On Jul 17, 2012, at 10:49 PM, JuanManuel Gimeno Illa wrote:

> One more thing:
>
> - 8.4: Exercises: In exercise 5 you ask to compare the solution to the constantly built-in and in exercise 6 you have to implement constantly. If you are doing the exercises sequentially, you already have seen the solution!!!

Not really. Exercise 5 asks you to write a function like (fn [ignored] 33). Exercise 6 asks you to write a higher-order function that makes such functions: ( (always 33) "hi mom") => 33

I've clarified the wording.

-----
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Occasional consulting on Agile


JuanManuel Gimeno Illa

unread,
Jul 23, 2012, 4:35:25 AM7/23/12
to fp...@googlegroups.com

Not really. Exercise 5 asks you to write a function like (fn [ignored] 33). Exercise 6 asks you to write a higher-order function that makes such functions: ( (always 33) "hi mom") => 33

The problem was with "Compare your solution to Clojure’s constantly" not with the exercise per se.

Juan Manuel

Brian Marick

unread,
Jul 23, 2012, 7:25:43 PM7/23/12
to fp...@googlegroups.com

On Jul 23, 2012, at 3:35 AM, JuanManuel Gimeno Illa wrote:

> The problem was with "Compare your solution to Clojure’s constantly" not with the exercise per se.

That's been moved to later.
Reply all
Reply to author
Forward
0 new messages