Hi,

On Feb 24, 8:59 pm, Amitava Shee <amitava.s...@gmail.com> wrote:

> I am getting the following exception while trying to use clojure.zip
>
> user=> (use '[clojure.zip :as zip])
> java.lang.IllegalStateException: next already refers to:
> #'clojure.core/next in namespace: user (NO_SOURCE_FILE:0)
>
> What I am I missing?

1. (ns foo.bar (:require [clojure.zip :as zip])) => you have to prefix
elements from c.z with zip (eg. zip/down), etc.
2. (ns foo.bar (:use [clojure.zip :as zip :exclude (next)])) => you
can use all functions from c.z directly (eg. down), only next has to
be called as zip/next.
3. (ns foo.bar (:refer-clojure :exclude (next)) (:use clojure.zip)) =>
you can call all function from c.z directly including next, but you
have to qualify calls to the next from core: clojure.core/next.

Hope that helps. The first alternative is probably what you wanted to
do in the first place.

Sincerely
Meikel

-- 
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