bug-guile
[Top][All Lists]
Advanced

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

Re: begin oddities


From: Marijn Schouten (hkBst)
Subject: Re: begin oddities
Date: Thu, 25 Sep 2008 01:54:55 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080820)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Schottstaedt wrote:
> Is this a bug?
> 
> guile> (begin (define x 0) (+ x 1))
> 1
> 
> guile> (lambda () (begin (define x 0) (+ x 1)))
> #<procedure #f ()>
> 
> guile> (let ((f (lambda () (begin (define x 0) (+ x 1))))) (f))

Weird thing is it seems to have no problem with
(let ((f (lambda () (define x 0) (+ x 1)))) (f))

> Backtrace:
> In standard input:
>    3: 0* (let* ((f (lambda () #))) (f))
>    3: 1  [#<procedure #f ()>]
> 
> standard input:3:53: In procedure memoization in expression (f):
> standard input:3:53: In file "standard input", line 2: Mixed definitions and 
> expressio
> ns in (begin (define x 0) (+ x 1)).
> ABORT: (syntax-error)

- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkja008ACgkQp/VmCx0OL2y5QACgwoLPRQNragAepVhYga20Xx9M
XiQAoIKe9Fotg489D0If0q8HnNghLDmR
=V3t9
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]