Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
7 days | interpreter: Add a flatten() method to arrays | Dylan Baker | 1 | -0/+5 | |
This allows users to do two things, flatten potentially nested arrays themselves, and, to safely convert types that may be an array to not an array. ```meson x = [meson.get_external_property('may_be_array)].flatten() ``` ```meson x = ['a', ['b', 'c']] assert(x.flatten() == ['a', 'b', 'c']) ``` |