Thank you so much, Stuart! Congratulations~ I really look forward to
reading this book. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Thanks, the "hello" example on page 25 is perfect.
Matt Revelle wrote:
> On Nov 5, 2008, at 3:01 PM, Peter Wolf wrote:
>
>
>> I just browsed Stuart's wonderful book. Lots of great stuff, which I
>> will enjoy working though
>>
>> However, I didn't find a section that talks about how to do
>>
On Nov 5, 2008, at 3:01 PM, Peter Wolf wrote:
>
> I just browsed Stuart's wonderful book. Lots of great stuff, which I
> will enjoy working though
>
> However, I didn't find a section that talks about how to do
> non-functional stuff in Clojure. Might be a good section to add for
> N00Bs
>
>
Peter,
You might look at the loop special form:
(defn game
"Runs the game, returning the final state"
[]
(loop [state (initial-state)]
(report state)
(if (final? state)
state
(recur (compute-new-state state (read-line))
for your own definitions of initial
Duh... I should read more carefully. I just found the section on
loop/recur.
Still, it might be good to expand that section, and highlight it. I
suspect that every N00B will wonder how to implement a console app. And
every LISPer will try to implement the REPL in Clojure.
P
Peter Wolf wr
I just browsed Stuart's wonderful book. Lots of great stuff, which I
will enjoy working though
However, I didn't find a section that talks about how to do
non-functional stuff in Clojure. Might be a good section to add for N00Bs
For example, I'm implementing my Mastermind game. I want to pr