Isn't this a more fundamental problem tho'...: (def x 0)
(or (zero? x) (/ 100 x)) ;; true (alt-or (zero? x) (/ 100 x)) ;; java.lang.ArithmeticException: Divide by zero Sean On Feb 20, 2014, at 4:58 AM, Niels van Klaveren <niels.vanklave...@gmail.com> wrote: > > The result wouldn't return faster if the input is an infinite list. > > Ah, I see the gotcha now. If you don't implement or as a macro, all arguments > will be evaluated before or is invoked. Macro-expansion won't evaluate later > arguments if a former one short-circuits, of course. > I'd only tested this with lazy-sequences, not functions over them.. > > (or true (apply + (range))) > => true > > (alt-or true (apply + (range)))
signature.asc
Description: Message signed with OpenPGP using GPGMail