API for cljs.pprint - clojurescript


Full namespace name: cljs.pprint

Overview





Public Variables and Functions



formatter

macro
Usage: (formatter format-in)
Makes a function which can directly run format-in. The function is
fn [stream & args] ... and returns nil unless the stream is nil (meaning
output to a string) in which case it returns the resulting string.

format-in can be either a control string or a previously compiled format.

    
    
    
  


formatter-out

macro
Usage: (formatter-out format-in)
Makes a function which can directly run format-in. The function is
fn [& args] ... and returns nil. This version of the formatter macro is
designed to be used with *out* set to an appropriate Writer. In particular,
this is meant to be used as part of a pretty printer dispatch method.

format-in can be either a control string or a previously compiled format.

    
    
    
  


getf

macro
Usage: (getf sym)
Get the value of the field a named by the argument (which should be a keyword).

    
    
    
  


pp

macro
Usage: (pp)
A convenience macro that pretty prints the last thing output. This is
exactly equivalent to (pprint *1).

    Added in clojurescript version 1.2


pprint-logical-block

macro
Usage: (pprint-logical-block & args)
Execute the body as a pretty printing logical block with output to *out* which
must be a pretty printing writer. When used from pprint or cl-format, this can be
assumed.

This function is intended for use when writing custom dispatch functions.

Before the body, the caller can optionally specify options: :prefix, :per-line-prefix
and :suffix.

    
    
    
  


print-length-loop

macro
Usage: (print-length-loop bindings & body)
A version of loop that iterates at most *print-length* times. This is designed
for use in pretty-printer dispatch functions.

    
    
    
  


setf

macro
Usage: (setf sym new-val)
Set the value of the field SYM to NEW-VAL

    
    
    
  


with-pprint-dispatch

macro
Usage: (with-pprint-dispatch function & body)
Execute body with the pretty print dispatch function bound to function.

    
    
    
  
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.