Last two C# tests are broken. Three spaces must be turned into a single space in the output, but the whitespaces in the input string and the expected result are not consistent.
Here's what you get for the two tests- I've used * to denote a space.
The rest of the tests pass, and some use whitespace so it isn't a corner case.
input string: ..*
Expected: "EE"
But was: "EE"
input string: ...---...-.-.---.....--.-..-..-.-.-.--....-.---.---...-.----..-.---..---.--....---...-..-.-......-...---..-.---..-----.*.-.-.-**
Expected: "SOS! THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
But was: "**SOS! THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG." (only the first two spaces were incorrect)
For the F# version, I was annoyed by the two aspects:
That the tests rely on a "addShape" function that is not mentioned in the challenge or defined by the test code.
That, by relying on the above method to construct a list by mutable tail concactenation, it is not possible to write performant, idiomatic F# (ie. build the list and then optionally call List.rev)
The order of the input list shouldn't matter at all to the test, and yet it clearly does in this case.
Exactly how i feel
ive been having the same issue, and trimed white space but the error shows:
input string: .-
.
..
. .
.
.
Expected: i
Expected: is "E*E"
but: was "EE"
and when i don't trim white space i get the error you were having.
clearly im having an issue with the double 'E'.
Are you sure about this? To me it looks like
do
gets an array of "lifted" functions, i.e.do(Maybe, (x => Maybe)*) => Maybe
.But I agree that it would be nice to have these details somewhere.
I suddenly feel like a monkey with a typewriter
[Javascript]
Implementing Maybe.do is much easier once you have the details!
m is a list of arguments- m[0] is the Maybe Monad and m[1...] are functions of signature value -> value.
Removing all spaces you get at the start end end of your final string should work.
I can't seem to be able to use Arrays, is there something I have to do diferently in codewars?
Last two C# tests are broken. Three spaces must be turned into a single space in the output, but the whitespaces in the input string and the expected result are not consistent.
Here's what you get for the two tests- I've used * to denote a space.
The rest of the tests pass, and some use whitespace so it isn't a corner case.
input string: ..*
Expected: "EE"
But was: "EE"
input string: ...---...-.-.---.....--.-..-..-.-.-.--....-.---.---...-.----..-.---..---.--....---...-..-.-......-...---..-.---..-----.*.-.-.-**
Expected: "SOS! THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
But was: "**SOS! THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG." (only the first two spaces were incorrect)
For the F# version, I was annoyed by the two aspects:
The order of the input list shouldn't matter at all to the test, and yet it clearly does in this case.