I have a nested list that is similar to this and sorted on time ascending:
[[TIME, 'b', 0],
[TIME, 'b', 1],
[TIME, 'b', 1],
[TIME, 'b', 1],
[TIME, 'b', 10],
[TIME, 'b', 0],
[TIME, 'b', 1],
[TIME, 'b', 1],
[TIME, 'b', 10],
[TIME, 'b', 0],
[TIME, 'b', 1],
[TIME, 'b', 1],
[TIME, 'b', 1],
[TIME, 'b', 1],
[TIME, 'b', 10]]
The third item in each list is either a 0, 1 or 10. 0 represents the start, 1 represents moving and 10 represents the finish. How can I split this into a further nested list so I would end up with a list of journeys similar to this:
[[[TIME, 'b', 0],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 10]],
[[TIME, 'b', 0],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 10]],
[[TIME, 'b', 0],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 1],[TIME, 'b', 10]]]