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.
Thank you, nice Kata, I enjoyed it.
Expected and actual are still flipped. See docs (
busted
is the Lua testing framework on Codewars) to be sure once and for all :)Haskell translation
( Haskell )
Random tests are predictable: expected value is always the one where
abs(x) <= 14
.intresting
Lua translation!
node version
same for me
LC added with random tests increasing in size.
LC translation
looks like the tests for js contains a bug:
ReferenceError: i is not defined
at n69l
at /home/codewarrior/index.js:49:20
at /runner/frameworks/javascript/cw-2.js:152:11
at Promise._execute
at Promise._resolveFromExecutor
at new Promise
at describe
at /home/codewarrior/index.js:43:1
at /home/codewarrior/index.js:30:4
at Object.handleError
(anonymous function) [as .js]
JS and Haskell updated.
Fixed.
In Lua,
expected
andactual
are swapped.assert.are.same(solution.count(a), k89(a))
should beassert.are.same(k89(a), solution.count(a))
.Loading more items...