Re: named? predicate?

2017-02-07 Thread Alex Miller
In 1.9 there is a new ident? function which covers keywords and symbols. If you want to include strings, you would have to make that yourself though. On Tuesday, February 7, 2017 at 9:44:55 AM UTC-6, Dave Tenny wrote: > > I've occasionally wanted this and haven't found it. > > (defn named? >

named? predicate?

2017-02-07 Thread Dave Tenny
I've occasionally wanted this and haven't found it. (defn named? "True if object is compatible with the 'name' function. There must be a clojure built-in to do this but I haven't figured it out yet." [x] (or (string? x) (keyword? x) (symbol? x))) Note that simply doing