Yes agree, I used to use odo, but in showing others I find { permutes the 
subjects directly (eg if we did the same for a char string “ate”)

  {3$<‘eat'

This appears more intuitive to just sample, and produce from the subject data 
directly.

Cheers, Rob


> On 20 May 2020, at 4:53 pm, Skip Cave <s...@caveconsulting.com> wrote:
> 
> Rob,
> 
> Another way to solve the same house number problem is the odometer verb:
> 
> odo =:#:i.@(*/)
> 
> 3 9${3+odo 3#3
> 
> ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
> 
> │3 3 3│3 3 4│3 3 5│3 4 3│3 4 4│3 4 5│3 5 3│3 5 4│3 5 5│
> 
> ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
> 
> │4 3 3│4 3 4│4 3 5│4 4 3│4 4 4│4 4 5│4 5 3│4 5 4│4 5 5│
> 
> ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
> 
> │5 3 3│5 3 4│5 3 5│5 4 3│5 4 4│5 4 5│5 5 3│5 5 4│5 5 5│
> 
> └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
> 

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to