This is as easy as providing a java.lang.Iterable as part of the configuration:
let result = array[1, 2, 3]
let conf = map[
["interfaces", ["java.io.Serializable", "java.lang.Runnable"]],
["implements", map[
["run", |this| {
for (var i = 0, i < result: length(), i = i + 1) {
result: set(i, result: get(i) + 10)
}
}]
]]
]
let runner = AdapterFabric(): maker(conf): newInstance()
runner: run() # (1)
As you may guess, this changes the |