Christophe Grand was "experimenting" with some extensions to if-let and when-let that had implicit ANDs for the let-forms:
https://github.com/cgrand/parsley/blob/master/src/net/cgrand/parsley/util.clj It feels intuitive to me to allow multiple if-let-forms like cgrand implements, and I can certainly remember situations where I could have used such a feature. -FrankS. On May 16, 2012, at 11:26 AM, dgrnbrg wrote: > I too assumed that if/when-let would support multiple bindings, short- > circuiting if one failed, when I started learning Clojure. It seems > that short-circuiting multiple bindings isn't surprising. > > On May 16, 10:56 am, Jay Fields <j...@jayfields.com> wrote: >> I've also attempted to use if/when-let with multiple bindings in the past. >> I assumed that it would behave as 'AND' and that no bindings would be >> available in 'else' >> >> Cheers, Jay >> >> >> >> >> >> >> >> On Wed, May 16, 2012 at 10:29 AM, Dan Cross <cro...@gmail.com> wrote: >>> On Wed, May 16, 2012 at 9:16 AM, Aaron Cohen <aa...@assonance.org> wrote: >>>> On Wed, May 16, 2012 at 9:10 AM, Walter Tetzner < >>> robot.ninja.saus...@gmail.com> wrote: >>>>> 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. >>>>> [...] >> >>>> Saying something is obvious and then using the word monad a paragraph >>> later >>>> is contradictory. ;) >> >>> Hypothetically, "this is obvious, unlike most monads." Zing! >> >>>> What should happen on the else branch of the if-let; which bindings are >>> in >>>> scope and what would be their values? >> >>> None of the bindings should be in scope. >> >>> - Dan C. >> >>> -- >>> 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 > > -- > 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 -- 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