Originally Posted by bzimmerly
Open emacs and enter the code into a scratch buffer.
What did you type into the buffer, and did you hit C-j afterwards, or did you just hit the enter key?
In the Emacs manual, you will see references to key combinations such as "C-j" which means hold down either the left or right CONTROL keys, press the j key, and then release both keys.
You are not supposed to cut and paste all of that text shown in that web page. The "=>" part is meant to show what the value of that form is supposed to return, right there in the scratch buffer. The scratch buffers run what is called Lisp Interaction Mode which allows you to evaluate some Emacs Lisp expressions,and have the value inserted directly into the buffer. The Lisp Interaction mode is special in that it rebinds the C-j key sequence to say "get the last expression before the cursor (what the Emacs manual calls "the point") and then evaluate it, and insert the string-ified form of the resulting value right there into the buffer"
You can change the mode of (most) any buffer into Lisp Interaction mode by typing
M-x lisp-interaction RET
Where M-x means hold down the ALT key, then press x, then release both keys, then at the command prompt thus shown, type in lisp-interaction, and then hit the RETurn key.