abstract class Reference {
  String get ref;
}

class _ReferenceImp implements Reference {
  @override
  final String ref;

  const _ReferenceImp({
    required this.ref,
  });
}

Reference newReference({required String ref}) => _ReferenceImp(ref: ref);

extension ReferenceCopier on Reference {
  Reference copyWith({
    String? ref,
  }) => newReference(
    ref: ref ?? this.ref,
  );
}
