feat: remove twinPrime#1641
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1641 +/- ##
==========================================
- Coverage 83.94% 83.92% -0.02%
==========================================
Files 377 376 -1
Lines 19727 19698 -29
Branches 2917 2911 -6
==========================================
- Hits 16559 16532 -27
+ Misses 3168 3166 -2 ☔ View full report in Codecov by Sentry. |
appgurueu
left a comment
There was a problem hiding this comment.
This improves coverage of the existing implementation, but I think the existing implementation has a bug: According to Wikipedia
A twin prime is a prime number that is either 2 less or 2 more than another prime number
So the (a) twin prime of 7 should be 5.
What should then be the I have to admit that I did not get this function is supposed to do. It would be more natural to have a function like |
I think either 3 or 7 would be fine. We may also remove this function entirely, or replace it with an "is twin prime" variant as you suggest, IMO. It's just confusing (and trivial) as is. |
I will remove it. |
* tests: add missing test of `twinPrime` * feat: remove `twinPrime`
Describe your change:
This PR removes the function
twinPrimeas suggested in: #1641 (comment)This PR adds a test covering this line:JavaScript/Maths/TwinPrime.js
Line 23 in 4a4ed57
And reorganizes existing tests.Checklist:
Example:
UserProfile.jsis allowed butuserprofile.js,Userprofile.js,user-Profile.js,userProfile.jsare notFixes: #{$ISSUE_NO}.