Well this tutorial doesn't seems common lisp, it seems more emacs lisp, to execute this functions use emacs and ielm command
*** Welcome to IELM *** Type (describe-mode) for help.
ELISP> ;print a line many times
(setq xx 1)
(while (< xx 20)
(message "yay")
(setq xx (1+ xx))
)
*** IELM error *** More than one sexp in input
ELISP> (setq xx 1)
1 (#o1, #x1, ?\C-a)
ELISP> (while (< xx 20)
(message "yay")
(setq xx (1+ xx)))
nil
ELISP> (message "yay")
"yay"
ELISP> (while (> xx 20)
(message "yay")
(setq xx (1+ xx)))
nil
ELISP> xx
20 (#o24, #x14, ?\C-t)
ELISP>
So this is one of the many reasons that this code doesn't work, if you run it in the SBCL REPL it will prompt many errors unknown function, unbound variables,...
as the comments show take a good lisp tutorial or a book, I recommend ANSI Common lisp from Paul Graham but if you like fun Land of Lisp from Conrad barski is your book, and for your code in lisp could be something like this:
CL-USER> (dotimes (xx 20 xx) (print "yay"))
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
"yay"
20
you need to learn how to define variables, setq vs defparameter, special variables ... loops, a lot of thing I begin learning lisp few years ago, an I think that is an amazing trip