[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[plt-scheme] Defines in lets

Hi all,

Why can't I do something like this:
> (let ((x 0)) (define (set-x y) (set! x y)) (define (read-x) x))
begin (possibly implicit): no expression after a sequence of internal definitions

I'm used to do it in Common Lisp like a way to avoid global
variables and use data encapsulation. How can I do it in Scheme?

Best regards,

Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt
Instituto Superior Tecnico - Lisbon    
Software & Computer Engineering - A.I.
 - > http://www.rnl.ist.utl.pt/~pocm 
	Yes, God had a deadline...
		So, He wrote it all in Lisp!