Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!cs.utexas.edu!sdd.hp.com!network.ucsd.edu!usc!wupost!csus.edu!sfsuvax1.sfsu.edu!emclean
From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Re: j combinations
Message-ID: <1993Feb22.072617.6691@csus.edu>
Sender: news@csus.edu
Organization: San Francisco State University
References: <1993Feb19.085518.1@wharton.upenn.edu> <1593@kepler1.rentec.com>
Date: Mon, 22 Feb 1993 07:26:17 GMT
Lines: 28

   NB. I get it.

   9!:3 (5)
   rotate =. |.
   appendCol =. ,"1
   appendItems =. ,
   right =. ]
   basis =. ,. 0 1
   grayCode =. (0: appendCol right) appendItems (1: appendCol rotate@right)
   grayCode ^:(3) basis
0 0 0 0
0 0 0 1
0 0 1 1
0 0 1 0
0 1 1 0
0 1 1 1
0 1 0 1
0 1 0 0
1 1 0 0
1 1 0 1
1 1 1 1
1 1 1 0
1 0 1 0
1 0 1 1
1 0 0 1
1 0 0 0

   
