return (value, path = new Path()) => {
    if (!(value instanceof Set)) {
      return failure('value is not a Set', path);
    }

    const out = new Set<T>();
    const warnings: Array<CheckFailure> = [];
    for (const item of value) {
      const result = checker(item, path.extend('[]'));
      if (result.type === 'failure') {
        return failure(result.message, result.path);
      }
      out.add(result.value);
      if (result.warnings.length) {
        warnings.push(...result.warnings);
      }
    }
checker to assert if a mixed value is a Set type