Create a LISP function named adjacentSequence that takes a list
and returns the list with all the same elements next to each
other.
For example: adjacentSequence '(c b c d e) returns (C C B D
E)
Second example: (12 13 14 12 18) returns (12 12 13 14 18)
Third example: (a b c a c e f b a g e) returns (A A
A B B C C E E F G)
Create a LISP function named adjacentSequence that takes a list and returns the list with all the same elements next to
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am