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

Racket

Name: Anonymous 2012-09-25 13:28

there must be a better way to do this right


(define (factorial n)
    (define (iter n result)
        (if (= n 0)
            result
            (iter (- n 1) (* result n))))
    (iter n 1))

Name: Anonymous 2012-09-25 17:56

>>12
what do you mean he's right? The shit that code gets compiled into uses the stack. is the generated machine code and the x86  asm shit one in the same logically?

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