7 kyu
Easy mathematical callback
6,501 of 7,384nghier
Loading description...
Algorithms
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.
JavaScript
JavaScript Fork
genehmigt
python new test framework is required. updated in this fork
Approved
It is just throwing "should test for something" and I don't understand what tests and what I have to write here. I think there is some error or something.
It doesn't have sample tests, so you need to use the "Attempt" button.
why is it showing 'should test for something'? description says 'Optionally, also write tests similar to the examples below.' should I also write tests?
If your solution does not work, you should remove comments of tests for successful checking...
nice n ez
Predicate is a delegate which result is a boolean value. "public static int[] ProcessArray(int[] arr, ??? callback)" would be much easier option to solve this kata in c# - in my opinion of course ;p
I get this error: tests/Fixture.cs(21,85): error CS1503: Argument 2: cannot convert from 'System.Func<int, int>' to 'System.Predicate'
Is it the question thats faulty right?
If the question was faulty, it wouldn't be published. It's a mistake in your code, I'm afraid.
I'm sorry, B1ts, but you're wrong. The initial solution template for C# did indeed have
Predicate<int>
instead ofFunc<int, int>
It is entirely possible to publish a Kata with a faulty template. I have fixed it.This comment has been hidden.
The sample tests for this kata do not exist.
I've suggested a translate into Python and some changes in description.
Please, approve it!
Thanks!
A new Kata translation into Python was published!
This comment has been hidden.
No problem with that solution.
I would make it even more explicit. "Write a function, which takes as parameters an array and a callback function. The callback function is a mathematical function that will be applied on each element of this array." -> "Write the
processArray
function, which takes an array and a callback function as parameters. The callback function can be, for example, a mathematical function that will be applied on each element of this array. Optionally, also write tests similar to the examples below."Done.
This comment has been hidden.
array can has not numeric indexes and skipped indexes.
This comment has been hidden.
This comment has been hidden.
You could add some example test cases and random testing.
I had some hard time figuring out what I am supposed to do, I mean: what was exactly the task.
Maybe some info like: Write a function, which takes as parameters an array and a callback function.
Besides that - simple, but cool kata.
Thanks for your help, I will update the kata.
Awesome kata!!