Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def tee(iterable, n=2):
if n >= 0 and _coconut.isinstance(iterable, (_coconut.tuple, _coconut.frozenset)):
return (iterable,) * n
if n > 0 and (_coconut.hasattr(iterable, "__copy__") or _coconut.isinstance(iterable, _coconut.abc.Sequence)):
return (iterable,) + _coconut.tuple(_coconut.copy.copy(iterable) for _ in _coconut.range(n - 1))
return _coconut.itertools.tee(iterable, n)
class reiterable(object):
def __copy__(self):
return self.__class__(_coconut.copy.copy(self.iter))
def __fmap__(self, func):
def __copy__(self):
return self.__class__(_coconut.copy.copy(self.iter))
def __eq__(self, other):
def __copy__(self):
return self.__class__(self.func, _coconut.copy.copy(self.iter))
def __fmap__(self, func):
def __copy__(self):
return self.__class__(self.func, *_coconut.map(_coconut.copy.copy, self.iters))
def __fmap__(self, func):
def __copy__(self):
return self.__class__(self.func, _coconut.copy.copy(self.iter))
def __fmap__(self, func):
def __copy__(self):
return self.__class__(_coconut.copy.copy(self.iter), self.start)
def __fmap__(self, func):