/language/traps should warn against using [Z] to get the transpose of a list-of-lists
#1400
Labels
docs
Documentation issue (primary issue type)
Every now and then, someone gets they idea that they can use
[Z]to create the transpose of a list-of-lists:And everything works fine... until you get an input
@matrixwith exactly one row (child list):I've explained the cause of this surprising edge-case behavior, which basically ruins
[Z]for variable-size inputs, in this SO answer (which should be easy to understand without also having to read the associated SO question).I think this has all the markings of a trap:
Thus, I think the Perl 6 documentation should mention it in its "Traps to avoid" document.
The text was updated successfully, but these errors were encountered: