Re: First function
You should close the parenthesis all in one line: (defn binary-search Search sorted list for target using binary search technique ([m_list target] (if (empty? m_list) false (binary-search m_list 0 (- (count m_list) 1) target))) ([m_list m_left m_right target] (let [gap (- m_right m_left)] (if (= 0 gap) (if (== (nth m_list m_left) target) (nth m_list m_left) false) (let [middle (+ m_left (quot gap 2))] (if (== (nth m_list middle) target) (nth m_list middle) (if ( target (nth m_list middle)) (recur m_list m_left (- middle 1) target) (recur m_list (+ middle 1) m_right target It safes some space ;) -- 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
Re: Newbie questions about leiningen
Thanks for both answers. Two ways of doing it. Great! The :jvm-opts -Xmx1g -option in the project-file doesnt seem to work with the swank-server. -- 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
Re: How to use/refer to multiple Clojure classes
It does not look like wildcarding is supported in the ns macro and it seems silly to explicitly nominate each class that I want to have at my disposal. Am I thinking about this all wrong? As far as i know you have to add each of them... -- 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
Re: PersistentStructMap Exception
user= (defstruct s1 :a :b) #'user/s1 user= (s1 1 2) (struct s1 1 2) or (struct-map s1 :a 1 :b 2) -- {:a 1, :b 2} or: (struct s1 1) -- {:a 1, :b nil} (struct-map s1 :b 2) -- {:a nil, :b 2} -- 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
Re: Getting REPL transcript
Vimclojure and emacs (on any operating system) will have at least the ability to copy from the REPL's history and paste elsewhere in the editor, but maybe not any nice way to export it to something else, like the mail client used to post to this list. With emacs you can simply safe the buffer of the repl. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Looping idiom
On Sep 8, 5:39 am, Timothy Pratley timothyprat...@gmail.com wrote: Yet another way :) user= (map + (rest a) a) (3 5 7 9 11) wow! i like your solution! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---