@Cyklan currently join only works on array of strings, so the workaround you have to do right now is to convert the values into strings and invoke .join('-')
nums := [1, 2, 3]
println(nums.map(it.str()).join('-'))
// 1-2-3
Yeah I think it should stay nums.map(it.str()).join('-')
It's easier and more explicit.
It's not very clear that []int.join() returns a string
Closed. []int.join won't be implemented.
Most helpful comment
Yeah I think it should stay
nums.map(it.str()).join('-')It's easier and more explicit.
It's not very clear that
[]int.join()returns a string