robrix/Hammer — pull request #33 by robrix (2014-03-30 23:23:59+00:00)
Title: Flatten concatenation

Flattening concatenation is important for #31, because array concatenation is associative, while cons is not. (It’s also valuable for other reasons, but that’s the immediate takeaway.)

- [ ] `S -> a b c` → `[a, b, c]`
- [ ] `S -> a*` → `[…]` or `[a, …]`
- [ ] `S -> a S | b` → `[a, [a, [b]]]`