Useful code for the IOCaml notebook