Liking cljdoc? Tell your friends :D

meme.alpha.emit.render

Wadler-Lindig document algebra and layout engine. Generic — no meme-specific knowledge. Reusable for any pretty-printing task.

Doc types form a small algebra: DocText — literal string DocLine — newline+indent (or flat-alt when flat) DocCat — concatenation DocNest — increase indent DocGroup — try flat, break if too wide DocIfBreak — conditional on flat/break mode

layout renders a Doc tree to a string at a given page width. Use ##Inf for single-line (flat) rendering.

Wadler-Lindig document algebra and layout engine.
Generic — no meme-specific knowledge. Reusable for any pretty-printing task.

Doc types form a small algebra:
  DocText     — literal string
  DocLine     — newline+indent (or flat-alt when flat)
  DocCat      — concatenation
  DocNest     — increase indent
  DocGroup    — try flat, break if too wide
  DocIfBreak  — conditional on flat/break mode

layout renders a Doc tree to a string at a given page width.
Use ##Inf for single-line (flat) rendering.
raw docstring

catclj/s

(cat)
(cat a)
(cat a b)
(cat a b & more)
source

groupclj/s

(group doc)
source

hardlineclj/s

source

if-breakclj/s

(if-break break-doc flat-doc)
source

layoutclj/s

(layout doc width)

Render a Doc tree as a string at the given page width. Use ##Inf for flat (single-line) rendering.

Render a Doc tree as a string at the given page width.
Use ##Inf for flat (single-line) rendering.
sourceraw docstring

lineclj/s

source

line0clj/s

source

nestclj/s

(nest i doc)
source

textclj/s

(text s)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close