This is embarassing. ;-) Thanks
--
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
Hank,
Your last version does not work because your `if` condition is wrong, your
code stops on the first read ;)
Laurent
Le lundi 27 décembre 2021 à 21:34:05 UTC+1, hank@gmail.com a écrit :
> Ooops my bad, there's a typo in '(.toString sb1)' which sould be 'sb'.
> It doesn't change anythin
Ooops my bad, there's a typo in '(.toString sb1)' which sould be 'sb'.
It doesn't change anything, it still won't work, only Laurent's version
works.
user> (defn pt%% [file]
(let [afr (FileReader. file)
bfr (BufferedReader. afr)]
(loop [x (.read bfr)
sb (StringB
Hi --
Thanks so much, Laurent!
I was actually kind of close (you told me not to peep, so I didn't hehe).
(defn pt30 [file]
(def ^:dynamic *asb* (StringBuilder.))
(let [afr (FileReader. file)
bfr (BufferedReader. afr)]
(loop [x (.read bfr)
*asb* (StringBuilder
Thanks!
--
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