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

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

View Full Document Right Arrow Icon
;; 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)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

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 Right Arrow Icon
Ask a homework question - tutors are online