User talk:Siddharthist

From Rosetta Code

You created the imperative Racket version using a "bit-vector", but your code may as well be the same code as the "vector" version with "bit-vector" substituted for "vector"; in fact, you regressed to use the very ugly imperative means of generating the primes results list from the first imperative version.

Also, your code as written wouldn't run as it lacked the "require" for the bit-vector and missed adding one to the "limit" to get the required size of the vector; which is already correct in the "vector" version.

I left your (corrected) code in place, and added a version with a recursive means to accomplish building the resulting primes list that does't require reversing, but note that this is exactly what the "list comprehension" from the "vector" version is doing under-the-covers. This may help newbies such as yourself to understand that there are much better ways to do list processing than imperative ways using mutation "set!".

I understand that you are a newbie to Racket and perhaps to programming, but perhaps you should try to read and understand the other code versions in a category before you add your own somewhat redundant version?