Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please answer both questions Write a lisp function that accepts a list as the input argument (the list is mixed up integers, decimals, characters and
please answer both questions
Write a lisp function that accepts a list as the input argument (the list is mixed up integers, decimals, characters and nested lists) and creates a list including all the characters in the original list without any duplication. Sample program output is shown below: 1. (z f) (b a 5 3.5) 6 (7) (a) c) > (zfb a c) 2. ((n) 2 (6 h 7.8) (w f) (n) (c)n)-> (h wfcn) uestion Write a Lisp function f-1-swap that swaps the first and last elements of a list. Sample Output: (f-I-swap ((a d) f 10 w h))(h f 10 w (a d) (f-I-swap '(g 6 p 10 m))(m 6 p 10 g) Write a lisp function that accepts a list as the input argument (the list is mixed up integers, decimals, characters and nested lists) and creates a list including all the characters in the original list without any duplication. Sample program output is shown below: 1. (z f) (b a 5 3.5) 6 (7) (a) c) > (zfb a c) 2. ((n) 2 (6 h 7.8) (w f) (n) (c)n)-> (h wfcn) uestion Write a Lisp function f-1-swap that swaps the first and last elements of a list. Sample Output: (f-I-swap ((a d) f 10 w h))(h f 10 w (a d) (f-I-swap '(g 6 p 10 m))(m 6 p 10 g)Step 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