I would like to split a list into overlapping sublists! I want to generate a first sublist with a specified number of elements. Then I want to shift one element to the right and generate an overlapping sublist. ... and so on, until the end. All sublists should have the same length. Just as an example:
{1, 6, 3, 6, 8, 5, 3}
I would like to obtain the following:
{{1, 6, 3, 6}, {6, 3, 6, 8}, {3, 6, 8, 5}, {6, 8, 5, 3}}
I have no idea how to tackle the problem. Thanks in advance.