remove unused LazySeq (#14020)

This commit is contained in:
kim yongjin
2026-01-05 21:38:33 +09:00
committed by GitHub
parent 4f2f38bf64
commit 34fe105386

View File

@@ -128,10 +128,6 @@ def unwrap_class_type(cls_t): return cls_t.func if isinstance(cls_t, functools.p
def pluralize(st:str, cnt:int): return f"{cnt} {st}"+('' if cnt == 1 else 's')
class LazySeq(Generic[T]): # NOTE: Mapping requires __iter__ and __len__, Sequence requires supporting __len__ and slicing in __getitem__
def __init__(self, gen:Callable[[int], T]): self.gen = gen
def __getitem__(self, idx:int) -> T: return self.gen(idx)
# for length N coefficients `p`, returns p[0] * x**(N-1) + p[1] * x**(N-2) + ... + p[-2] * x + p[-1]
def polyN(x:T, p:list[float]) -> T: return functools.reduce(lambda acc,c: acc*x+c, p, 0.0) # type: ignore