> Will i get used to the nested 'if' blocks someday ? Any way to write > the equivalent of a switch case here, if only to improve > readibility ?
You could use cond: (cond (not (blocked? screen new_x new_y)) [(assoc player :y new_y) true] (not (blocked? screen new_x (player :y)) [(assoc player :x new_x) true] (not (blocked? screen (player :x) new_y) [(assoc player :y new_y) true] :else [player false]) --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---