Given a list, return right hand cycle direction slice from start to end.

    Usage::

        >>> array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
        >>> cycle_slice(array, 4, 7) # from array[4] to array[7]
        [4, 5, 6, 7]

        >>> cycle_slice(array, 8, 2) # from array[8] to array[2]
        [8, 9, 0, 1, 2]

def cycle_slice(sliceable, start, end):
    """Given a list, return right hand cycle direction slice from start to end.

    Usage::

        >>> array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
        >>> cycle_slice(array, 4, 7) # from array[4] to array[7]
        [4, 5, 6, 7]

        >>> cycle_slice(array, 8, 2) # from array[8] to array[2]
        [8, 9, 0, 1, 2]
    """
    if type(sliceable) != list:
        sliceable = list(sliceable)

    if end >= start:
        return sliceable[start:end+1]
    else:
        return sliceable[start:] + sliceable[:end+1]