Yet Another Clojure Notes Blog

I decided to learn a functional language: I chose Clojure, because it runs on the JVM, and it seems more easy to digest for me, having some Java background. In this blog, I am going to write notes mainly for myself. However, since I already take the time to write them down, why not publish them? Maybe they will be useful for someone else too :) Please keep in mind, that I'm an absolute beginner in Clojure. So please use my blog only at your own responsibility. You have been warned ;)

Saturday, August 12, 2017

TIL with-out-str

with-out-str

Retrieve the contents of println.

Example:

(with-out-str (println "Hello"))
; result "Hello\n"

Posted by Attilio at 6:38 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)
  • Questions I have

Blog Archive

  • ►  2018 (1)
    • ►  February (1)
  • ▼  2017 (3)
    • ►  October (1)
    • ▼  August (1)
      • TIL with-out-str
    • ►  February (1)
  • ►  2016 (3)
    • ►  October (2)
    • ►  January (1)
  • ►  2015 (12)
    • ►  August (1)
    • ►  July (11)
Simple theme. Powered by Blogger.