Use List.rev_map in "Gray code" (99 problems)

See https://github.com/ocaml/ocaml.org/commit/8f518cd6f30766dd18334ff1f48f2fd3439bc099#commitcomment-6929121