correct flat map example

use flat_map explicitly with block
use created ARRAY constant
use block which will give some work to `flatten`
Merge pull request #9 from ShPakvel/correct_flat_map

Correct flat map example
[ci skip] Update code example with 2.2 on OS X.