This is a great example of a solution that is rather clever, but I don't think would be considered a best practice for readability sake alone. The tilde is going to drive a lot of traffic to MDN ;-)
for the last one the result in either the if or else case is the same right? I could def see the condition being depth <= 0 to silently move past unbalanced parentheses though.
I wrote a gcd function, and it of course collided with Prelude's, so I took it out. At no point did I stop and think that if Prelude defines a GCD function it stands to reason that it would provide an LCM function too.
This is a great example of a solution that is rather clever, but I don't think would be considered a best practice for readability sake alone. The tilde is going to drive a lot of traffic to MDN ;-)
TY for intercalate!! Hoogle is good, but not quite good enough to suggest it when I searched the signature
String -> [String] -> String
If you look at the haskell solutions now only one passes. Everything else no longer does. The reference solution is incorrect now.
for the last one the result in either the
if
orelse
case is the same right? I could def see the condition beingdepth <= 0
to silently move past unbalanced parentheses though.I have been acting like a wildman trying to find what I'm doing wrong!! Thank you!!
This comment is hidden because it contains spoiler information about the solution
what is thaat?
https://www.codewars.com/kata/5824daf7c4d7f388600002a3
https://www.codewars.com/kata/52859abdf8fc1b12e0000141
Duplicate to many
I wrote a gcd function, and it of course collided with Prelude's, so I took it out. At no point did I stop and think that if Prelude defines a GCD function it stands to reason that it would provide an LCM function too.
You're really close! What's the formula for distance between two points?
This comment is hidden because it contains spoiler information about the solution
correct.
YO I just saw this since I'm not on here enough but this is GREAT!! I'm honored! TYSM
python translation:
https://www.codewars.com/kumite/5e981040f3bd4a002fbe3217?sel=5e981040f3bd4a002fbe3217
Loading more items...