This commit is contained in:
2026-08-24 08:11:59 -07:00
commit 53df0eed10
275 changed files with 133056 additions and 0 deletions
@@ -0,0 +1,10 @@
from collections.abc import Callable, Iterable
from typing import Any
def stable_unique(values: Iterable[Any], key: Callable[[Any], Any]) -> list[Any]:
result = []
for value in values:
if not any(key(existing) == key(value) for existing in result):
result.append(value)
return result