On Wed, Jul 7, 2010 at 10:47 AM, uap12 <anders.u.pers...@gmail.com> wrote:
> I have made the program in java, but like to try making it in Clojure,
> but so far i have got
> ----------------------------------------------------------------------------------------------------------------------------------------------------
> (defn print-data [year week]
>        (println  (str  "Y=" year " W=" week)))
>
>
> // This would not work and  i can't find how to map (print-data with a
> external variabel and a range
> // I can set week to a fixed number but not.
> // Or is this the wrong way of doing it ??
>
> (defn print-data2 [year]
>        (map (print-data year *) (range 1 53 1)))
>
>
> (defn run []
> (map print-data2 (range 1999 2010 1) ) )
>
> The program vill call an externa system program, with year and week as
> input, but for this test i just
> like to write them...

Maybe

(doseq [year (range 1999 2010 1)]
  (doseq [month (range 1 53 1)]
    (print-data year range)))

Regards,
Lars Nilsson

-- 
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