File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -291,18 +291,18 @@ TEST_CASE("udemy_course_test - Function_composition")
291291}
292292
293293namespace Programming_challenge_an_SQL_analogy {
294- struct user {
294+ struct User {
295295 std::string name;
296296 std::string country;
297297 std::size_t visits;
298298};
299299
300- std::string get_country (const user & u)
300+ std::string get_country (const User & u)
301301{
302302 return u.country ;
303303}
304304
305- std::size_t get_visits (const user & u)
305+ std::size_t get_visits (const User & u)
306306{
307307 return u.visits ;
308308}
@@ -312,15 +312,15 @@ TEST_CASE("udemy_course_test - Programming_challenge_an_SQL_analogy")
312312{
313313 using namespace Programming_challenge_an_SQL_analogy ;
314314
315- const std::vector<user > users = {
315+ const std::vector<User > users = {
316316 { " Nicole" , " GER" , 2 },
317317 { " Justin" , " USA" , 1 },
318318 { " Rachel" , " USA" , 5 },
319319 { " Robert" , " USA" , 6 },
320320 { " Stefan" , " GER" , 4 }
321321 };
322322
323- const auto visit_sum = [](const std::vector<user >& xs) -> std::size_t {
323+ const auto visit_sum = [](const std::vector<User >& xs) -> std::size_t {
324324 return fplus::fwd::apply (xs, fplus::fwd::transform (get_visits), fplus::fwd::sum ());
325325 };
326326
@@ -489,4 +489,4 @@ TEST_CASE("udemy_course_test - OOP_Design_patterns_vanishing")
489489
490490 REQUIRE_EQ (a, 16 );
491491 REQUIRE_EQ (b, 25 );
492- }
492+ }
You can’t perform that action at this time.
0 commit comments