drscheme

Why does "let" not evaluate, but just gives me #<promise>

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? ...

PLT-Scheme learning reference

After having got through the two Schemer books, I'm about to embark on HtDP but also discovered the http://docs.plt-scheme.org/guide material. The previously mentioned books are more particular to Scheme, it seems, and the latter being more geared towards PLT specific extensions (modules, require, bracket syntax, etc...). The online man...

PLT Scheme sort function

PLT Scheme guide says that it's implemented sort function is able to sort a list according to an extarcted value using a lambda function. link text The guide provides an unworking code example of this- (sort '(("aardvark") ("dingo") ("cow") ("bear")) #:key car string<?) Which returns an error. How is this function is supposed ...

Matrix addition in Scheme

I am trying to add a matrix and it is not working... (define (matrix-matrix-add a b) (map (lambda (row) (row-matrix-add row b)) a)) (define (row-matrix-add row matrix) (if (null? (car matrix)) '() (cons (add-m row (map car matrix)) (row-matrix-add row (map cdr matrix))))) (define (add-m row col) (...

Recursive breadth first tree traversal

I'm pulling my hair out trying to figure out how to implement breadth first tree traversal in scheme. I've done it in Java and C++. If I had code, I'd post it but I'm not sure how exactly to begin. Given the tree definition below, how to implement breadth first search using recursion? (define tree1 '( A ( B (C () ()) (D () ()) ) (E (...

How to test the throwing of errors in racket?

Hi Everyone, I'm currently working in some racket programs, specifically in the PLAI's language of the Programming Languages: Application and Interpretation Book, and there is a function called test, i was wondering how to test the error throwing in racket? Does anyone knows how to do this? Greetings (I'm not a native english speaker,...

Compiling with Bigloo

I've written a scheme file in DrRacket/Scheme and I have my .rkt file. I need to now compile what I've written with Bigloo. I have Bigloo installed, but I'm not sure how to use it. Anyone know how? ...