<?xml version="1.0"?>
<paste-with-annotations>
  <paste>
    <number>
      <integer>60580</integer>
    </number>
    <user>
      <string>Lau</string>
    </user>
    <title>
      <string>Challenge</string>
    </title>
    <contents>
      <string>(defun challenge-5()
  &quot;Solves 5.th challenge by loading 400 webpages.

   Last digit is:    &quot;
  (let
   ((orig-url &quot;http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=&quot;)
    (newval 12345)
    (oldval 12345))
  (loop for x from 1 to 400 do 
       ((setf newval (http-request (format nil &quot;~a~d&quot; orig-url oldval)))
       (format t &quot;~d:~10t~a~%&quot; x newval)
       ;(setf newval (contains &quot;(?&lt;=next nothing is )\\d+&quot; newval))
       (if (not (scan-regex &quot;Divide&quot; newval))
           (setf oldval (scan-regex &quot;(?&lt;=next nothing is )\\d+&quot; newval))
           (setf oldval (/ newval 2)))
       (format t &quot;~d:~10t~a~%&quot; x oldval)))))</string>
    </contents>
    <universal-time>
      <integer>3419497113</integer>
    </universal-time>
    <channel>
      <string>None</string>
    </channel>
    <colorization-mode>
      <string>Common Lisp</string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
  </paste>
  <annotation>
    <number>
      <integer>1</integer>
    </number>
    <user>
      <string>Lau_of_DK</string>
    </user>
    <title>
      <string>Refactor me</string>
    </title>
    <contents>
      <string>                                 
(defun challenge-5()
  &quot;Solves 5.th challenge by loading 400 webpages.

   Last page is:  peak.html  &quot;
  (let
   ((orig-url &quot;http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=&quot;)
    (newval 12345) (oldval 12345) (myreg &quot;(?&lt;=next nothing is )\\d+&quot;))
  (loop for x from 1 to 400 do
       (setf newval (http-request (format nil &quot;~a~d&quot; orig-url oldval)))
       (if (not (scan-regex &quot;html&quot; newval))
                (format t &quot;~d:~10t~a~%&quot; x newval)
                (return-from challenge-5 newval))
       (if (not (scan-regex &quot;Divide&quot; newval))
           (setf oldval (scan-regex &quot;(?&lt;=next nothing is )\\d+&quot; newval))
           (setf oldval (/ (parse-integer oldval) 2)))
       (format t &quot;~d:~10t~a~%&quot; x oldval))))</string>
    </contents>
    <universal-time>
      <integer>3419500064</integer>
    </universal-time>
    <channel>
      <string>None</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
  </annotation>
</paste-with-annotations>