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.
The input (included in fixed tests) includes double spaces between each set of symbols (I don't know how to display it correctly in markdown), and the correct output is "9 8 7 6 5 4 3 2 1 0" in this case.
I think there's an issue with tests in Julia:
decodemorse("----. ---.. --... -.... ..... ....- ...-- ..--- .---- -----") --> "9 8 7 6 5 4 3 2 1 0"
These characters don't have 4 spaces between them, so the output should be one word per the instructions. Am I missing something?
Thanks for the edits! I've done all but packing all testing code within the call to
test_that
. It seems cleaner to have test setup separate from the actual tests so that whattest_that
is testing is clear. Happy to try everything intest_that
if that's accepted practice here.test_that
(context
should be removed)Might as well add some multiple dispatch. Julia people, is this the right way to handle these inputs or are conditionals more "julian"?
This comment is hidden because it contains spoiler information about the solution
When there is a flaw you get for example:
Here a
0
and32
are returned instead of (a fake)1
and320
.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution