I also came to a solution very similar to the sibling comment here. I'd love to see why this doesn't work server-side but does work on my machine. What other tests are you running aside from checking each decrement is correct?
Might I recommend appropriate debugging output? It would save the mystery and back and forth. Not everyone who uses your site has access to you on HN. :)
func below(n uint64, to chan uint64) {
for ; n >= 0; n-- {
var t = n - 1
to <- n
}
close(to)
}
I've run this locally with to <- n replaced with a print statement and it works with unsigned integers.
I'll tell you what's wrong with your code.