File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
exercises/practice/parallel-letter-frequency/.meta Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- public class ParallelLetterFrequency
1+ public static class ParallelLetterFrequency
22{
3- public async Task < Dictionary < char , int > > Calculate ( IEnumerable < string > texts )
3+ public static async Task < Dictionary < char , int > > Calculate ( IEnumerable < string > texts ) // Add static here
44 {
55 var textList = texts . ToList ( ) ;
66
@@ -17,15 +17,15 @@ public async Task<Dictionary<char, int>> Calculate(IEnumerable<string> texts)
1717 return MergeDictionaries ( results ) ;
1818 }
1919
20- private Dictionary < char , int > CountLettersInText ( string text )
20+ private static Dictionary < char , int > CountLettersInText ( string text ) // Add static here
2121 {
2222 return text . ToLower ( )
2323 . Where ( char . IsLetter )
2424 . GroupBy ( c => c )
2525 . ToDictionary ( g => g . Key , g => g . Count ( ) ) ;
2626 }
2727
28- private Dictionary < char , int > MergeDictionaries ( IEnumerable < Dictionary < char , int > > dictionaries )
28+ private static Dictionary < char , int > MergeDictionaries ( IEnumerable < Dictionary < char , int > > dictionaries ) // Add static here
2929 {
3030 var result = new Dictionary < char , int > ( ) ;
3131
You can’t perform that action at this time.
0 commit comments