def lst = ['foo', 'bar', ['inner_foo', 'inner_bar']]
lst.flatten() // ['foo', 'bar', 'inner_foo', 'inner_bar']