coords

# coords - ; The first three lines of this file were inserted...

This preview shows pages 1–2. Sign up to view the full content.

;; The first three lines of this file were inserted by DrScheme. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname coords) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) ;;Ru Wang 20319247 CS135 Assignment 4 Question 4 ;; ***************************************************** ; ;;(define-struce ellon (list)) ; ;;(define (my-ellon-fn elon) ;; (cond ;; [(empty? elon) . ..] ;; [else . .. (first elon) . .. (my-elleon-fn (rest elon)) . ..])) ; ;;Helper functions: ;; many: (listof any) -> num ;; determines the number of terms in the list. (define (many list) (cond [(empty? list) 0] [else (+ 1 (many (rest list)))])) ;;even-list?: (listof any)->boolean ;;determines if the list length is even. (define (even-list? list) (integer? (/ (many list) 2))) ;;lon: (listof any) ->boolean ;;determines if the list is a list of numbers (define (lon? list)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## coords - ; The first three lines of this file were inserted...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online