diff --git a/src/main/kotlin/io/arrow/example/MetaExamples.kt b/src/main/kotlin/io/arrow/example/MetaExamples.kt index 59c54c6..b5ab5bd 100644 --- a/src/main/kotlin/io/arrow/example/MetaExamples.kt +++ b/src/main/kotlin/io/arrow/example/MetaExamples.kt @@ -4,13 +4,13 @@ package io.arrow.example import arrow.optics.Every // WRONG -// fun Order.containsSingleProductWrong() = -// entries.all { entry -> entry.id == entries[0].id } +fun Order.containsSingleProductWrong() = + entries.all { entry -> entry.id == entries[0].id } // RIGHT -fun Order.containsSingleProductRight() = - if (entries.isEmpty()) false - else entries.all { entry -> entry.id == entries[0].id } +// fun Order.containsSingleProductRight() = +// if (entries.isEmpty()) false +// else entries.all { entry -> entry.id == entries[0].id } fun Order.addOneFreeNoOptics(): Order = Order(entries.map { it.copy(amount = it.amount + 1) })