Comp 210 Lab 6: Writing time-qsort

;; nums is a list of numbers.
;; Create, using lambda, a new function which
;; takes no arguments, and sorts nums;
;; we return the output of time-apply on that argument.
;;
(define time-qsort
  (lambda (nums)
     (local ((define qsort-nums
               (lambda ()
                  (let ((tra-la-la (qsort nums)))
                    #t))))
     (time-apply qsort-nums))))
Of course, what would be really really snazzy is a function where we give it two things: a list, and a sorting function, and it comes back and tells us how long that particular function took on that list. So you'd say (time-sort iSort (list 2 17 ...)), and it would report the time insertion sort took on your list. We won't do that in lab, but it's pretty easy once you have the above code: replace qsort with a function given an additional argument.
Back to Lab 6