diff --git a/libs/function/example/bind1st.cpp b/libs/function/example/bind1st.cpp
new file mode 100644
index 0000000..8dfc68a
--- /dev/null
+++ b/libs/function/example/bind1st.cpp
@@ -0,0 +1,32 @@
+// Boost.Function library examples
+
+//  Copyright Douglas Gregor 2001-2003. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+#include <iostream>
+#include <boost/function.hpp>
+#include <functional>
+
+struct X {
+  X(int val) : value(val) {}
+
+  int foo(int x) { return x * value; }
+
+  int value;
+};
+
+
+int
+main()
+{
+  ndnboost::function<int (int)> f;
+  X x(7);
+  f = std::bind1st(std::mem_fun(&X::foo), &x);
+
+  std::cout << f(5) << std::endl; // Call x.foo(5)
+  return 0;
+}
diff --git a/libs/function/example/int_div.cpp b/libs/function/example/int_div.cpp
new file mode 100644
index 0000000..8991f56
--- /dev/null
+++ b/libs/function/example/int_div.cpp
@@ -0,0 +1,26 @@
+// Boost.Function library examples
+
+//  Copyright Douglas Gregor 2001-2003. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+#include <iostream>
+#include <boost/function.hpp>
+
+struct int_div {
+  float operator()(int x, int y) const { return ((float)x)/y; };
+};
+
+int
+main()
+{
+  ndnboost::function<float (int, int)> f;
+  f = int_div();
+
+  std::cout << f(5, 3) << std::endl; // 1.66667
+
+  return 0;
+}
diff --git a/libs/function/example/sum_avg.cpp b/libs/function/example/sum_avg.cpp
new file mode 100644
index 0000000..488f380
--- /dev/null
+++ b/libs/function/example/sum_avg.cpp
@@ -0,0 +1,38 @@
+// Boost.Function library examples
+
+//  Copyright Douglas Gregor 2001-2003. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+#include <iostream>
+#include <boost/function.hpp>
+
+void do_sum_avg(int values[], int n, int& sum, float& avg)
+{
+  sum = 0;
+  for (int i = 0; i < n; i++)
+    sum += values[i];
+  avg = (float)sum / n;
+}
+
+int
+main()
+{
+  // The second parameter should be int[], but some compilers (e.g., GCC)
+  // complain about this
+  ndnboost::function<void (int*, int, int&, float&)> sum_avg;
+
+  sum_avg = &do_sum_avg;
+
+  int values[5] = { 1, 1, 2, 3, 5 };
+  int sum;
+  float avg;
+  sum_avg(values, 5, sum, avg);
+
+  std::cout << "sum = " << sum << std::endl;
+  std::cout << "avg = " << avg << std::endl;
+  return 0;
+}
