I know that if I want to convert an array of Ints to a String, I do this:
[0,1,1,0].map{"\($0)"}.reduce(""){$0+$1}
but I cannot figure out how would I convert an array of Ints to a comma separated String
Well you can do it like :
let formattedArray = [0,1,1,0].map{String($0)}.joined(separator: ",")
[0,1,1,0].map{String($0)}.joined(separator: ",") is fine
Strings and therefore would not have answered the OP's question; it was missing themapstep. So it's not an exact duplicate IMHO.