Thanks a lot to all of you.
Regards,
Nicolas
On 10 jan, 08:14, Brian Mosley brian.d.mos...@gmail.com 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
Hi,
Finally I managed to write my program, see below.
It is probably not optimized at all (I had some issues with vector
concatenation..) but at least it does the same as my java program.
Thanks again!
Regards,
Nicolas
(defrecord Pos [name value]
Object
(toString [this]
(str Name:
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
2012/1/9 Nicolas Garcin nicolas.etienne.gar...@gmail.com
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
On Tue, Jan 10, 2012 at 1:17 AM, Nicolas Garcin
nicolas.etienne.gar...@gmail.com wrote:
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
On Mon, Jan 9, 2012 at 1:56 PM, Linus Ericsson
oscarlinuserics...@gmail.com wrote:
the last one becomes something like this:
(for [option modified-options action modified-actions]
(if (= (:name option) (:name option))
(let [sum (+ (:value action) (:value option))]
[{:name
(defrecord Pos [name value]
Object
(toString [this]
(str Name: name , Value: value )))
(def actions [(Pos. IBM, -50)
(Pos. ACCOR, -30);
(Pos. IBM, -10);
(Pos. APPLE, -20);
(Pos. AIRFRANCE, -20)])
(def options [(Pos. IBM, 55)
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@googlegroups.com
Note that posts from new members are moderated - please be patient with your