[Jprogramming] Operations on boolean lists

David Vaughan purpleblues13 at googlemail.com
Fri Oct 14 06:59:29 HKT 2011


Thanks. I hadn't used E. before.

How could I generate a list of all rotations of booleans?

I've been trying to somehow use ^: in this sort of fashion:

   (1|."1)^:6 (3+i.5)$"0]1
0 1 1 1 0 0 0
0 1 1 1 1 0 0
0 1 1 1 1 1 0
0 1 1 1 1 1 1
1 1 1 1 1 1 1

Obviously this is not producing the intermediate states - what I'm looking for is, for example (taking just the first line 1 1 1 0 0 0 0)
1 1 1 0 0 0 0
1 1 0 0 0 0 1
1 0 0 0 0 1 1
0 0 0 0 1 1 1
0 0 0 1 1 1 0
0 0 1 1 1 0 0
0 1 1 1 0 0 0


More information about the Programming mailing list