Chez Scheme‘s Awesome CLI

Chez Scheme‘s CLI can replay the whole expression you entered (^L) and accepts whole expression unconditionally (^J):

Demo of Chez Scheme‘s Expression Editor

Demo of Chez Scheme‘s Expression Editor

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.