> The difference is how they group:
>
> @unzipped_list = unzip(3, (1,2,3,4,5,6)); # ([1,3,5],[2,4,6])
> @partitioned_list = partition(3,(1,2,3,4,5,6)); # ([1,2,3],[4,5,6])
Let me make an observation, having done tons of matrix stuff: We're
going to wind up with 200 functions, all of which essentially are doing
special types of matrix operations.
How about a matrix-like set of functions that interleaves and
un-interleaves stuff however you like?
matrix x2, @a, @b, @c; # interleave every 2
unmatrix 3x2 @array; # 3x2 list groupings
This would be able to handle any matrix construction with a "ROWSxCOLS"
notation. If either ROWS or COLS was left out than a * (any number)
would be used. Otherwise, the ROWSxCOLS would have to be fulfilled,
with:
1. Less data than specified returning an error
2. More data than specified being discarded
Not sure I like the names, or the syntax, but I'm sure we need a
general-purpose mechanism here to do this.
-Nate