about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobin Stocker <robin@nibor.org>2015-02-09 22:44:19 +1100
committerRobin Stocker <robin@nibor.org>2015-02-15 23:12:43 +1100
commitdab626b5becdab4155e0328ab4ac140cef5cc715 (patch)
tree1fffffabe5f5fe2d6f9ba1c8431ab15f77e7d0e8
parentb6d91a2bdac45cd919497a24207fab843124d4ba (diff)
downloadrust-dab626b5becdab4155e0328ab4ac140cef5cc715.tar.gz
rust-dab626b5becdab4155e0328ab4ac140cef5cc715.zip
Include "flatmap" in docs of Option::and_then
Some newcomers might look for a "flatMap" method on Option. Include the
reference so that searching the page would find "and_then".
-rw-r--r--src/libcore/option.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index 2f261b0628f..6a217f34b6a 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -605,6 +605,8 @@ impl<T> Option<T> {
     /// Returns `None` if the option is `None`, otherwise calls `f` with the
     /// wrapped value and returns the result.
     ///
+    /// Some languages call this operation flatmap.
+    ///
     /// # Example
     ///
     /// ```