Re: Evaluation order

2014-10-08 Thread Johannes Langøy
Thanks! kl. 02:17:45 UTC+2 onsdag 8. oktober 2014 skrev adrian...@mail.yu.edu følgende: *output On Tuesday, October 7, 2014 8:17:34 PM UTC-4, adrian...@mail.yu.edu wrote: You need to flush the input stream after printing. Call (clojure.core/flush) to do so. On Tuesday, October 7, 2014

Re: Evaluation order

2014-10-08 Thread Johannes Langøy
Here is the finished Yatzy, in case anyone is interested: https://github.com/Jovlang/catzy/blob/master/src/catzy/core.clj kl. 19:05:50 UTC+2 onsdag 8. oktober 2014 skrev Johannes Langøy følgende: Thanks! kl. 02:17:45 UTC+2 onsdag 8. oktober 2014 skrev adrian...@mail.yu.edu følgende:

Evaluation order

2014-10-07 Thread Johannes Langøy
Hi, I can't figure this out. I have these two functions: (defn get-number [] (try (let [input (read-string (read-line))] (if (number? input) input (get-number))) (catch Exception e (get-number (defn selection-handler [tests] (dotimes [i (count

Re: Evaluation order

2014-10-07 Thread adrian . medina
*output On Tuesday, October 7, 2014 8:17:34 PM UTC-4, adrian...@mail.yu.edu wrote: You need to flush the input stream after printing. Call (clojure.core/flush) to do so. On Tuesday, October 7, 2014 4:51:05 PM UTC-4, Johannes Langøy wrote: Hi, I can't figure this out. I have these two

Re: Evaluation order

2014-10-07 Thread adrian . medina
You need to flush the input stream after printing. Call (clojure.core/flush) to do so. On Tuesday, October 7, 2014 4:51:05 PM UTC-4, Johannes Langøy wrote: Hi, I can't figure this out. I have these two functions: (defn get-number [] (try (let [input (read-string (read-line))]

Re: evaluation order in loading file/project (with leiningen)

2013-09-03 Thread Curtis Summers
If you're defining functions depending on yet-to-be-defined functions, you may need to use the declare macro. So, you may need to loop through your data with declare first, and then proceed with the definitions. http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/declare

evaluation order in loading file/project (with leiningen)

2013-09-02 Thread Erebus Mons
Hi, I am trying to find my way around clojure and leiningen. I created a project with lein new, and up to now, all my code is in the src/../core.clj file I have a function that defines functions based on what is read in from a csv-file, in the following format: (defn define-all-properties

Re: evaluation order in loading file/project (with leiningen)

2013-09-02 Thread Armando Blancas
I assume that making a makro out of *define-all-properties* is not the way to go, because it depends on the reading of a file, which should not yet be done at compile time (this may be a false assumption;...). Seems to me this is the key to how you'd construct your program. The csv

Re: evaluation order in loading file/project (with leiningen)

2013-09-02 Thread Waldemar
Hi Erebus, I am also new so I'm also just guessing. What if you execute the code inside define-all-properties directly without wrapping it in a function? Am 02.09.2013 um 19:04 schrieb Erebus Mons erebus.m...@gmail.com: (defn define-all-properties [] (for [ stuff ] ... (eval