But what does that second result mean? ! generalizes to arrays of numbers, and this is called odometer. What this does is generate all indices to index into an array that has the dimensions described in x. Each column denotes one element.
!x Odometer
Symbol:!
Args:! numeric_array
Description: Generate an array where each column denotes an index into an array which has dimensions x,
in row-major order.
Odometer always generates an array of the length it is given, or in K's notation, #x.
In chapter 3:
! x Range / Odometer
Symbol:!
Arguments:! number / numeric array
Description: range from 0 to x-1. Odometer is generalized range: generate indices for indexing into an array of shape x.
In chapter 2:
In chapter 3: