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.
Either I'm seriously misunderstanding the kata, or there is something incredibly wrong with the random tests in Haskell.
0
and-2
are at the same point on a circle with circumference1
, are they not?please see this js fork
js fork (helped by katafix)
mocha/chai
assertionslodash
for randomness (and some helper func)Description should be language-agnostic
Done by someone
cool
Ohh... Thanks for your time, and reply.
Have a nice day!
An issue is a bug with the kata. This is not a bug with the kata, it's a bug with your code. You don't return an iterable with any inputs. In the case of the first sample test, the code won't even reach your
return
line. For javascript, you should be returning an Array.I've get this message for the tests in Javascript:
TypeError: twoSum is not a function or its return value is not iterable
at doTest (test.js:17:26)
at Context. (test.js:32:5)
at process.processImmediate (node:internal/timers:471:21)
This comment is hidden because it contains spoiler information about the solution
Approved
JavaScript fork (author inactive)
this kata is more than 10 years old. Classes were introduced in ES2015. (by the way, classes are no longer merely syntactic sugar for prototypal objects; private class features for instance can hardly be emulated with pre-ES2015 JavaScript)
why not use a class? I get that a class is just syntactical sugar and it's doing this under the hood but why do it like this?
After ten years, I guess nobody is taking your suggestion. Closing.
Loading more items...