Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

★ /prog/ challenge No. 666 ★ (Easy)

Name: Anonymous 2013-01-07 12:41

THE CHALLENGE:
Implement ``Tohosort'' (http://www.freewebs.com/tohosort/) 66in Lisp99 in your programming language of choice.

Post the source code of your implementation. It should at least read the input from stdin and print a sorted list after making the comparisons.

Deadline: 2013-01-21 00:00.

The programs will be judged by elegance, speed and number of comparisons made using a random list that will be published the day of the deadline. The winner will be awarded with Ten (10) שקליםSuss (that's Suss-shekels for you goyim), which is enough to pay the fee needed to cross the Sanzu River by ferry.

Name: Anonymous 2013-01-13 1:03


(format t "Enter a list of all tohou: ")
(defvar *tohou* (read))
(defvar *sorted-tohou* (sort *tohou* (lambda (tohou1 tohou2)
  (format t "Is ~A better than ~A? " tohou1 tohou2)
  (case (read)
    ((yes y) t)
    (t nil)))))
(format t "Here's your list: ~A~%" *sorted-tohou*)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List