12 lines
162 B
Scheme
12 lines
162 B
Scheme
(define factorial
|
|
(lambda (x)
|
|
(if (< x 1)
|
|
1
|
|
(* x (factorial (- x 1)))
|
|
)
|
|
)
|
|
)
|
|
|
|
(display "Hello World!\nFactorial of 5 is: ")
|
|
(display (factorial 5))
|