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.
This comment is hidden because it contains spoiler information about the solution
Duplicate!
This comment is hidden because it contains spoiler information about the solution
Pretty sure the test cases are broken. Once you get to random testing, the tests expects you to return false on invalid input instead of throwing an error.
Also the description should probably be more detailed about dropping the center character on input with odd length.
whoa.
Thank you JavaScript for even letting me do that.
Codewars chat room! That is all.
While I really like the idea, this kata needs some work.
prototype
shenanigans is unnecessary since you don't need to preserve any state on subsequent calls ofreadCommands
. So either build a more complex apparatus out of this or get rid of it entirely and make it a function!q1
is basically useless which leaves you with 2 states, which is hardly worth building a FSM for. (How's writing the control for an elevator sound? Maybe I'll make a kata out of that)Exactly the same as this kata
Minor thing - found a typo:
var knightEngine = compose(moveKnightRandom, moveKnightRandom, moveKnightRandom); //It will perform tree random movements
Should probably be 'three'!
Apart from that, really cool kata! I'm all about shoe-horning functional paradigms into my favourite languages.
How is this a best practice?
This comment is hidden because it contains spoiler information about the solution
I know this example is somewhat overused, but I still want to point out how awesome it is that in Haskell you can write quicksort in a mere two lines of code.
Looks like someone coded too much LISP lately :P
Bump! It has been four months now.
Loading more items...