Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
10
Task/Prime-decomposition/LFE/prime-decomposition.lfe
Normal file
10
Task/Prime-decomposition/LFE/prime-decomposition.lfe
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(defun factors (n)
|
||||
(factors n 2 '()))
|
||||
|
||||
(defun factors
|
||||
((1 _ acc)
|
||||
acc)
|
||||
((n k acc) (when (== 0 (rem n k)))
|
||||
(factors (div n k) k (cons k acc)))
|
||||
((n k acc)
|
||||
(factors n (+ k 1) acc)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue