2013-12-21から1日間の記事一覧
http://www.haskell.org/haskellwiki/99_questions/11_to_20 Problem 15 日本語訳 与えられた数字の回数だけリストの各要素を複製しなさい。 > repli "abc" 3 "aaabbbccc" repli :: [a] -> Int -> [a] repli xs y = concatMap (\x -> replicate y x) xs repl…
http://www.haskell.org/haskellwiki/99_questions/11_to_20 Problem 15 日本語訳 与えられた数字の回数だけリストの各要素を複製しなさい。 > repli "abc" 3 "aaabbbccc" repli :: [a] -> Int -> [a] repli xs y = concatMap (\x -> replicate y x) xs repl…