Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!pacbell!ames!killer!pollux!ti-csl!mips!gateley From: gateley@mips.csc.ti.com (John Gateley) Newsgroups: comp.lang.scheme Subject: Re: collect special form for streams Message-ID: <50694@ti-csl.CSNET> Date: 3 Jun 88 19:23:56 GMT Article-I.D.: ti-csl.50694 References: <294@gt-eedsp.UUCP> <50472@ti-csl.CSNET> <748@thalia.rice.edu> Sender: root@ti-csl.CSNET Reply-To: gateley@mips.UUCP (John Gateley) Distribution: na Organization: TI Computer Science Center, Dallas Lines: 25 In article <748@thalia.rice.edu> matthias@rice.edu (Matthias Felleisen) writes: >In article <50472@ti-csl.CSNET> gateley@mips.UUCP (John Gateley) writes: >>In article <294@gt-eedsp.UUCP> schw@gt-eedsp.UUCP (Dave Schwartz) writes: >>>How can the "collect" special form for streams (from Chap. 3 of >>>[...] >>Extend-syntax's pattern matching is not powerful enough to do this. >>[...] >John, what do you think of this one? >[Matthias's code deleted] > >P.S. Eugene Kohlbecker invented extend-syntax. Hi Matthias, As usual you are right and I am wrong. Let me rephrase it a bit: Extend-syntax is not powerful enough to do it without using help macros. I can generate the (car (cdr (... tuple))) pattern without using 'with' or your rebinding of tuple, but I dont think that it can be done as part of the collect macro without actually changing the definition of collect. I dont want to rebind tuple because it changes the pattern matching part of the problem. If you change the definition, then I think you can do it. Can you prove me wrong this time? John