Write a LISP function that accepts two lists as it's only arguments. The function should return a new list with the arguments as it's elements.
So, if you pass the function (a b c) and (1 2 3), the function should return ((a b c) (1 2 3)).
The Lisp Function that is used is List
List Function takes any number of arguments and returns a new list with the arguments as its elements
Lisp Code is :
(write (list '(a b c) '(1 2 3)))
Explanation:
Here In List function we passed two arguments i.e. ( a b c) and ( 1 2 3) and now when it return a new list then we are printing ot using write method .
Hence Code Screen Shot and Output is
This is how you can make a function which accept two list and give a single list as a output
Thank you
if you like the answer upvote it , if any doubt drop a comment in a comment box
Get Answers For Free
Most questions answered within 1 hours.