I found a LISP 1.5 Manual with some code in it.
This one is from Section 1.2
Examples
cons[A;B]=(A . B)
From reading through the manual it looks like the function cons is taking two atoms as input arguments, A and B, and outputting an S-expression, (A . B).
Question:
How do I put the code cons[A;B] in a repl, run it, and see the output (A . B)?
I'm expecting to do something like:
~ $ lisp1.5
> cons[A;B]
=> (A . B)
For example, if I went to https://www.ruby-lang.org/en/ and saw some code, I would copy it, type irb into my shell and paste it.
~ $ irb
irb(main):001:0> puts "Hello World!"
Hello World!
=> nil

Section 1.2 of the manual explains that this is only a notation, used to help readers distinguish between functions and S-expressions (emphasis mine).
It is followed by an example:
The manual introduces Lisp, its evaluation model, the compiler, etc. The above is the mathematical definition of
cons, whereAandBare metavariables: for all valuesAandB, the application ofconsonAandBis a cons-cell where the CAR part isAand the CDR partB. If someone developed a denotational semantics to express Ruby's evaluation model, you would have the same kind of definitions. You can convert this notation if you want, i.e. you write(cons 1 2)to test it concretely. But the 1.5 manual is arguably not the best starting point for learning Common Lisp, as standardized since 1994. You could try the following ones, instead:Practical Common Lisp, Peter Seibel
Paradigms of Artificial Intelligence Programming, Peter Norvig
Please consult Cliki, the Common Lisp wiki.