Mercurial > lasercutter
view src/clojure/pprint.clj @ 10:ef7dbbd6452c
added clojure source goodness
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 21 Aug 2010 06:25:44 -0400 |
parents | |
children |
line wrap: on
line source
1 ;;; pprint.clj -- Pretty printer and Common Lisp compatible format function (cl-format) for Clojure3 ; Copyright (c) Rich Hickey. All rights reserved.4 ; The use and distribution terms for this software are covered by the5 ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)6 ; which can be found in the file epl-v10.html at the root of this distribution.7 ; By using this software in any fashion, you are agreeing to be bound by8 ; the terms of this license.9 ; You must not remove this notice, or any other, from this software.11 ;; Author: Tom Faulhaber12 ;; April 3, 200914 (ns15 ^{:author "Tom Faulhaber",16 :doc "A Pretty Printer for Clojure18 clojure.pprint implements a flexible system for printing structured data19 in a pleasing, easy-to-understand format. Basic use of the pretty printer is20 simple, just call pprint instead of println. More advanced users can use21 the building blocks provided to create custom output formats.23 Out of the box, pprint supports a simple structured format for basic data24 and a specialized format for Clojure source code. More advanced formats,25 including formats that don't look like Clojure data at all like XML and26 JSON, can be rendered by creating custom dispatch functions.28 In addition to the pprint function, this module contains cl-format, a text29 formatting function which is fully compatible with the format function in30 Common Lisp. Because pretty printing directives are directly integrated with31 cl-format, it supports very concise custom dispatch. It also provides32 a more powerful alternative to Clojure's standard format function.34 See documentation for pprint and cl-format for more information or35 complete documentation on the the clojure web site on github.",36 :added "1.2"}37 clojure.pprint38 (:refer-clojure :exclude (deftype)))41 (load "pprint/utilities")42 (load "pprint/column_writer")43 (load "pprint/pretty_writer")44 (load "pprint/pprint_base")45 (load "pprint/cl_format")46 (load "pprint/dispatch")48 nil