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.
GetPossibleStrings() is an IEnumerable, but under the surface it returns a list.
It's somewhat a combination of two different worlds.
The main function Possibilities() has to call ToList() because of that.
Two routes that might have been a bit cleaner:
Let GetPossibleStrings() return List directly,
since that's already what is built in the method body and what is required
as the return value.
Make GetPossibleString() a real IEnumerable generator function, by
making use of "yield return ...". This prevents the creation of intermediate
lists when recursing. I followed this route in my own code, so if you want
an example of this, take a look there.
Kind regards,
Maurice