mirror of
https://github.com/open-goal/jak-project
synced 2026-06-01 17:58:14 -04:00
fab73cab75
* docs: move markdown documentation to be caught by docsify * docs: Initial spike of project status / doc portal * docs: Add searchbar to docsify page * docs: Remove the package-lock.json file, not critical for us * docs: Fix search plugin link * docs: Fix search results colors * docs: Remove the navbar, now redundant.
19 lines
409 B
Common Lisp
19 lines
409 B
Common Lisp
(defun factorial-iterative ((x integer))
|
|
(let ((result 1))
|
|
(while (!= x 1)
|
|
(set! result (* result x))
|
|
(set! x (- x 1))
|
|
)
|
|
result
|
|
)
|
|
)
|
|
|
|
;; until we load KERNEL.CGO automatically, we have to do this to
|
|
;; make format work correctly.
|
|
(define-extern _format function)
|
|
(define format _format)
|
|
|
|
(let ((x 10))
|
|
(format #t "The value of ~D factorial is ~D~%" x (factorial-iterative x))
|
|
)
|