liyaodong
9/8/2015 - 3:19 PM

gistfile1.js

```javascript
const cat = (head, ...items) => head.length ? head.concat.apply(head, items) : [];
const flat = arr => Array.isArray(arr) ? cat.apply(cat, arr.map(flat)) : [arr];
```