Draft
Word completion
11FandaL
Loading description...
Strings
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Unpublishing as a task similar to existing kata.
Please consider adding a translation to Strings: starts with (check for prefix), Did you mean ...? (filtering of a list of words), or other, similar kata.
I just translated Strings: starts with. Check it out.
Trivial map/filter/reduce is not a novel kata idea.
It's almost a duplicate of Strings: starts with.
The description should state clearly what to do in case there's no match (and this case should always appear in a battery of tests).
Done
It looks like a duplicate of similar katas that ask to find a matching word from a dictionary.
Also, I doubt that returning different data types is appropriate: IDK whether it's acceptable in Lua, but this requirement would make it harder to translate to other languages.
It would be more coherent to return both the number of matches and the words matching in all cases.
I changed the return data type to a single one.