There is a great advanced REPL for OCaml if you need something beyond simple stuff:
https://github.com/diml/utop