Answered step by step
Verified Expert Solution
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
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> 0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started