identical?

2012-01-19 Thread Nicolas Garcin
Hi, I have a simple question regarding identical?: I understand that keywords with the same name refer to the same object. So (identical? :ab :ab) returns true. Now, if I do the following thing: (identical? "ab" (str "a" "b")) I get false, because my 2 strings are not the same objects even if

Re: Need help to translate a simple java program into Clojure program

2012-01-10 Thread Nicolas Garcin
OptionsWithActions options actions 0 0 ) ) (let [[matchedOptions matchedActions] (matchIt options actions) ] (println "matched options: " (map str matchedOptions)) (println "matched actions: " (map str matchedActions)) ) On 10 jan, 09:35, Nicolas Garcin

Re: Need help to translate a simple java program into Clojure program

2012-01-10 Thread Nicolas Garcin
Thanks a lot to all of you. Regards, Nicolas On 10 jan, 08:14, Brian Mosley wrote: > Oops. > A possible solution might look something like that... -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googleg

Need help to translate a simple java program into Clojure program

2012-01-09 Thread Nicolas Garcin
Hello, I'm new to functional programming and Clojure and I'm trying to translate a simple java program into Clojure. My program must build from 2 input lists (stored in a vector) 2 output lists (also stored in a vector) which have same number of elements as input lists for both output lists. The e

question about cons function

2011-11-08 Thread Nicolas Garcin
Hello, I'm a new Closure user and I'm wondering why the 'cons' function applied on a vector returns a list. Ex: user=> (def v1 [:one :two]) #'user/v1 user=> (cons :three v1) (:three :one :two) user=> Thanks for your help, Regards, Nicolas -- You received this message because you are subscribed