let luhny x = (\s -> x ++ show (10 - (s `div` 10))) $ sum $ map (\n -> read [n] :: Int) $ concatMap show $ zipWith (*) (cycle [1,2]) $ map (\n -> read [n] :: Int) x in getStdRandom (randomR (0,999999)) >>= \x -> return $ luhny $ "35876105" ++ ((printf "%06d" x) :: String)
Я случайно генератор айфонов.