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.
for sure and thank you! It is slower and doesn't have elm-format which is half the delight for me tbh. But it can be nice to write code that's snack sized on here so I can't stay away.
I ended up making a safe version using phantom types and the next move would be to try to see if the phantom builder pattern can apply (I've never used it so maybe this is actually already it!)
https://www.codewars.com/kata/reviews/5e513d6d6971ed00018f144b/groups/6393ce91c7247d00017b1a1a
aww TY bud!! im gonna redo this with some wrapped up types because naked Ints for this doesn't make me happy
Sure thing, but pure luck :D
Yes, I think in most languages it is, if you can correctly match on the data. Usually comes up on top, especially with more cases.
'Cause when the kata was made it'd accept it, due to the actual'===' be '==' at the time.
Yeah, but why output is in a form of string and not in a boolean? As micfin asked above.
This comment is hidden because it contains spoiler information about the solution
Hey Marko, where are you from? :)
Well, the only suggestions I can give you is to keep thinking about it, stay focused while thinking about it and keep trying to grasp it as best as you can. Results will follow.
No name-magic here, IC just stands for Ignoring Case
; ))
Well, the postfix operator only applies to a variable, it makes no sense to use it on an expression.
x++
meansx = x + 1
.(x+0)++
will not work because it is interpreted asx+0 = (x+0) + 1
, which is an invalid assignment.When you write
(cache[n]||0)++
it translates tocache[n]||0 = (cache[n]||0) + 1
, which does not work.Thanks
This comment is hidden because it contains spoiler information about the solution
I don't know what language you are using, but regexs are most likely your best tool here.
I just wanted to do something fancy and solving similar problems in similar ways gets quickly boring ;)
Btw, I am not sure that would be called "indenting" and I think using +1 is slightly less efficient as you perform one extra operation, for what matter :p
I wouldn't have done mine if I knew there was a sort_by :P