orandmap_function

orandmap_function - constructor repeating-decimal #f #t...

Info iconThis preview shows page 1. 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-intermediate-lambda-reader.ss" "lang")((modname orandmap_function) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: constructor repeating-decimal #f #t none #f ()))) (define (equals-2 lst) (local [ (define (eq-2? x) ( = x 2)) ] (andmap eq-2? lst) ) ) (equals-2 (list 1 2 4 3 2 2 )) ;;how to generalize (define (equals-n lst n) (local [ (define (eq-n? x) ( = x n)) ] (ormap eq-n? lst) ) ) (equals-n (list 1 3 3 2 3 4 3 2) 3)...
View Full Document

Ask a homework question - tutors are online