Problem Set 5
Language: Intermediate Student
Due: 11:59 PM Wednesday, Feb. 8
1 Practice with map and filter
Use map, filter and local (you don't need lambda) to define the following functions.
; pts-north : posn list-of-posn -> list-of-posn |
; returns the posns from lop that are north of p, |
; that is, whose y-coordinate is greater than p's y-coordinate |
(define (pts-north p lop) ---) |
; build-straight-line : num list-of-number -> list-of-posn |
; returns a list of posns where the x-coordinate is n and |
; the y-coordinate is a number in lon |
; e.g., (build-straight-line 2 (list 1 2 3)) |
; should be (list (make-posn 2 1) (make-posn 2 2) (make-posn 2 3)) |
(define (build-straight-line n lon) ---) |