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
11
Task/Arithmetic-Complex/LFE/arithmetic-complex-4.lfe
Normal file
11
Task/Arithmetic-Complex/LFE/arithmetic-complex-4.lfe
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(defun new (r i)
|
||||
(make-complex real r img i))
|
||||
|
||||
(defun modulus (cmplx)
|
||||
(mult cmplx (conj cmplx)))
|
||||
|
||||
(defun div (c1 c2)
|
||||
(let* ((denom (complex-real (modulus c2)))
|
||||
(c3 (mult c1 (conj c2))))
|
||||
(new (/ (complex-real c3) denom)
|
||||
(/ (complex-img c3) denom)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue