test for flatten
implement flatten
document flatten
2.6.0