On Sun, Jan 30, 2011 at 12:09 PM, Alan Post <alanp...@sunflowerriver.org> wrote: > > Alex, will you explain what I'd doing wrong here using > tree searching patterns? > > (pretty-print (map > (match-lambda > (('foo *** '(bar 1)) #t) > (_ #f)) > '((foo (bar 1)) > (foo (a (bar 1))) > (foo (a (b (bar 1)))) > (foo (a (b (c (bar 1)))))))) > > Only the first form |(foo (bar 1))| is returning #t here. > The remaining forms return #f. I would expect all of them > to return true, based on my naive understanding of the *** > operator.
'foo has to match every step of the path. It sounds like you want ('foo (_ *** '(bar 1))) -- Alex _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users