[racket] eval question

From: Manfred Lotz (manfred.lotz at arcor.de)
Date: Thu Nov 20 10:26:05 EST 2014

Hi there,
If I do this in a REPL 

Welcome to Racket v6.1.1.
-> (define p1 '(a . (expt 2 3)))
-> (eval (cdr p1))
8

it works fine

If I put it in a file:

#lang racket/base
(define p1 '(a . (expt 2 3)))
(eval (cdr p1))

I get this:

expt: unbound identifier;
 also, no #%app syntax transformer is bound
  at: expt
  in: (expt 2 3)
  context...:
   /home/manfred/tmp/test.rkt:
[running body]


What am I doing wrong? Sorry, if this is a stupid question.



-- 
Manfred



Posted on the users mailing list.