Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am learning LISP by Emacs. I made two lists: List1 and List2. I must use mapcar and lambda for List1 minus List2 and store

image text in transcribed

I am learning LISP by Emacs.

I made two lists: List1 and List2.

I must use mapcar and lambda for List1 minus List2 and store the outcome in one list such as (3 2 1)

Why did I get three different lists? Can you help me fix the code?

Thank you

CL-USER> (defparameter *listi* '(5 4 3)) (defparameter *list2* '(2 2 2)) (mapcar (lambda (x) (mapcar (lambda (y) (- xy)) *list2*)) *listi*) ((3 3 3) (2 2 2) (1 1 1)) CL-USER> 0

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_2

Step: 3

blur-text-image_step3

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