Hi all,
I have a list of lists where the lists always contain two values, like this one:
(2.0 329.62756)
(2.0 261.62555)
(2.0 97.99885)
(2.0 349.22824)
(2.84 329.62756)
(2.84 391.99542)
(2.943 195.99773)
(2.943 277.18265)
(3.047 293.66476)
(3.047 246.94165)
(3.683 195.99773)
(3.683 329.62756)
(3.683 349.22824)
(3.683 349.22824)
(4.118 130.81278)
(4.118 246.94165)
(4.118 261.62555)
(4.118 195.99773)
I’d need to group the lists in the list on the base of the first value of every list, so that the lists which contain the same first value are grouped together:
((2.0 329.62756)
(2.0 261.62555)
(2.0 97.99885)
(2.0 349.22824))
((2.84 329.62756)
(2.84 391.99542))
((2.943 195.99773)
(2.943 277.18265))
((3.047 293.66476)
(3.047 246.94165))
((3.683 195.99773)
(3.683 329.62756)
(3.683 349.22824)
(3.683 349.22824))
((4.118 130.81278)
(4.118 246.94165)
(4.118 261.62555)
(4.118 195.99773))
What is the lisp code or the patch that could do this work?
Thanks for your kind attention.
Best,
Francesco Vitale