Skip to main content
3 of 9
Rollback to Revision 1

#Javascript ES6, 44 bytes

One of the rare cases where I use every

a=>(c=a[0])?a.every(b=>b.length==c.length):a

f=
a=>(c=a[0])?a.every(b=>b.length==c.length):a

z.innerHTML = [
  [],
  [[1], [1], [2]],
  [[1]],
  [[1, 2, 3, 4]],
  [[1, 2, 3, 4, 5], [2], [12, 314123]],
  [[1, 2, 3, 4], [1]]
].map(m=>f(m)).join`<br>`
<pre id=z>