diff --git a/annotations/yo/generic/examples/ptrfun.cc b/annotations/yo/generic/examples/ptrfun.cc index 6f2850e0..e68adf82 100644 --- a/annotations/yo/generic/examples/ptrfun.cc +++ b/annotations/yo/generic/examples/ptrfun.cc @@ -32,7 +32,7 @@ int main() [&](auto const &str) { return not stringcasecmp(str, target); - + } ); diff --git a/annotations/yo/stl/binders.yo b/annotations/yo/stl/binders.yo index 8d4d6821..b0984859 100644 --- a/annotations/yo/stl/binders.yo +++ b/annotations/yo/stl/binders.yo @@ -27,7 +27,7 @@ strings that are equal to a string (tt(target)) in a vector of strings (tt(vs)) (it is assumed that the required headers and tt(using namespace std) have been specified): verb( - count_if(vs.begin(), vs.end(), bind2nd(equal_to(), target); + count_if(vs.begin(), vs.end(), bind2nd(equal_to(), target)); ) In this example the function object tt(equal_to) is instantiated for strings, receiving tt(target) as its second argument, and each of the strings @@ -137,11 +137,11 @@ tt(bind). E.g., using tt(bind) like this: verb( using namespace placeholders; - count_if(vs.begin(), vs.end(), bind(equal_to(), _1, target); + count_if(vs.begin(), vs.end(), bind(equal_to(), _1, target)); ) Here, tt(bind) returns a functor expecting one argument (represented by -tt(_1) and tt(count_if) will pass the strings in tt(vs) will in sequence to -the functor returned by tt(bind). The second argument (tt(target) is embedded +tt(_1)) and tt(count_if) will pass the strings in tt(vs) will in sequence to +the functor returned by tt(bind). The second argument (tt(target)) is embedded inside the functor's implementation, where it is passed as second argument to the tt(equal_to()) function object. diff --git a/annotations/yo/stl/examples/bind.cc b/annotations/yo/stl/examples/bind.cc index 71ca480c..516d316c 100644 --- a/annotations/yo/stl/examples/bind.cc +++ b/annotations/yo/stl/examples/bind.cc @@ -11,9 +11,9 @@ int main() vector vi {1, 9, 2, 8, 3, 7, 4, 6, 5}; - cout << count_if(vi.begin(), vi.end(), + cout << count_if(vi.begin(), vi.end(), bind(greater(), _1, 6)) << '\n'; - cout << count_if(vi.begin(), vi.end(), + cout << count_if(vi.begin(), vi.end(), bind(greater(), 6, _1)) << '\n'; } diff --git a/annotations/yo/stl/examples/genlambda.cc b/annotations/yo/stl/examples/genlambda.cc index 651f0f3f..4f003eed 100644 --- a/annotations/yo/stl/examples/genlambda.cc +++ b/annotations/yo/stl/examples/genlambda.cc @@ -16,7 +16,7 @@ int main() vector values {1, 2, 3, 4, 5}; vector text {"a", "b", "c", "d", "e"}; - cout << + cout << accumulate(values.begin(), values.end(), 0, lambda) << '\n' << accumulate(text.begin(), text.end(), string(), lambda) << '\n'; }