Skip to content

Commit 8172aed

Browse files
ctruchiCLOVIS-AI
authored andcommitted
tp9 step 1 solution
1 parent f3804fe commit 8172aed

File tree

1 file changed

+5
-1
lines changed
  • tp9/src/main/kotlin/fmt/kotlin/fundamentals

1 file changed

+5
-1
lines changed

tp9/src/main/kotlin/fmt/kotlin/fundamentals/Cellar.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ package fmt.kotlin.fundamentals
33
data class Cellar(
44
val bottles: List<Bottle>
55
) {
6-
fun describeBottles() = ""
6+
fun describeBottles() = bottles.joinToString("\n") { bottle ->
7+
bottle.run {
8+
"Bouteille de ${name} de ${year}"
9+
}
10+
}
711
}

0 commit comments

Comments
 (0)