bubsort - (define (sort sent) (if (empty? sent) '() (let...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
(define (bubble sent) (cond ((empty? (butfirst sent)) sent) ((<= (first sent) (first (bf sent))) (se (first sent) (bubble (bf sent)))) (else (se (first (bf sent)) (bubble (se (first sent) (bf (bf sent))))))))
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (define (sort sent) (if (empty? sent) '() (let ((bub (bubble sent))) (se (sort (butlast bub)) (last bub)))))...
View Full Document

This note was uploaded on 11/30/2010 for the course EECS 21281 taught by Professor Harvey during the Spring '10 term at Berkeley.

Ask a homework question - tutors are online