Organizarse y mantenerse organizado debería llevar el menor tiempo y esfuerzo posible. Esta es la razón por la que uso Huuii.


Puedes crear una cuenta y mantenerte organizado.

www.huuii.com

Huuii goals

Experimenting in the REPL


You can read more about REPL


To try the REPL, you need a Lisp expression, for instance, you can type A, B or C  expression from the image below.


;;Example:


CL-USER> (+ 1 2)
3

Anything in parentheses is a list, in this case a list of three elements, the symbol +, and the numbers 1 and 3. Lisp, in general, evaluates lists by treating the first element as the name of a function and the rest of the elements as expressions to be evaluated to yield the arguments to the function. In this case, the symbol + names a function that performs addition. 1 and 2 evaluate to themselves and are then passed to the addition function, which returns 3. The value 3 is passed to the printer, which prints it.



Read Eval Print Loop (REPL)
 

You interective with y
our Lisp system through a build-in  piece of code called the toploop, which repeats three simple steps for as long as you run the Lisp system.

  1. Read an expresion.
  2. Evalue the expresion just read.
  3. Print the result of the evaluation. 

Let's do it

 (defun my-toploop ()
  (loop
     (terpri); print a new line
      (princ 'ready>) ;print phase

     ;; displays the result of the evaluation
      (print (eval (read)))))
 


And some functions to call 

(defun hello ()
  (format t "Hello!"))

(defun test (x)
  (+ x 10))

Try it!

CL-USER> (my-toploop)

READY>

READY> (+ 5 5)

10 

READY> (hello)
Hello!
NIL
READY>(test 5)

15
READY>


Getting out of you toploop

enter an erroneus expression like ( + 2 'a)