On 15 Feb 2010, at 13:58, Steve Purcell wrote:

> On 15 Feb 2010, at 13:50, Glen Rubin wrote:
> 
>> Thank you so much!!!!  This is really wonderful advice...saved me
>> months of learning.  I have rewritten my code as follows:
> 
> 
> You'll want to use "let" in place of all of those "def" declarations.
> 

e.g. your last function would look like this:

(defn p1 []
  (let [palindromic-number (first (filter #(seq (divis-by-3dig %))
                                          (palindromes 100 999)))
        root1 (first (divis-by-3dig palindromic-number))
        root2 (unchecked-divide palindromic-number root1)]
    (str "the palindromic number is " palindromic-number
         " its roots are " root1" " root2)))

-Steve

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to