Armando, James, & Mike.
Thank you very much for the help, I'll certainly put your ideas to
good use.
Appreciate it!
--
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 ne
On Feb 16, 2:01 am, Michael Sanders wrote:
> I think I've worked out a better solution (hope this post renders properly):
>
> (ns topic (require [clojure.string :as s]))
>
> (defn load-block
>
> "TOPIC database: prints associated blocks to stdout"
>
> ([tag]
> (let [STATE (atom 0)
>
On 16 February 2011 10:01, Michael Sanders wrote:
> I think I've worked out a better solution (hope this post renders properly):
>
> (ns topic (require [clojure.string :as s]))
>
> (defn load-block
>
> "TOPIC database: prints associated blocks to stdout"
>
> ([tag]
> (let [STATE (atom
Looks like you could make the (println) depend directly on (re-find):
(when (re-find rx line)
(println line))
The check for empty line and tab might be taken care of by (re-find)
to further reduce the code to something like:
(when (and line (re-find rx line)
(println line)
(recur (read-line)
mss wrote:
> Hi folks, new to Clojure...
>
> Question:
>
> How do I rid the following functions of all the '(def STATE num)'
> calls? I can not seem to work out a way to use either 'binding', or
> 'let/atom' that wraps the loop & works as well... Any other comments
> are always welcomed. Here's my
Hi folks, new to Clojure...
Question:
How do I rid the following functions of all the '(def STATE num)'
calls? I can not seem to work out a way to use either 'binding', or
'let/atom' that wraps the loop & works as well... Any other comments
are always welcomed. Here's my code:
(defn load-block (