     (when-not (empty? unresolved)
       (println (str "\n" "Unable to resolve these symbols: " (string/join ", " unresolved))))))
 
+(def ^:dynamic *display* :table)
+
+(defn display
+  "Pretty prints data or returns it depending on value of *display*. Default is to print with table."
+  [data & options]
+  (case *display*
+    :pprint (do (clojure.pprint/pprint data) (println ""))
+    :self (identity data)
+    (apply table.core/table data options)))
+
 ; =========
 ; Inspectors: inspect vars, namespaces, fns, envs, properties ...
 


; mtable 'doc
(defn var-meta "Prints meta of a symbol" [sym]
  (table.core/table (meta (resolve sym))))

(defn vars-meta "Prints public vars for a namespace with its meta info"
  ([] (vars-meta *ns*))
  ([nsname]
    (table.core/table (map #( meta (resolve %)) (clojure.repl/dir-fn nsname)))))

(defn vars-values
  "Prints dynamic vars for a namespace mapped to their values"
   [& options]
   (let [opts (apply hash-map options)]
     (apply
       table.core/table
       (cons
         ["Var" "Value"]
         (map #(identity [% (deref %)]) (ns-dynamic-vars (get opts :ns *ns*))))

(ns u
  (:require [clojure.pprint])
  (:require [clojure.string :as string]))

; =======
