[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cond bug?? (maybe... )
PLATFORM: WindowsNT 4.0, SP5
Compilation: MSVC++ 6.0
MzScheme version 101.
------------------------------------------
I have two pieces of code.
If I type
((lambda ()
(define => #f)
(cond (#t => 'ok)))
I get:
==> ok
--------------------------------
If I type
(begin
(define => #f)
(cond (#t => 'ok)))
I get an invalid procedure error,
which is not what I expected.
Is this a bug?
-----------------------------------------------------
Perhaps MzScheme was designed so
that they behave as shown above.
But I don't see why. After all,
wouldn't users expect
consistency in behavior
whether they are evaluating things
at the top
level environment or not?
??
[You can also try
((lambda ()
(begin
(define => #f)
(cond (#t => 'ok))))
which runs fine.]