/ Published in: Other
Expand |
Embed | Plain Text
decToBin x = reverse $ decToBin' x where decToBin' 0 = [] decToBin' y = let (a,b) = quotRem y 2 in [b] ++ decToBin' a
Comments
Subscribe to comments
You need to login to post a comment.

usage: decToBin 10 => [1,0,1,0]