Hi folks
Any comments and/or criticisms no matter how trivial on the following please:

        wordSize :: [Int] -> Int
        wordSize xs = head (dropWhile (<(length xs)) $ iterate (*2) 8)

        intToBinWord :: Int -> [Int]
        intToBinWord n = reverse (take elements (xs ++ repeat 0))
          where
          xs = reverse (intToBin n)
          elements = wordSize xs

Thanks, Paul

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to