-> UITableViewCell { let tryMakingCell: () -> UITableViewCell? = { switch indexPath.row % 2 == 0 { case true: let cell = tableView.dequeueReusableCell(withIdentifier: ViewControllerEmbeddingCell<RedViewController>.reuseIdentifier, for: indexPath) as? ViewControllerEmbeddingCell<RedViewController> cell?.configure(with: ("\(indexPath.row)"), creationArgs: ()) return cell case false: let cell = tableView.dequeueReusableCell(withIdentifier: ViewControllerEmbeddingCell<BlueViewController>.reuseIdentifier, for: indexPath) as? ViewControllerEmbeddingCell<BlueViewController> cell?.configure(with: (), creationArgs: ()) return cell } } return tryMakingCell() ?? UITableViewCell() }