Lisp had a package for that, DWIM, in the late 60s: https://en.wikipedia.org/wiki/DWIM.