Created
May 15, 2014 15:55
-
-
Save nikuuchi/31ef8fe6cef39773d48c to your computer and use it in GitHub Desktop.
文字列の配列をカンマでつなげる
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| join :: [String] -> String | |
| join [] = "" | |
| join (x:[]) = x | |
| join (x:xs) = x ++ ", " ++ join xs | |
| main = do | |
| print $ join ["hoge", "fuga", "piyo"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment