I get the error "Too many arguments to if" with this. Do you have any suggestion?
(defn make-tree [tree [n1 n2 n3 n4]] (.addItem tree n1) (if (empty? n2) (.setChildrenAllowed tree n1 false) (doto tree (.addItem n2) (.setParent n2 n1) (.expandItemsRecursively n1)) (if (empty? n3) (.setChildrenAllowed tree n2 false) (doto tree (.addItem n3) (.setParent n3 n2) (.expandItemsRecursively n2)) (if (empty? n4) (.setChildrenAllowed tree n3 false) (doto tree (.addItem n4) (.setParent n4 n3) (.expandItemsRecursively n3) (.setChildrenAllowed n4 false))))) tree) -- 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