rotate_list

Function
rotate_list(lst, offset)

Return a new list rotated left by offset positions.

Parameters

lst
list to rotate (can contain any elements)
offset
number of positions to rotate (positive = left rotation)

Examples

rotate_list([1,2,3,4,5], 2) -> [3,4,5,1,2]