> It executes. Then I want to access the second command to edit it, for
> example to change the second line:
> : (while (gt0 n)
> (dec 'n 2)
> (prinl n))
> I press the up arrow key, but the only line that is editable is the
> first one (while (gt0 n)
Oh, yeah, I see!
This is not possible, because the REPL editor is strictly line-oriented,
and stores the input as three separate lines.
> Is there a way to edit the second line, even though all the three
> lines could be accessed as one big line, such as:
> : (while (gt0 n) (dec 'n) (prinl n))
What I do in such a case is to press Ctrl-E to go directly on the
history (with 'vim' by default), and change it there.
As it is only three lines here, you can also to it in three steps: First
go up three lines and hit Enter (re-execute the first line). Then go up
three lines again, modify the line, and execute it. Finally, again go up
three lines, and re-execute that last line.
Or - and this is what I usually do - avoid spreading a command over
multiple lines, and go with a long command line. This is the fastest,
though certainly not the most readable ;)