Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!spool.mu.edu!sol.ctr.columbia.edu!bronze!copper!raja From: raja@copper.ucs.indiana.edu (Raja Sooriamurthi) Newsgroups: comp.lang.scheme Subject: Re: Explode/Implode Query Message-ID: Date: 22 Apr 91 19:45:53 GMT References: <1991Apr22.180734.21661@cunixf.cc.columbia.edu> Sender: news@bronze.ucs.indiana.edu (USENET News System) Organization: Indiana University Lines: 36 betsey@cunixf.cc.columbia.edu (Elizabeth Fike) writes: >Today, in my Scheme class, the professor mentioned the functions >explode and implode, are found in PC-Scheme, but in no >other current versions of Scheme. As these functions seem >extremely useful, I am curious as to why they are not found in >MIT Scheme version 7 (for example). Chez Scheme provides these functions under sicp mode (by doing (support-sicp) ) But you can define these function yourself in any R3.99 scheme as below: ; (explode 'apple) => (a p p l e) ; (implode '(a p p l e)) => apple ; (eq? 'apple (implode (explode 'apple))) => #t (define explode (lambda (sym) (map string->symbol (map string (string->list (symbol->string sym)))))) (define implode (lambda (s*) (string->symbol (apply string-append (map symbol->string s*))))) -Raja --- Raja Sooriamurthi | Computer Science Department raja@cs.indiana.edu | Indiana University