def complete_list_with(dest, source, update):
  """
  Calls *update()* for every missing element in *dest* compared to *source*.
  The update function will receive the respective element from *source* as
  an argument.

  Modifies and returns *dest*.
  """

  if len(dest) >= len(source): return dest
  while len(dest) < len(source):
    dest.append(update(source[len(dest)]))
  return dest