[Jprogramming] How to convert list of phrases to list of boxed phrases?

'Rob Hodgkinson' via Programming programming at jsoftware.com
Wed May 20 07:22:32 UTC 2020


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 <skip at 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│
> 
> └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
> 



More information about the Programming mailing list