Talk:Bitmap: Difference between revisions

(An explanation for the J implementation)
Line 104:
+---+
 
If the indices were not boxed, they would be integers and not lists of integers, and a single integer would only index along the leading dimension of the array -- if the indices were not boxed, they would refer to horizontal rasters, and not to individual pixels.
The problem statement does not require support for lists of coordinates, but it would be rather silly for a J implementation to not support such lists.
 
The operation < used monadically, returns a reference to its argument array (much like C's & but J does not allow pointer arithmetic)
 
<2 3
+---+
|2 4|
+---+
 
As an aside: the trailing notation "1 is not used in this example, but if we had provided a list of dimensions, <"1 would individually box each dimension. The problem statement does not require support for lists of coordinates, but it would be rather silly for a J implementation to not support such lists.
 
Finally, ] is the right identity.
6,951

edits