Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help on lisp programming. Create a recursive function TYPECHECK that takes a list as its parameter and returns a list containing a list of the

Help on lisp programming.

Create a recursive function TYPECHECK that takes a list as its parameter and returns a list containing a list of the applicable types (in any order) for each item on the list. The types you should check for are: NIL, T, NUMBER, SYMBOL, LIST and STRING. Do error checking on the input.

[50]> (typecheck '(a b c))

((symbol t) (symbol t) (symbol t))

[51]> (typecheck ())

NIL

[52]> (typecheck '(1 "two" (3 4) ()))

((symbol t number) (string t) (list t) (symbol nil list))

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions