Something simple as this:
Welcome to DrScheme, version 4.2.3 [3m].
Language: Lazy Scheme; memory limit: 128 megabytes.
> (let ((x 2) (y 10))
(+ x y))
#<promise>
>
I press enter for the let expression, and it gives me the #<promise>. What am I doing wrong?
It says
Language: Lazy Scheme;. I’m sure this means that you’re using a variant of scheme that runs lazily – i.e. it doesn’t evaluate an expression until the result is required. The way scheme will manage this internally will be by using scheme’spromisemechanism – instead of returning the result of an expression, apromiseto calculate the result later is returned. You should be able to get the result explicitly by callingforceagainst this promise.Here are a couple of references:
forceanddelay.A non-lazy scheme will behave in the way you expect.
HTH