This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Error with call/cc
- From: Weiqi Gao <weiqigao at gmail dot com>
- To: kawa at sourceware dot org
- Date: Wed, 15 Aug 2012 13:03:41 -0500
- Subject: Error with call/cc
Hi,
I just spotted a problem with Kawa's call/cc. Here's what Kawa does:
$ kawa
#|kawa:1|# (+ 1 (call/cc (lambda (k) (+ 2 (k 3)))))
/dev/stdin:1:6: warning - unreachable code
5
Here's what two other Scheme implementations do:
$ racket
Welcome to Racket v5.3.
> (+ 1 (call/cc (lambda (k) (+ 2 (k 3)))))
4
$ guile
guile> (+ 1 (call/cc (lambda (k) (+ 2 (k 3)))))
4
The example is from
http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-15.html#node_sec_13.1
My environment is stock Fedora 17 Linux on x64 with Oracle JDK 1.7.0_06
and Kawa svn HEAD.
--
Weiqi Gao
weiqigao@gmail.com
http://www.weiqigao.com/blog/