We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a730ff commit 93a85a9Copy full SHA for 93a85a9
src/main/kotlin/chapter01/Statement.kt
@@ -6,7 +6,13 @@ import java.util.Locale.US
6
fun statement(invoice: Invoice, plays: Plays): String {
7
val statementData = mutableMapOf<String, Any>()
8
statementData.put("customer", invoice.customer)
9
- statementData.put("performances", invoice.performances)
+
10
+ fun enrichPerformance(performance: Performance): Performance {
11
+ val result = performance.copy()
12
+ return result
13
+ }
14
+ statementData.put("performances", invoice.performances.map { enrichPerformance(it) })
15
16
return renderPlainText(statementData, plays)
17
}
18
0 commit comments