7 kyu
Use map() to double the values in an array
4,633 of 4,651FesterBesterTester
Loading description...
Arrays
Functional Programming
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
The kata is good, but I think it should be an 8 kyu not a 7.
ranks cannot be changed, it's no use complaining about them ;-)
CoffeeScript: usage of map is not enforced.
good but 8 kyu not 7
CoffeeScript Translation Kumited! Please accept :D
It's already approved, so closing the suggestion.
No way in javascript to get something like python's
partial(operator.mul, 2)
or(2).__pow__
?This comment has been hidden.
Your solution must not modify the original array.
In general, unless you're specifically told to modify an array that was passed as an argument, you shouldn't.
I don't wan't to sound pretentious, but maybe it was too easy for the 7kyu level.
This comment has been hidden.
Feel free to translate it to Ruby after a decade :)
Aww... I was hoping this wouldn't use floats :(
So you could do some bit-shifting action? ;P
Exactly
/fistbump/
.test('pmubtsif'.reverse())
Tester
use in example fixture breaks the tests.Ouch. Thanks for the heads up. I thought it was ok to use since the kata editor didn't complain. Fixed now.
Yeah... the "example" test fixture isn't checked, unfortunately.
Now, the stub solution has a bug in it. The last
}
is stuck at the end of a commented line.Fixed the bracket. Thanks.
Can't see the change yet, my end. Will check tomorrow and mark it as fixed if it makes it through. ;P
@wthit56: I can see the change. If you still can't see it, you'll probably have to click the "Reset" button at the bottom to reload the template code. :-)
Ah-- forgot about that button. Thanks, OZ. Marked as "ready".
The object
Tester
does not exist for the example tests.That could probably be replaced with
Test.assertSimilar(output, expected)
, which will deeply compare values in an array.I switched to Test.assertSimilar() as you suggested. Thanks.
Great, works now! I'd fix that minor typo that @wthit56 pointed out, but it looks good to me.