Created
August 8, 2014 00:23
-
-
Save nobsun/5cdc8668e84a39519fb8 to your computer and use it in GitHub Desktop.
Excelカラム名の生成(改) ref: http://qiita.com/nobsun/items/fbb9bcda0bf5c65b4e8d
This file contains 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
import Control.Monad (liftM2) | |
excelColns :: [String] | |
excelColns = concat $ tail $ iterate (liftM2 (:) ['A'..'Z']) [""] |
This file contains 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
import Control.Monad (replicateM) | |
excelColns :: [String] | |
excelColns = [1..] >>= (`replicateM` ['A'..'Z']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment