On Jan 11, 2:28 am, Tom Hall <thattommyh...@gmail.com> wrote:
> I know I should not be naming my functions the same thing as ones in core

You can and should, as long as it makes your life easier and doesn't
get too confusing for readers. Just make sure you're able to access
the original core bindings if you need them:

(ns foo.bar
  (:refer-clojure :exclude [and])
  (:require [clojure.core :as c]))

(defn and [x & types]
  "Tests whether x is an instance of all given types."
  (every? #(instance? x %) types))

(defn quagga? [x]
  (c/and (pos? x) (and x Double Number)))

Alright, this a rather negative example because it does get confusing,
but I hope you get the general idea.

Daniel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to