Have to look into more details tomorrow.

Some remarks:

- isn't array—map overkill here ?
- the array should probably have a second true/false element.