[plt-scheme] mreverse!
On Jan 24, praimon wrote:
> Thank you, Eli and David, for those pointers.
> But if one DID write a destructive reverse in MY strange sense of
> it, what would it look like? Like I said, my version is nutty
> looking, and I'd like to see a good, simple coding.
IIRC, your version was something along this line:
(define blist (box (list 1 2 3 4)))
(define (breverse! blist) (set-box! blist (reverse (unbox blist))))
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!