prime numbers right

4 views
Skip to first unread message

caike

unread,
Sep 10, 2011, 5:47:31 PM9/10/11
to orland...@googlegroups.com
Hey, guys

For those of you who were there this morning while I was struggling with the prime number function, here's the solution that I got:


(FYI, the add and sub functions have nothing to do with it)

I am aware that this might be a very naive solution which is neither optimal nor purely functional, so please feel free to make suggestions (forks ?) on how I can make this better :)

David Rogers suggested I use http://en.wikipedia.org/wiki/Prime_number#Sieves, which is a more efficient solution, so this might be my next step into improving it.

Anyways, thank you all for coming today!
I'm glad we got out of our comfort zone and started learning a completely new approach to problem solving.

Here's our code from today:


See you all in two weeks for some more mind-blowing programming in Common LISP 
--
Regards,
- Carlos

Reply all
Reply to author
Forward
0 new messages