Hi, On Tuesday, September 6, 2011 3:35:08 PM UTC+2, HamsterofDeath wrote: > > > (every? (= parameter player) currow > i'd like to write something like: > > do i have to define the function via letfn before, or is there a way > to do it nested in the code? >
you can create a function anytime using either the read-syntax #() or a call to fn: (every? #(= % player) currow) (every? (fn [param] (= param player)) currow) This creates local closures. In such a case, if player is 'rather constant', you might want to use partial, but I didn't look at your code closely. > and more importantly: is there an ide that can point out syntax > errors? intellij idea can detect some parentheses/braces problems, but > i managed to trick it by adding too many ( and ). i got weird > exceptions and had to check everything manually. > It was not a syntax error. Your expression just had the wrong return value. I don't see how an IDE could help here. Kind regards, Stefan -- 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