Immutable data prototype. (#799)

This commit is contained in:
Nikolay Igotti
2017-08-22 16:21:10 +03:00
committed by GitHub
parent 87f2bed5c8
commit 109f84f9af
12 changed files with 215 additions and 15 deletions
@@ -0,0 +1,13 @@
import konan.*
fun main(args : Array<String>) {
val data = immutableBinaryBlobOf(0x1, 0x2, 0x3, 0x7, 0x8, 0x9, 0x80, 0xff)
for (b in data) {
print("$b ")
}
println()
val dataClone = data.toByteArray()
dataClone.map { print("$it ") }
println()
}