Return to Snippet

Revision: 11387
at February 3, 2009 21:24 by aflatter


Initial Code
decToBin x = reverse $ decToBin' x
  where
    decToBin' 0 = []
    decToBin' y = let (a,b) = quotRem y 2 in [b] ++ decToBin' a

Initial URL

                                

Initial Description

                                

Initial Title
Convert decimal to binary in Haskell

Initial Tags
convert

Initial Language
Other