---Sherlock, Ric wrote:
> 
> I'm sure there will be more elegant and tacit solutions, but in the
> meantime this explicit verb seems to do the job.
> 
> bm=: 3 : 0
>   'n d'=. y
>   t=. >.n % >:d-n
>   d$(>:t) {. t#1
> )
> 
>    bm 4 5
> 1 1 0 1 1
>    bm 7 10
> 1 1 0 1 1 0 1 1 0 1
> 

but only for rational numbers >: 1r2 !!!
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to