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.
let's wait until some decision is made about these kata's
thanks, approved
You are free to make translations at will.
even better: the description should not mention the function's name, as it is irrelevant to the task, shown in the initial code, and naming conventions vary among languages. done.
There's this:
https://www.codewars.com/kata/6378d155233c3f004a3bcef0/haskell
Not sure if it's quite the same as minimising the bit count. Needs a Python translation in any case.
Hi brodiemark, I have inserted the missing loop. Thanks.
All I have to say is that I defer to the author and that I'll make any changes they want, or if they want to make them themself to skip the roundtrip time. The python output is the same as for haskell aside from using more
it
's.How would the kata know on which word your solution fails? It's a black box that expects either
True
orFalse
. Btw, if you pass sample tests, but not other tests, are there certain edge cases missing from sample tests?You're right, as far as I know it's not possible to use reflection on lambdas in Java, so you do not have to include them.
Retrospectively I think including those lambda tests was a mistake, as the way to check whether a function is a lambda relies on implementation details that are not guaranteed by the languages' specifications (they have the special name
'<lambda>'
in Python. In JavaScript it's even messier:).
Approved. Thanks for the translation.
updated to match. ready to go as far as I can tell.
Thanks for pointing that out. I just republished with a fix.
We just need to make sure that when we place a 2-letter word (vertical or horizontal), we don't go off the edge of the board.
haskell version bug: this check fails
the python version has a band-aid fix to it, but I'll match whatever change you make (I have a local copy of the hs code so I'll diff it to see what you change)
playAc
may write out of bounds and make the board largerI was going to pretend it was pseudo-code :whistles: .. it's not like it reads poorly and imo the main reason to turn descriptions "language-agnostic" is when things SMELL such as mentioning nullable references or if it starts naming different languages and the reader has to find the relevant part.
Anyway, I added conditions such that it defaults to haskell but python is different.. I feel that it somewhat invites trouble to use this feature when others edit it later, so that's another point for pretending it is already pseudocode. A potential problem for later I suppose, depending on who next touches it xD. For now that should look good though. I do prefer conditions over rewriting it to actually be fully agnostic because I don't think that's an improvement over what's already there, that would be silly. I still lean towards keeping it as-is and only made this edit because of the explicit request. Whatever makes sense to you.
hello, thanks for your interest in this kata ! While passing a
Predicate<Boolean[]>
in parameter (together with an argument count and a name string) similarly to the C version is indeed an option, I think I would prefer passing aMethod
as single argument to the function, like the other languages, and let the users figure out how many parameters it takes and how to call it. there is a reflection/inspection component to this kata, and retrospectively i'd say the C translation was a mistake.Loading more items...