For every 100% compliant R7RS-small program that does not rely on any implementation-specific or undefined behavior, is it true that every instance of letrec in the program can be replaced with letrec* without causing any change in behavior? In other words, is there any R7RS-small program where an appearance of letrec cannot be substituted with letrec*?
Can every letrec be replaced with letrec*?
123 Views Asked by Flux At
1
There are 1 best solutions below
Related Questions in SCHEME
- How to get IronScheme function return in C# (Visual Studio)
- How is it possible to filter a list of directories via "directory-exists?"?
- create a new list in the same format as taken from text file
- remove file name if it is already in the list
- Is there a way to see the body of a lambda in Racket?
- Transpose a matrix in racket (list of lists
- Racket\Scheme compare and delete unwanted items in a list
- Extracting the number of members inside a structure
- How to get the file name and line number where an error occurred in MIT/GNU Scheme?
- Using .ico files as icons when creating executables in DrRacket IDE
- Accessing call stack depth in Scheme
- Product of squares of odd elements in list in Scheme
- Is it possible to bootstrap MIT scheme from portable C to native?
- Using MIT/GNU Scheme
- What are 'if ,define, lambda' in scheme?
Related Questions in LANGUAGE-LAWYER
- Why is implicit pointer of pointer to pointer conversion legal?
- Is it legal to compare dangling pointers?
- How does an unspecified pointer conversion behave in C++14?
- Function returning another function
- MSVC 12 std::initializer_list bug when copying std::string
- Is it valid to pass non-arithmetic types as arguments to cmath functions?
- `new Object` vs `Object` in the ECMAScript spec
- Variadic template parameters of one specific type
- Quadruple "const" in function definition
- Name lookup for local class members inside templates
- The destructor for the class member `B`, why is it invoked in the snippet below?
- decltype, recursive type deduction for overloaded operator
- Conversion from std::tuple<T, U> to std::pair<T, U>
- Why are typedef templates illegal?
- Is the grammars in Java7 spec really equivalent?
Related Questions in LETREC
- What's the difference between R6RS's `letrec`, `letrec*` and Racket's `letrec`?
- Scheme: Why does evaluating this recursive function defined in letrec fail?
- Scheme: are `letrec` and `letcc` crucial for efficiency?
- letrec in Scala? (Immutable way to "Tie the knot?")
- Understanding recurive let expression in lambda calculus with Haskell, OCaml and nix language
- Expression for defining letrec implementing little language in Haskell
- Why does let not allow mutually recursive definitions, whereas letrec can?
- Why does this code using shadowing `let` bindings hang?
- Letrec and reentrant continuations
- Scheme letrec infinite environment
- convert let into lambda in scheme
- confusion of letrec, Scheme
- What are the merits of letrec as a programming language feature
- Why is the variable undefined in the initialization form of this letrec?
- Is letrec only meant for defining procedures?
Related Questions in R7RS
- Scheme: Passing defines inside macro definition to submacro?
- Reflective capabilities of R7RS Scheme
- Hygienic macro r7rs : Return second expression value
- How to (eval ...) in a chicken r7rs library?
- Simulate a first-class library in R7RS Scheme
- What does it mean for Scheme library to be *loaded*? When are Scheme libraries *loaded*?
- Is it possible to "extend" a function / lambda / macro in Scheme?
- Why can't I write a byte to the current-output-port in the REPL?
- Which identifier am I supposed to use to close my library in R7RS/Scheme?
- As of 2016, is there a Scheme implementation which supports 100% of R7RS (small) with no deviations?
- How to define two R7RS libraries in Guile
- How to consume only the first returned value in Scheme?
- R7RS-small: equivalence of quasiquoted expressions
- Is the cdr of a list always eqv?
- When is it possible to override top-level bindings in (R7RS) scheme?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I think that the answer is yes, it can, assuming that the form is not 'an error' in R7RS terminology (but see note at end). In particular I think that if there's a form like
Then it must be possible to evaluate
<e2>without referring to the value ofv1, but that binding does actually exist when<e2>is evaluated: it is just an error to refer to it. So in particular this is not allowed:because the binding that the init for
brefers to is that established by theletrec, not that established by thelet, but it is not yet legal to refer to the value of that binding.That being the case then if you simply replace
letrecbyletrec*then<e2>still will not refer to the value ofv1and thus the results will be the same.The converse is not true:
is fine, but you can't replace the
letrec*byletrecthere.That being the case I'm unclear what useful purpose
letrecserves (perhaps this is why Racket'sletrechas the semantics of Scheme'sletrec*).Note an earlier version of this answer came to the opposite conclusion. I am now not convinced I understand things well enough.