DEV Community

Discussion on: Write a program or script to find Lucky Numbers

 
kspeakman profile image
Kasey Speakman

I added a lot of comments. Hopefully that will help with a C translation. I just noticed you are starting with odds whereas I am filtering them out at cost of extra CPU time. I'll update my version tonight to do that also.

I'm still quite in awe of the Haskell version. It is quite expressive while performing the same. I don't understand all the specific functions or operators, but I "get" it in a general sense. Whereas I had to remove any semblance of human thought to run mine faster.

Thread Thread
 
kspeakman profile image
Kasey Speakman

Turned out starting with odds didn't change the runtime at all really. But it led me to some shorter code that accomplished the same thing.