Question
Write an emacs/lisp program (Provide proof it works) A function called reverse that reverses a list. The function takes one parameter that you can assume
Write an emacs/lisp program (Provide proof it works)
A function called reverse that reverses a list. The function takes one parameter that you can assume to be a list, and returns another list which is the reverse of the argument (you don't need to do the operation in place). You can use the function list that creates a list out of its arguments, or append that concatenates two lists and returns the result. Implementation suggestion: using dolist or recursion.
What the results should look like: (reverse '()) ; '() or nil (reverse '(2)) ; (2) (reverse '(1 2 3)) ; (3 2 1)
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