Add new flatten() function that removes nested iterables and returns a flat one