2009-05-19 公平に配る Haskell Haskell で。Maybe 大好き。 import List import Maybe deal n xs = map catMaybes $ transpose $ init $ takeWhile (not.null) $ map (take n) $ iterate (drop n) $ replicate n Nothing ++ map Just xs ++ [Nothing]