How to interpret complete programs in Ready Lisp?

I just downloaded Ready Lisp and I am playing with REPL. I want to know how to write a long program, interpret it and get the result? It looks like a PLT circuit.

I would like to do this with as little hassle as possible. I just want to chat with the book I'm reading. Thank.

+3
source share
2 answers

General Lisp provides LOAD and COMPILE FILE functions .

  • LOAD will load the text source code or compiled Lisp files and execute them. Any print made goes to normal output streams.

  • COMPILE-FILE Lisp. , , , , . . , COMPILE-FILE, LOAD.

, Common Lisp Lisp . PLT- , . , .

+2

(example.lisp), , C-c C-c C-c C-k .

" " , . , defun. REPL .

, :

(defun square (n)
  (* n n))

, ​​ , C-c C-c, REPL :

CL-USER> (square 3)
9
CL-USER>
+2

Source: https://habr.com/ru/post/1768555/


All Articles