r5rs Questions
5
Solved
Im trying to write a simple scheme function that returns the last element of a list. My function looks like it should work, but I managed to fail on something:
(define (last_element l)(
(cond (nu...
6
Solved
For example: if I want the function equal? recognize my own type or record, can I add a new behavior of equal?? without erasing or overwriting the old one?
Or for example if I want to make the fun...
Panchito asked 27/5, 2014 at 0:34
2
Solved
I created this solution:
; use like this:
; (/* content ... */ <default-return>)
; or
; (/* content ... */) => #f
(define-syntax /*
(syntax-rules (*/)
((/* body ... */) #f)
((/* body ....
Poulson asked 17/9, 2010 at 1:51
1
Solved
I can use SHA256 in Scheme using external libraries (Java, C or system dependent) or using a specific Scheme implementation (like Chicken e.g.), but I wonder if there is a "pure" scheme implementat...
1
Inspired by a comment thread on a related question regarding functions instead of macros.
Is there any way to extend a Scheme syntax definition so that it can use the previous definition of the sy...
Eichmann asked 27/5, 2014 at 21:4
1
Solved
For example, I have this string: "6119726089.12814713"
If I do (string->number "6119726089.12814713") - using the SISC implementation the result is 6.119726089128147e9 - and in Guile implementa...
2
Solved
In addition to question What's the explanation for Exercise 1.6 in SICP?.
So Dr. Racket (R5RS) evaluates sqrt-iter function with "if" in finite time, clearly showing normal order evaluation. Bu...
3
Solved
I need a subroutine for my program written in scheme that takes an integer, say 34109, and puts it into a list with elements 3, 4, 1, 0, 9. The integer can be any length. Does anyone have a trick f...
1
Solved
I've got a bunch of "legacy" Guile Scheme code that I want to get running in the Racket Scheme IDE. There appear to be enough differences to make this a non-trivial exercise. (My level of Scheme kn...
1
Solved
This is concerning chapter 3.5 from SICP, in which streams are being discussed. The idea is that:
(cons-stream 1 (display 'hey))
Should not evaluate the second part of the cons-stream, so it sho...
1
I'm relatively new to scheme and am having a hard time finding a concrete document online overviewing the major changes that happened with R6RS. Anyone care to elaborate?
1
© 2022 - 2024 — McMap. All rights reserved.