Path: news.daimi.aau.dk!olevi From: olevi@daimi.aau.dk (Ole Villumsen) Newsgroups: comp.lang.beta Subject: Re: Recursive, double INNER Date: 13 Feb 1995 15:21:57 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 49 Message-ID: <3hntel$17j@belfort.daimi.aau.dk> References: NNTP-Posting-Host: angers.daimi.aau.dk I know (Jens Cornelius Olsen) has already followed up to this question. I think I have a different solution that I personally like better. I avoid the use of pattern references (##'s). Instead I use another block level: forAllThings: (# before:< ... after:< ... recursiveForAll:< (# do before; ... &recursiveForAll; ... after; #); do &recursiveForAll; #); forAllDingbats: forAllThings (# before::< (# ... #); after::< (# ... #); #); Does this solve your problem? Ole V. Alf-Ivar Holm writes: >Finally, I would usually use forAllThings directly, not making a >specific sub pattern: > > do > ... > &forAllThings > (# > before::< (# ... #); > after::< (# ... #); > callMe::< (* What am I supposed to put here? *) ; > #); > >My problem is that I don't manage to bind callMe to that specific >instance. In my solution, that happens automatically. I like that it is not possible to forget to further bind "CallMe". >What am I missing? Some minor syntactic detail? Some major >fundamental issues about programming or BETA? A course about >rewriting recursive algorithms to non-recursive? > Affi Ole Villumsen, COmputer Science Department, Aarhus University, Denmark