;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-reader.ss" "lang")((modname week5_w) (read-case-sensitive #t) (teachpacks ((lib "image.ss" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.ss" "teachpack" "2htdp"))))) ;recall sorting: (define (sorta l) (cond [(empty? l) l] [else (insert (first l) (sorta (rest l)))])) (define (insert x l) (cond [(empty? l) (list x)] [else (cond [(< x (first l)) (cons x l)] [else (cons (first l) (insert x (rest l)))])])) (define x 1) (+ (local [(define x 2) (define y (+ x 2))] (+ y 2)) 1)