This function is attending my needs for the moment:
(defn print-feedback [text]
(loop [out (split text #"\n")]
(if (empty? out)
""
(let [to-print (first out)]
(println to-print)
(recur (rest out))
The question now is: how to test it :D
On Thu, Mar 12, 2015 a
On Thu, Mar 12, 2015 at 8:29 PM, Edward Kimber
wrote:
> You could use println instead of prn as the REPL printer.
>
> (clojure.main/repl :print println)
>
Interesting. It works, but the instance of the REPL it creates doesn't have
all features of lein repl :-( If there was a way to pass this beh
Yeah :-) I want to format a string returned by a function, instead of the
side effects produced by print/ln. I've checked the source code of the
function (pst) to see what it uses to print the stack trace and it's using
println. So, I guess this is the only option I have for the moment.
Now, I jus
You could use println instead of prn as the REPL printer.
(clojure.main/repl :print println)
This seems to break the REPL a bit though, so you may want to figure out
how to put it in the startup,
On Thursday, 12 March 2015 11:08:28 UTC, Hildeberto Mendonça wrote:
>
> Hello,
>
> Running the foll
Oops. Missed the bit about not using println. Ignore my last email.
On Thu, Mar 12, 2015 at 10:19 AM Akiva Schoen
wrote:
> (println) does the trick for me.
> On Thu, Mar 12, 2015 at 8:30 AM Cecil Westerhof
> wrote:
>
>> 2015-03-12 13:51 GMT+01:00 Alex Miller :
>>
>>> Try print-str and println-st
(println) does the trick for me.
On Thu, Mar 12, 2015 at 8:30 AM Cecil Westerhof
wrote:
> 2015-03-12 13:51 GMT+01:00 Alex Miller :
>
>> Try print-str and println-str.
>>
>
> I am not the OP, but I tried that and it does not work. At the moment the
> only thing that I got working is:
> (print
2015-03-12 13:51 GMT+01:00 Alex Miller :
> Try print-str and println-str.
>
I am not the OP, but I tried that and it does not work. At the moment the
only thing that I got working is:
(printf "a line and then \n another line")
But the OP does not want to use that. (Do not ask me why.)
--
Try print-str and println-str.
Also see http://clojure.org/cheatsheet for a handy reference.
--
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
Hello,
Running the following code in the repl:
(str "a line and then \n another line")
returns:
"a line and then \n another line"
Is there a way to ask the repl to interpret that \n char in the string? I
just want to produce a better output without using print/println.
Thanks in advance.
--