let reset ?(index=0) () = counter.(index) <- 0