[Jprogramming] nonsequential 1s

Raul Miller rauldmiller at gmail.com
Fri Dec 21 03:49:31 HKT 2007


Does this match what you are looking for?
   b=:#:i.16
   cntg=:((1 0{. at I.@E."1]) (< -.@* *&*) 0 1{:@I. at E."1])&(0,.])
   (#~ cntg) b
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 1 0
0 1 1 1
1 0 0 0
1 1 0 0
1 1 1 0
1 1 1 1

Thanks,

-- 
Raul


More information about the Programming mailing list