Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lisp programming help! Create a recursive function TYPECHECK that takes a list as its parameter and returns a list containing a list of the applicable

Lisp programming help!

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.

I want to make it using basic functions like cond, cons, car, cdr.

[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

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

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

Help with steps 1 & 2

Answered: 1 week ago