ClojureDocs

Nav

Namespaces

flush

clojure.core

Available since 1.0 (source)
  • (flush)
Flushes the output stream that is the current value of
*out*
1 Example
;; iteratively prints the value of x (after a pause of 100ms)  
(doseq [x (range 20)]
  (Thread/sleep 100)
  (pr x)
  (flush))

;; without a `flush` at each iteration,
;; we'll get all the output stream at once flushed and printed only at the end 
;; of `doseq` evaluation.    
(doseq [x (range 20)]
  (Thread/sleep 100)
  (pr x))
See Also
No see-alsos for clojure.core/flush
0 Notes
No notes for flush