This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I just whipped up part of a flet implementation and see the same thing you do
when running interactively in the REPL or with -f, but I see correct behavior
when running a file without -f
$ java -cp kawa-1.12.jar kawa.repl
#|kawa:1|# (define (myfun) 'myfun1)
#|kawa:2|# (define x myfun)
#|kawa:3|# (apply x ())
myfun1
#|kawa:4|# (myfun)
myfun1
#|kawa:5|# (let ((myfun (lambda () 'inner))) (display (myfun)) (display (apply myfun ())))
inner inner
#|kawa:6|# (myfun)
inner
#|kawa:7|# (apply x ())
inner
$ java -cp kawa-1.12.jar kawa.repl
#|kawa:1|# (define (myfun) 'myfun1)
#|kawa:2|# (define x myfun)
#|kawa:3|# (apply x ())
myfun1
#|kawa:4|# (myfun)
myfun1
#|kawa:5|# (let ((x 100)) (display x))
100
#|kawa:6|# x
#<procedure myfun>
#|kawa:7|# (x)
myfun1
#|kawa:8|# (myfun)
myfun1
#|kawa:9|# (let ((x (lambda () 'inner))) (display (x)) (display (apply x ())))
inner inner
#|kawa:10|# (myfun)
inner
#|kawa:11|# (x)
inner
$ java -cp kawa-1.12.jar kawa.repl #|kawa:1|# (define (myfun) 'myfun1) #|kawa:2|# (define x ::object myfun) #|kawa:3|# x #<procedure myfun> #|kawa:4|# (apply x ()) myfun1 #|kawa:5|# (set! x 100) #|kawa:6|# x 100 #|kawa:7|# (set! x myfun) #|kawa:8|# (apply x ()) myfun1 #|kawa:9|# (let ((x 100)) (display x)) 100 #|kawa:10|# x #<procedure myfun> #|kawa:11|# (x) myfun1 #|kawa:12|# (let ((x (lambda () 'inner))) (display (x))) inner #|kawa:13|# x #<procedure myfun> #|kawa:14|# (x) myfun1
$ rlwrap java -cp kawa-1.12.jar kawa.repl #|kawa:1|# (define (myfun) 'myfun1) #|kawa:2|# (define x ::procedure myfun) #|kawa:3|# myfun #<procedure myfun> #|kawa:4|# x #<procedure myfun> #|kawa:5|# (set! x (lambda () 'other)) #|kawa:6|# x #<procedure /dev/stdin:5> #|kawa:7|# (myfun) myfun1 #|kawa:8|# (x) other #|kawa:9|# (set! x myfun) #|kawa:10|# x #<procedure myfun> #|kawa:11|# (x) myfun1 #|kawa:12|# (let ((x (lambda () 'inner))) (display x) (display (x))) #<procedure x> inner #|kawa:13|# myfun #<procedure x> #|kawa:14|# (myfun) inner
-- Jamison Hope The PTR Group www.theptrgroup.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |