Subject: Re: I don't understand Lisp
From: Erik Naggum <clerik@naggum.no>
Date: 1998/09/24
Newsgroups: comp.lang.lisp
Message-ID: <3115618937722449@naggum.no>

* Russell Senior <seniorr@teleport.com>
| I have adapted Erik's code to a slightly different interface that I find
| more useful.  It takes only a single sequence element for a delimiter,
| rather than the &rest arguments of Erik's function.  Also, it provides a
| switch to optionally aggregate adjacent delimiter instances.  Also, it
| returns the values as a list of subsequences, rather than a multi-value
| return.

  that's pretty amusing -- the first few versions of this function did
  indeed take a list of delimiters and return a list of values.  however, I
  have come to prefer multiple values to lists of values -- they are easier
  to deal with when binding the result to variables, and especially when
  just using the first value, which I found that I did quite often.  I also
  prefer to use APPLY when I already have a sequence, and when I was only
  hacking out the first element of a delimited string, the list-as-argument
  model became cumbersome.

  I'd have implemented COLLAPSE with (delete "" substrings :test #'equal)
  before reversing the list, and certainly made it optional once you make
  the delimiters a list of its own.  I agree that this flag is useful.

#:Erik