Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define bubble
- (lambda (l cap)
- (cond ((null? (cdr l)) l)
- ((cmp (car l)(cadr l))
- (cons (car l)(bubble (cdr l) cmp))))
- (else (cons (cadr l)(buuble (cons (car l)(cddr l)) cmp)))))
- (define bubblesort-1
- (lambda (l cmp)
- (define bloop
- (lambda (l k)
- (if (null? k)
- l
- (bloop (bubble l cmp)(cdr k)))))
- (bloop l l)))
Advertisement
RAW Paste Data
Copied
Advertisement