Thank you Michele! This is a nice example. Jinsong
On Thursday, May 28, 2015, Michele La Monaca <[email protected]> wrote: > On Thu, May 28, 2015 at 1:53 AM, John Cowan <[email protected] > <javascript:;>> wrote: > > Jinsong Liang scripsit: > > > >> Then is there a straightforward way to get a list of booleans "or"ed? I > >> tried "fold" with "or" but it does not work either. It seems writing a > loop > >> or a recursion for this is a little overkill. > > > > You want "any". > > Or you can write down your own apply which applies to macros: > > (define-macro apply-syntax > (lambda (macro args) > `(,macro ,@args))) > > (define-syntax apply-syntax > (syntax-rules () > ((_ macro (args ...)) (macro args ...)))) > > > (apply-syntax or (#f (+ 1 2) (print "hello"))) > > => 3 > > Regards, > Michele > > _______________________________________________ > Chicken-users mailing list > [email protected] <javascript:;> > https://lists.nongnu.org/mailman/listinfo/chicken-users >
_______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
