Image 01 Image 02

0
Posted on 13th May 2006 by Taggy

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++ ?



FireStats icon Powered by FireStats