# Std library inclusion policy

**URL:** <https://internals.rust-lang.org/t/std-library-inclusion-policy/6852>\
**Category:** Uncategorized\
**Created:** [February 28, 2018, 10:53am UTC](https://internals.rust-lang.org/t/std-library-inclusion-policy/6852 "2018-02-28T10:53:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Centril](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/centril/32/3334_2.png) [@Centril](https://internals.rust-lang.org/u/Centril)\
**Post date:** [February 28, 2018, 8:51pm UTC](https://internals.rust-lang.org/t/std-library-inclusion-policy/6852/2 "2018-02-28T20:51:08Z")

</div>

> [@leonardo](#):
>
> Instead of flatten() there are more commonly useful iterators to add to the std library.

That is your view.. `.flatten()` was **explicitly requested** instead of `.flat_map(|x| x)` on an RFC about `identity` and many wanted it.. The operation is also a **fundamental** operation as it is monadic join... It seems to me strange that bind and functor mapping should be there but not join...

My general view is that the standard library should provide a strong algorithmic foundation to build things upon and iterators are key here - I think there's room to grow in `std::iter`.

To reduce the cognitive load, we should better support signature based searching - a type of a function can very often tell you a lot about its semantics.. at least, that is what I've found with hoogle & Haskell.

---

_[View the full topic](https://internals.rust-lang.org/t/std-library-inclusion-policy/6852)._
