Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code using LISP. Create a recursive function TYPECHECK that takes a list as its parameter and returns a list containing a list of the applicable

Code using LISP.

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. Type check for NIL, T, NUMBER, SYMBOL, LIST, and STRING. Do error checking on the input.

Example input and output:

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

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

[51]> (typecheck ())

NIL

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

((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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

More Books

Students also viewed these Databases questions

Question

42. Determine za for the following: a. a .0055 b. a .09 c. a .663

Answered: 1 week ago