Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

scheme retards

Name: Anonymous 2012-06-14 15:55

Name: Anonymous 2012-06-14 15:58

If it ain't CL, it's crap.

Name: Anonymous 2012-06-14 16:27

On a serious note, how do you do this? I heard racket doesn't have set-car! and set-cadr! so the SICP way won't work...

Name: Anonymous 2012-06-14 16:55

>>3
Use a box, if it's implemented.  http://community.schemewiki.org/?scheme-faq-language

Otherwise you can easily define it:

(define (box . initv)
  (let [(cell (if (null? initv) '() (car initv)))]
    (lambda args
      (if (null? args)
      cell
      (set! cell (car args))))))

(define (unbox b)
  (b))

(define (set-box! b new-value)
  (b new-value))


lisp is shit, parenthesized

Don't change these.
Name: Email:
Entire Thread Thread List