I am new to LISP and was wondering how to return a list from a function.  

I need to write a function that takes a list as an input and outputs a list.

If first and last elements are even numbers:  

return a list with first \*\* 2 and last \*\* 4  

else  

return a list with first and last elements

How do I return a list correctly?

```
(defun test (elements)
    (if (and (numberp (nth 0 elements))
            (numberp (last elements)))
        (if (and (evenp (nth 0 elements))
            (evenp (last elements)))
            (return from test (list (expt (last elements) 2) (expt (nth 0 elements) 4)))
        )
    )
    (return from test (list (nth 0 elements) (last elements)))
)

```