Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!snorkelwacker.mit.edu!think.com!samsung!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!cunixb.cc.columbia.edu!lpl From: lpl@cunixb.cc.columbia.edu (Leonard P Lidov) Newsgroups: comp.lang.scheme Subject: Re: news Message-ID: <1991Mar2.000059.16156@cunixf.cc.columbia.edu> Date: 2 Mar 91 00:00:59 GMT References: <1991Mar1.153624.45733@vaxb.acs.unt.edu> Sender: usenet@cunixf.cc.columbia.edu (The Network News) Reply-To: lpl@cunixb.cc.columbia.edu (Leonard P Lidov) Organization: Columbia University Lines: 29 Nntp-Posting-Host: cunixb.cc.columbia.edu In article <1991Mar1.153624.45733@vaxb.acs.unt.edu> munawar@vaxb.acs.unt.edu writes: > My problem is to flatten > '((a b)(c d)(e f)) in to '(a b c d e f) >I am not sure how to tackle this problem specifically in _TI PCSCHEME_ > Gee--do you need a PCScheme specific solution?? The problem isn't hard, though: using a nicely abstracted form from Ableson & Susman: given that z is ((a b) (c d) (e f)): (define (accumulate combiner init-value l) (if (null? l) init-value (combiner (car l) (accumulate combiner init-value (cdr l))))) (accumulate append '() z) ought to produce (a b c d e f) pretty easily. Good Luck, Len "All history is the history of CS" Marx