def arr = $arrays.newDoubleArray(2) def aw = $objectWrappers.wrap(arr) aw.set(0, 1d) aw.set(1, 2d) $console.log(arr) aw.forEach { $console.log(it) }