/** Original teaching exercise: preserve first occurrence order without mutating input.
 * Set uses SameValueZero equality: object values compare by identity, not contents.
 * You may copy and adapt this exercise for learning.
 */
export function stableUnique(values) {
  if (!Array.isArray(values)) throw new TypeError('Expected an array');
  return [...new Set(values)];
}
