Chez Scheme’s CLI can replay the whole expression you entered (^L) and accepts whole expression unconditionally (^J):
In Ruby’s Pry you can do this by edit
. Then your $EDTIOR
will open and you can cahnge then the edited program will load into pry session again.