[plt-scheme] R5RS is totally useless for PLT, and I presume that R6RS is, also.
On Nov 19, /// wrote:
> PLT Scheme still supports mutable lists, but they're a separate data
> type, which means that I can't pass the lists that come out of the
> HTML-parsing library to any function that uses any PLT Scheme
> library call to work with lists. All the code I wrote to accept the
> output of this library is suddenly completely useless.
Converting mutable pairs to immutable ones is easy:
(define (mtree-map x f)
(let loop ([x x])
(if (mpair? x)
(f (loop (mcar x)) (loop (mcdr x)))
x)))
(define (tree-mutable->immutable t)
(mtree-map t cons))
> While trying to come up with a workaround (a KLUDGE), I was
> delighted to discover that PLT Scheme 4.1.2 doesn't support nested
> (define) forms, either.
Huh?
> (define (foo x)
(define (square x) (* x x))
(+ 1 (square x)))
> (foo 5)
26
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!