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".
This commit is contained in:
Robin Stocker 2015-02-09 22:44:19 +11:00
parent b6d91a2bda
commit dab626b5be

View File

@ -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
///
/// ```