<commit_before>package ii_collections

fun example() {

    val result = listOf("abc", "12").flatMap { it.toList() }

    result == listOf('a', 'b', 'c', '1', '2')
}

val Customer.orderedProducts: Set<Product> get() {
    // Return all products ordered by customer
    todoCollectionTask()
}

val Shop.allOrderedProducts: Set<Product> get() {
    // Return all products that were ordered by at least one customer
    todoCollectionTask()
}
<commit_msg>ii_16 solution<commit_after>package ii_collections

fun example() {

    val result = listOf("abc", "12").flatMap { it.toList() }

    result == listOf('a', 'b', 'c', '1', '2')
}

val Customer.orderedProducts: Set<Product> get() = this.orders.flatMap { it.products }.toSet()

val Shop.allOrderedProducts: Set<Product> get() = this.customers.flatMap { it.orderedProducts }.toSet()

{'fraction_non_alphanumeric': 0.15865384615384615, 'fraction_numerical': 0.01201923076923077, 'mean_word_length': 4.305732484076433, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '107101', 'n_tokens_mistral': 281, 'n_tokens_neox': 270, 'n_words': 72}