Subject: Re: (final?) PARTITION specification
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 3 Jul 2001 04:00:34 GMT
Newsgroups: comp.lang.lisp
Message-ID: <9hrg12$gkig$1@fido.engr.sgi.com>
Kent M Pitman  <pitman@world.std.com> wrote:
+---------------
|  (STRING-LIST "foo,bar") => ("foo" "bar")
|  (LIST-STRING '("foo" "bar")) => "foo,bar"
| 
| For the msot part, though, this doesn't have to just work on strings
| if it's properly named.  That would argue for none of SPLIT-STRING, 
| CLEAVE-STRING, or STRING-LIST/LIST-STRING.  Perhaps SPLIT-SEQUENCE,
| CLEAVE-SEQUENCE, or SEQUENCE-LIST/LIST-SEQUENCE.
+---------------

Hmmm... What about SPLICE-SEQUENCE or JOIN-SEQUENCE to go with "cleave":

	(CLEAVE-SEQUENCE "foo,bar") => ("foo" "bar")
	(SPLICE-SEQUENCE '("foo" "bar")) => "foo,bar"

Which would also allow:

	(SPLICE-SEQUENCE '("foo" "bar" "baz") :delim ", ")
	  => "foo, bar, baz"

[I know, that's treading perilously close to something that might be
better do with FORMAT's conditional expressions, as in the example at
the bottom of CLHS 22.3.7.2.]


-Rob

-----
Rob Warnock, 31-2-510		<rpw3@sgi.com>
SGI Network Engineering		<http://reality.sgi.com/rpw3/> [until 8/15]
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA

[Note: aaanalyst@sgi.com and zedwatch@sgi.com aren't for humans ]