export function* sequentialIDGenerator(lastAccountId: string) {
  let lastIdNumber = lastAccountId ? parseInt(lastAccountId.slice(1), 10) : 1;

  while (true) {
    lastIdNumber++;
    const newAccountId = 'R' + lastIdNumber.toString().padStart(5, '0');
    yield newAccountId;
  }
}
