Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. COThen why would I want to use internal defines at all? The restriction mentioned in R5RS (see my comment above) to allow defines only at the beginning of a <body> would be pointless if they were unavailable for the rest of the body. Even worse: When I type in the two blocks of expressions quoted in my post *in sequence* (i.e., with "y" and "dy" already defined in the global environment), I still get the same error message when evaluating (stream-ref (solve ...) 1000), even though Scheme is supposed to refer to the one in the global environment when the local one is unavailable.
      singulars
    2. COScheme is *not* supposed to refer to the global binding; `letrec` bindings (and internal defines, which are equivalent) are meant to be mutually recursive. *However*, quoting R5RS: "Just as for the equivalent letrec expression, it must be possible to evaluate each <expression> of every internal definition in a <body> without assigning or referring to the value of any <variable> being defined." There are all sorts of reasons why `letrec` expressions are useful and internal defines, being just an alternate syntax for `letrec`, are useful in the same situations.
      singulars
    3. COAnyway, as far as I can tell, this is what goes wrong with the code at hand. You could try to fix things with `delay` / `force`. The rationale behind R5RS' mandating such behaviour is a different matter, which I'm not sure I'm prepared to discuss extempore.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload