UNPKG

typegpu

Version:

A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.

13 lines (12 loc) 269 B
/** * Yields values in the sequence 0,1,2..∞ except for the ones in the `excluded` set. */ export function* naturalsExcept(excluded) { let next = 0; while (true) { if (!excluded.has(next)) { yield next; } next++; } }