Add an alternative solution to `slice`

This stems from a discussion with Zhiqiang (Eric) Ma.
Closes https://github.com/ocaml/ocaml.org/pull/380