On Wed, Jul 27, 2011 at 9:30 PM, Anthony Grimes <disciplera...@gmail.com> wrote: > It looks like main is called the same way. Like I said, my example is not > much different than the one that comes with cljs. > > (ns nodels > (:require [cljs.nodejs :as nodejs])) > (def fs (nodejs/require "fs")) > (def path (nodejs/require "path")) > (defn file-seq [dir] > (tree-seq > (fn [f] (.isDirectory (.statSync fs f) ())) > (fn [d] (map #(.join path d %) (.readdirSync fs d))) > dir)) > (defn -main [& paths] > (dorun (map println (mapcat file-seq paths)))) > (set! *main-cli-fn* -main) > The above example is the one I'm talking about and works fine. It's weird.
I see some maybe-salient differences: 1. The working example has an ns form. Maybe being in the JS equivalent of the default package is causing problems? 2. The working example has nodejs/require instead of node/require in the defs. However, if you're using (ns something (:require [cljs.nodejs :as node])) and just didn't post it then neither of those can be related to the cause... -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- 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