Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions