summaryrefslogtreecommitdiff
path: root/Examples/guile/std_vector/example.h
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/guile/std_vector/example.h')
-rw-r--r--Examples/guile/std_vector/example.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Examples/guile/std_vector/example.h b/Examples/guile/std_vector/example.h
index 4f0dac70d..52e260d6d 100644
--- a/Examples/guile/std_vector/example.h
+++ b/Examples/guile/std_vector/example.h
@@ -17,9 +17,8 @@ std::vector<double> half(const std::vector<double>& v) {
}
void halve_in_place(std::vector<double>& v) {
- // would you believe this is the same as the above?
- std::transform(v.begin(),v.end(),v.begin(),
- std::bind2nd(std::divides<double>(),2.0));
+ for (std::vector<double>::iterator it = v.begin(); it != v.end(); ++it)
+ *it /= 2.0;
}