<?xml version="1.0"?>
<paste-with-annotations>
  <paste>
    <number>
      <integer>50654</integer>
    </number>
    <user>
      <string>jmbr</string>
    </user>
    <title>
      <string>span</string>
    </title>
    <contents>
      <string>(defun span (predicate list)
  &quot;Splits LIST into two lists (returned as VALUES) such that elements
in the first list are taken from the head of LIST while PREDICATE
is satisfied, and elements in the second list are the remaining
elements from LIST once PREDICATE is not satisfied.&quot;
  (do* ((xs list (rest xs))
        (x (first xs) (first xs))
        (ys (cons x nil) (cons x ys)))
       ((or (null xs)
            (not (funcall predicate x)))
        (values (nreverse (rest ys)) xs))))</string>
    </contents>
    <universal-time>
      <integer>3403776348</integer>
    </universal-time>
    <channel>
      <string>#lispcafe</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <null/>
    </is-unicode>
  </paste>
  <annotation>
    <number>
      <integer>2</integer>
    </number>
    <user>
      <string>jmbr</string>
    </user>
    <title>
      <string>Final version</string>
    </title>
    <contents>
      <string>(defun span (predicate list)
  &quot;Splits LIST into two lists (returned as VALUES) such that elements
in the first list are taken from the head of LIST while PREDICATE is
satisfied, and elements in the second list are the remaining elements
from LIST once PREDICATE is not satisfied.&quot;
  (do ((list list (rest list))
       (xs nil (cons (first list) xs)))
      ((or (null list)
           (not (funcall predicate (first list))))
       (values (nreverse xs) list))))</string>
    </contents>
    <universal-time>
      <integer>3403805853</integer>
    </universal-time>
    <channel>
      <string>#lispcafe</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <null/>
    </is-unicode>
  </annotation>
  <annotation>
    <number>
      <integer>1</integer>
    </number>
    <user>
      <string>jmbr</string>
    </user>
    <title>
      <string>Added reference to previous implementation</string>
    </title>
    <contents>
      <string>See also http://paste.lisp.org/display/48648
</string>
    </contents>
    <universal-time>
      <integer>3403776706</integer>
    </universal-time>
    <channel>
      <string>#lispcafe</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <null/>
    </is-unicode>
  </annotation>
</paste-with-annotations>