How do I refer to the last evaluated expression in OCaml's toplevel repl?
I.e. JavaScript uses $_, python uses _, and haskell ghci uses it.
How do I refer to the last evaluated expression in OCaml's toplevel repl?
I.e. JavaScript uses $_, python uses _, and haskell ghci uses it.
Copyright © 2021 Jogjafile Inc.
This is not implemented by the default
ocamlREPL bundled with the compiler. With utop, there is an option to enable this behavior with the-implicit-bindingsflag. With this settings, all anonymous bindings are named as_0,_1,_2,... .