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 "")))
(d
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
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
fir
(defrecord Pos [name value]
Object
(toString [this]
(str "")))
(def actions [(Pos. "IBM", -50)
(Pos. "ACCOR", -30);
(Pos. "IBM", -10);
(Pos. "APPLE", -20);
(Pos. "AIRFRANCE", -20)])
(def options [(Pos. "IBM", 55)
(Pos. "ACCOR", 40
On Mon, Jan 9, 2012 at 1:56 PM, Linus Ericsson
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 (:name option) (Math/max
On Tue, Jan 10, 2012 at 1:17 AM, Nicolas Garcin
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 vector) which have same number
2012/1/9 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 inp
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