Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,4 @@
(define (fact n)
(for/product ((f (in-range 2 (1+ n)))) f))
(fact 10)
→ 3628800

View file

@ -0,0 +1,6 @@
(define (fact n)
(if (zero? n) 1
(* n (fact (1- n)))))
(remember 'fact)
(fact 10)
→ 3628800

View file

@ -0,0 +1,5 @@
(define (fact n (acc 1))
(if (zero? n) acc
(fact (1- n) (* n acc))))
(fact 10)
→ 3628800

View file

@ -0,0 +1,2 @@
(factorial 10)
→ 3628800

View file

@ -0,0 +1,4 @@
(lib 'math)
math.lib v1.13 ® EchoLisp
(gamma 11)
→ 3628800.0000000005