Welcome to the CHICKEN Scheme pasting service

symbol strangeness? added by megane on Thu Jun 7 11:50:06 2012

(use symbol-utils)

(define foo1 1)

 (define (bar1)
   (print "A " foo1)
   (print "B " (symbol-value (string->symbol "foo1"))))

(bar1)

(module
 modu
 *
 (import chicken scheme)
 (use symbol-utils)
 
 (define foo 1)

 (define (bar)
   (print "A " foo)
   (print "B " (symbol-value (string->symbol "foo")))))

(import modu)

(bar)

;; Output
A 1
B 1
A 1
B #f

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which procedure can be used to check whether its argument is a symbol?
Visually impaired? Let me spell it for you (wav file) download WAV