Skip to content

Commit b4bb8ce

Browse files
authored
Update README.md
Updated cached sample using tuples
1 parent d0ae7fb commit b4bb8ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ To solve these problems we've added `withCached` function
122122
```kotlin
123123
withSpark {
124124
dsOf(1, 2, 3, 4, 5)
125-
.map { it to (it + 2) }
125+
.map { tupleOf(it, it + 2) }
126126
.withCached {
127127
showDS()
128128

129-
filter { it.first % 2 == 0 }.showDS()
129+
filter { it._1 % 2 == 0 }.showDS()
130130
}
131-
.map { c(it.first, it.second, (it.first + it.second) * 2) }
131+
.map { tupleOf(it._1, it._2, (it._1 + it._2) * 2) }
132132
.show()
133133
}
134134
```

0 commit comments

Comments
 (0)