1 ;; The first three lines of this file were inserted by DrScheme. They record metadata
2 ;; about the language level of this file in a form that our tools can easily process.
3 #reader(lib "htdp-intermediate-reader.ss" "lang")((modname 18.2.1) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "draw.ss" "teachpack" "htdp")))))
10 (+ (* 55 x) (+ x 11)))
17 (local ((define (g x) (+ 2 (* x 2))))
20 (define (a-function y)
21 (local ((define (f x y) (+ (* x y) (+ x y)))
23 (local ((define (f x) (+ (* x x) 55))
24 (define (g y) (+ (f y) 10)))
26 (define (h x) (f x (g x))))
29 ;; sort : list-of-numbers -> list-of-numbers
31 (local ((define (sort alon)
34 [(cons? alon) (insert (first alon) (sort (rest alon)))]))
35 (define (insert an alon)
37 [(empty? alon) (list an)]
39 [(> an (first alon)) (cons an alon)]
40 [else (cons (first alon) (insert an (rest alon)))])])))