From a8f09b04e7fdb988d5feb61275f1487d2b5d9cb1 Mon Sep 17 00:00:00 2001 From: Teri Chadbourne Date: Wed, 1 Feb 2023 20:07:18 -0500 Subject: [PATCH] Fix spelling typo --- 3/functional_filter.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/3/functional_filter.d b/3/functional_filter.d index 8de6d0a..3209321 100644 --- a/3/functional_filter.d +++ b/3/functional_filter.d @@ -8,18 +8,18 @@ void main(){ // Loop style // A little better with foreach loop auto words = ["hello", "world", "dlang", "c++", "java"]; - int coolLangauges = 0; + int coolLanguages = 0; foreach(element ; words){ if(element=="dlang"){ - coolLangauges++; + coolLanguages++; } } - writeln("Cool langauges found: ",coolLangauges); + writeln("Cool languages found: ",coolLanguages); // Functional-style auto words2 = ["hello", "world", "dlang", "c++", "java"]; auto result = words.filter!(a=> a.indexOf("dlang") >=0).count; - writeln("Cool langauges found: ",result); + writeln("Cool languages found: ",result); }