Hello, I'm trying to study this page <http://clojure.org/
special_forms> using NetBeans Enclojure.

I was able to successfully define and use the mymax function, but when
I try to examine the metadata, I get the error above. Source code and
REPL transcript follow:

========================================================

user=> (com.new-ns/mymax 4 2 9 1)
9
user=> #^'com.new-ns/mymax
#<IllegalArgumentException java.lang.IllegalArgumentException:
Metadata must be Symbol,Keyword,String or Map>
user=> #<Exception java.lang.Exception: Unmatched delimiter: )>
user=> #<Exception java.lang.Exception: Unmatched delimiter: )>
user=>

========================================================


(ns com.new-ns
  ;(:require )
  ;(:use )
  ;(:import )
  )


(defn
#^{:doc "mymax [xs+] gets the maximum value in xs using > "
   :test (fn []
             (assert (= 42  (mymax 2 42 5 4))))
   :user/comment "this is the best fn ever!"}
  mymax
  ([x] x)
  ([x y] (if (> x y) x y))
  ([x y & more]
   (reduce mymax (mymax x y) more)))



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