keep getting this error, (using R5RS standard language) 

read-line: undefined;
 cannot reference undefined identifier



(define repl
  (lambda()
  (display "\nUofL>")
  (let ((inp (read-line)))
                
  (set! lista (append (string-split inp) lista))
                (set! lengtha (length (string-split inp)))
        (cond
          ((equal? inp "CLEAR")(set! lista null)(repl))
          ((equal? inp "REV")(set! lista (cdr lista))(set! lista (rev 
lista))(repl))
          ((equal? inp "STACK")(set! lista (cdr lista))(display lista)(repl))
          ((equal? inp "SWAP")(set! lista (cdr lista))(set! lista (append (list 
(cadr lista)) (list (car lista)) (cddr lista)))(repl))
          ((equal? (car lista) "exit") (display "Bye.")(set! lista (cdr lista)))
          ((equal? inp "DROP")(set! lista (cddr lista))(repl))
          ((equal? inp "POP")
           (set! lista (cdr lista))
           (cond
             ((null? lista)(display "Empty Stack")(repl))
             (else 
           (set! pop (car lista))(set! lista (cdr lista))(repl)))
           )
          ((equal? inp "SAVE")
           (set! lista (cdr lista))
           (cond
             ((null? pop)(display "Can't SAVE null"))
             (else
              (set! lista (append (list pop) lista))(set! pop null)
              )
             
             )
           (repl))
          ((equal? inp "DUP")(set! lista (cdr lista))(set! lista (append (list 
(car lista)) lista))(repl))
          ((equal? (op? (car lista)) ".")(set! lista (cdr lista))
                   (cond
                     ((equal? lengtha 1)(if (null? lista) (display "Empty 
Stack") (display (car lista)))(repl))
                     (else
                          (displayn (- lengtha 1))(repl)))
                   )
          ((string->number (car lista))
           (cond
             ((null? (cdr lista))(repl))
             ((op? (cadr lista))(repl))
             (else
           (set! lista (cleanup-eval lista))(repl))
           )
           )
          
          (else
           (display (car lista))(set! lista (cdr lista))
           (repl))
          )
   )
              )
  )

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to