Skip to main content
1 of 2

Haxe, 54 bytes

function l(v) return[for(i in 0...v)for(j in 0...i)i];

Works with l(6); because of array comprehension.
Test online http://try.haxe.org/#741f9