Image 01 Image 02

how does this happen ?

Posted on 13th May 2006 by Taggy
0

A factorial code in lisp

[83]> (defun fact(n)
(let ((sum 1))
(dotimes(x n)
(setf sum (* sum (+ 1 x))))
sum))

>(fact 1000) prints out the no. how does this happen and y it doesnt happen in C/C++ ?


Send post as PDF to www.pdf24.org


Leave a reply...






FireStats icon Powered by FireStats