Extracting algorithm into function in REPL.
Added go-back-word to REPL.