I have a list
L=(1 j 3 k 4 h 5 n 6 w)
I need to do a function Verify that will verify if the first atom is before the 2nd.
I want to verify this:
> Verify(3 k)
result should return
> T
// because atom ‘3’ is before atom ‘k’
And in this case :
>Verify(h 4)
result should return
> NIL
// because atom ‘h’ is after atom ‘4’
I have to check position of each element and compare positions
What dialect of Lisp are you using? Here are some pointers on how to derive a solution, fill-in the blanks: