groupByFirstLetter function
Implementation
Map<String, List<String>> groupByFirstLetter(List<String> words) {
final filteredWords = words.where((w) => w.isNotEmpty).toList();
return groupByKey<String, String>(
filteredWords,
(word) => word[0].toUpperCase(),
);
}