Search found 2 matches
- Sun Mar 01, 2009 12:52 pm
- Forum: Books and Resources
- Topic: Common Lisp Quick Reference
- Replies: 2
- Views: 35470
Re: Common Lisp Quick Reference
Wow, this is great. Thanks!
- Sun Mar 01, 2009 11:57 am
- Forum: Common Lisp
- Topic: Newb: help with factoring function
- Replies: 15
- Views: 27120
Re: Newb: help with factoring function
Hi! First post and lisp newbie ;) I had a go at writing a recurse version: (defun find-next-factor (n x) (if (zerop (rem n x)) x (find-next-factor n (+ x 1)))) (defun factors-rec (n) (labels ((rec (n acc) (let ((current-num (/ n (apply #'* acc)))) (if (= current-num 1) acc (rec n (cons (find-next-fa...