Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It's clever in a humourous sense I'd say.
If I needed to do this in real life of course I would do this, but why would you need to create the function 'isPrime' if you were going to use a library function. Lol this is not clever.
Exactly..that is a good practice!
This comment is hidden because it contains spoiler information about the solution
It's sad that this is the most upvoted solution.
LOL, seems not quite in the spirit of the kata, but yes this works!
why is this so upvoted?
I LOVE Ruby
This kata asks for problem solution, not to create a raw method without any library.
Why is this clever? This is just a library... 0% clever.... But a good practice though. Don't reinvent the wheel.
Ergh..
Kinda thought should be from first premises...
I did the same, but I also know how to implement it with trial division. I've noticed a lot of the ruby challanges on here lend themselves to clever solutions with some digging around in the ruby docs, which is a skill in itself.
This comment is hidden because it contains spoiler information about the solution
In that case, creating a method isPrime is just a duplicate so it's not worthy...
Loading more items...