Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!bronze!copper!raja From: raja@copper.ucs.indiana.edu (Raja Sooriamurthi) Newsgroups: comp.lang.scheme Subject: Re: how to write append from primitives? Message-ID: Date: 28 May 91 20:40:40 GMT References: <1650003@hpkslx.mayfield.HP.COM> Sender: news@bronze.ucs.indiana.edu (USENET News System) Organization: Indiana University Lines: 11 On way would be (define append (lambda (lst1 lst2) (if (null? lst1) lst2 (cons (car lst1) (append (cdr lst1) lst2))))) Small exercise: modify append to take the union of lst1 and lst2 (assuming that lst1 and lst2 are themselves sets -- no duplicates)