Hello everyone,
I am writing to ask for help in learning how to group elements of a list into sublists in accordance with a given criterion. For example: having the list (a 1 a a 2 3 4 a 5) how can I have sublists that group contiguous numbers? To be clear, the result of such an operation on the above list should be: (a (1) a a (2 3 4) a (5)).
I hope I have expressed myself clearly and not to waste your time with questions already asked.
Thank you in advance for your time and a warm greeting.
neo