No.32
here i'll start:
(defun gcd (a b)
(let (tmp)
(if (= b 0)
a
(gcd b (mod a b))))
____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.33
>>32damn i fucked up:
(defun gcd (a b)
"greatest common divisor of a and b"
(if (= b 0)
a
(gcd b (mod a b))))
;; non-recursive version:
;; (defun gcd (a b)
;; (let (tmp)
;; (while (/= b 0)
;; (setq tmp (mod a b)
;; a b
;; b tmp))
;; a))
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.37
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.38
>>33I'm not really interested. TempleOS is 80,000 lines of code. Perhaps LISP could go in the remaining 20,000. A lot of people like functional languages. Perhaps, they would be good for video game A.I. opponents. I don't really know enough. I don't see anything wonderful – just trick problems that happen to work.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.51
i said post your favorite algorithms, why should they be in holyC? i never said add lisp to templeos, i said post your favorite algorithms.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.52
i said post your favorite algorithms, why should they be in holyC? i never said add lisp to templeos, i said post your favorite algorithms.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.53
>>52I was the first person to factor to cubic root in magic pairs.
http://www.templeos.org/Wb/Demo/MagicPairs.html#l1 Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.