Hi,

On 2 Feb., 08:44, Ken Wesson <[email protected]> wrote:

> This also means that macros should not use list? to test whether an
> object is a nonatomic s-expression. Unfortunately core doesn't contain
> a compact test for atomicity; to get all the list-y things that print
> as (foo bar baz ...) you can use something like
>
> (and
>   (coll? x)
>   (not (or (vector? x) (map? x) (set? x)))
>
> which should return logical true only when x is list-y. Wrap that in a
> predicate function and use it in your macros in place of list?.

seq? should just do fine, since lists are their own seq. coll? just
checks for IPersistentCollection. Why should that hint to list-y
printing?

All in all, this casts another question mark on this style of
programming, IMHO.

Sincerely
Meikel

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

Reply via email to