def __getitem__(self, lst):
        if isinstance(lst, tuple) and len(lst) < 5 and \
                any((Ellipsis is x for x in lst)):
            # L[x, ...]
            if len(lst) == 2 and lst[1] is Ellipsis:
                return enumFrom(lst[0])

            # L[x, y, ...]
            elif len(lst) == 3 and lst[2] is Ellipsis:
                return enumFromThen(lst[0], lst[1])

            # L[x, ..., y]
            elif len(lst) == 3 and lst[1] is Ellipsis:
                return enumFromTo(lst[0], lst[2])

            # L[x, y, ..., z]
            elif len(lst) == 4 and lst[2] is Ellipsis:
                return enumFromThenTo(lst[0], lst[1], lst[3])

            raise SyntaxError(str(lst) % "Invalid list comprehension: %s")

        elif hasattr(lst, "next") or hasattr(lst, "__next__"):
            return List(tail=lst)

        return List(head=lst)
dataset/ETHPy150Open billpmurphy/hask/hask/lang/lazylist.py/__list_comprehension__.__getitem__/swapped operands of `%`