Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1 Write a LISP function in DrRacket to determine if all the elements in a given list are numbers only. The list has no

Problem 1

Write a LISP function in DrRacket to determine if all the elements in a given list are numbers only. The list has no embedded lists and is only a list of depth. The function return T if the list only contains numbers and F false if any item is a none number.

(allnums '(1 4 2 9 5 12)=T

(allnums '(1 2 3 a b c 4 5 6) = F

(allnums '()) = F

(allnums '(7)) =T

(allnums '(x)) =F

Problem 2

Write a LISP function that will determube if a list of numbers is in creasing order from smallest to largest. The list hsould be only numbers and no embedded lists are included. The function return T if the list is increasing and F false if the numbers are not increasing or not all numbers. There must be at least two numbers to compare.

(increasing '(1 a 2 b 3 c))=F

(increasing '(1 4 7 8 9 11 21))=T

(increasing '(3 6 7 1 9 11))=F

(increasing '(2 3 3 5 8 9))=F

(increasing '(1))=F

(incerasing '(a b c))=F

(increasing '())=F

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

=+what kinds of policies and practices should be developed?

Answered: 1 week ago

Question

=+ Of the HR issues mentioned in the case,

Answered: 1 week ago