From 6921ca99e4b3f5ba092a48eecab5b860ae47127a Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 20 Jul 2018 14:07:33 +0100 Subject: [PATCH] Added *warn* --- src/adl_support/core.clj | 8 ++++++++ src/adl_support/utils.clj | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/adl_support/core.clj b/src/adl_support/core.clj index ccfee77..328ff6c 100644 --- a/src/adl_support/core.clj +++ b/src/adl_support/core.clj @@ -18,6 +18,14 @@ ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(def ^:dynamic *warn* + "The idea here is to have a function with which to show warnings to the user, + which can be dynamically bound. Any binding should be a function of one + argument, which it should print, log, or otherwise display." + (fn [s] (println s))) + + (defn query-string-to-map "A `query-string` - the query-part of a URL - comprises generally `=&=...`; reduce such a string to a map. diff --git a/src/adl_support/utils.clj b/src/adl_support/utils.clj index 91cec89..191961d 100644 --- a/src/adl_support/utils.clj +++ b/src/adl_support/utils.clj @@ -3,9 +3,7 @@ adl-support.utils (:require [clojure.math.numeric-tower :refer [expt]] [clojure.pprint :as p] - [clojure.string :as s] - [clojure.tools.logging :as log] - [clojure.xml :as x])) + [clojure.string :as s])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;