> > On Wednesday, May 16, 2012 9:01:49 AM UTC-4, Stuart Sierra wrote:How would > multiple bindings for if-let or when-let work? Should every binding be > testedd? Should they be and-ed together? Should it short-circuit if the > first is false? > > I don't think there are obvious answers to those questions. >
Well, considering everyone on here that's answered that question said 'AND', it seems to be obvious. To make the bindings work like let, where later bindings can see previous bindings, I think the most natural way to do it is to have the bindings behave like the maybe monad. The first time you encounter a false value, it fails. This way, you are using 'AND', but you don't run the risk of a NullPointerException in later bindings if a previous one fails. -Walter -- 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