
5 Jun
2009
5 Jun
'09
4:32 a.m.
myConcat' :: (Integral a) => Integer -> [a] -> [Integer] : myConcat' acc (x:xs) = case x `mod` 16 of : 10 -> fail $ show acc 11 -> fail $ show acc 14 -> fail $ show acc ^^^^^^^^^^^^^^^ Since you're in the list monad, this just returns []. Perhaps you mean error rather than fail? (And isn't it more useful to print x
Bartosz Wójcik
v -> myConcat' (100*acc + (numberOf . fromIntegral) x) xs where restOf n = (n - 12) `div` 16 numberOf n = n - 6 * (n `div` 16)
-k -- If I haven't seen further, it is by standing in the footprints of giants