DRAFT: implement sequence
This commit is contained in:
7
src/sequence/containsAll.ts
Normal file
7
src/sequence/containsAll.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export function containsAll<T>(value: Iterable<T>, items: Iterable<T>): boolean {
|
||||
const set = new Set(items);
|
||||
for (const it of value) {
|
||||
set.delete(it);
|
||||
}
|
||||
return set.size === 0;
|
||||
}
|
||||
Reference in New Issue
Block a user