You are memoizing a 0arg #(~iname) which makes no sense and should be a 
starting point for debugging. I am not quite sure if I understand your 
intention, but would recommend starting with something simple like

(defmacro defmemoized [name expr]
  `(def ~name (memoize ~expr)))

I don't see why you'd want to defonce.

In general I can't recommend using memoize at the top level because it 
introduces global state that is inaccessible and never cleaned up. Unless you 
know that your function will be called with a limited set of arguments it is 
preferable to create the cached function in a lifecycle and pass it down.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to