[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Weird scope of variable defined inside cond
From: |
John Cowan |
Subject: |
Re: [Chicken-users] Weird scope of variable defined inside cond |
Date: |
Tue, 12 May 2015 08:12:20 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Vítor De Araújo scripsit:
> I'm seeing some weird behavior regarding scope of a variable defined
> with 'define' inside a cond clause. For instance:
That's not actually a supported place to put a definition, which
belongs at the beginning of a body such as a let, lambda, or
define. It's probably being treated as a set!, and since in
Chicken you can set a variable whether it's been defined or not,
you get effectively a global variable.
--
John Cowan http://www.ccil.org/~cowan address@hidden
The known is finite, the unknown infinite; intellectually we stand
on an islet in the midst of an illimitable ocean of inexplicability.
Our business in every generation is to reclaim a little more land,
to add something to the extent and the solidity of our possessions.
--Thomas Henry Huxley