úÎ  ¼(c) Amy de Buitléir 2011-2012 BSD-styleamy@nualeargais.ie experimentalportableSafe ke generates the list of Binary Reflected Gray Code (BRGC) numbers of length k. This code is cyclic. n encodes nV using a BRGC, and returns the resulting bits as an integer. For example, encoding 17 in BRGC results in 11001 , or 25. So integralToGray 17 returns 25. n decodes nH using a BRGC, and returns the resulting integer. For example, 25 is 11001", which is the code for 17. So grayToIntegral 25 returns 17. xs k; generates a non-Boolean (or n-ary) Gray code of length k using the elements of xs% as "digits". This code is cyclic.Ex:  "012" 4; generates a ternary Gray code that is four digits long.Shift elements right.graye_E8bDdb9f5mX6bsbp7UKWZp Codec.Gray grayCodesintegralToGraygrayToIntegral naryGrayCodesshiftprefixAndShift