Created
August 8, 2011 16:04
-
-
Save KOBA789/1132044 to your computer and use it in GitHub Desktop.
カリー化とか使うとこういうことなんじゃねーかと
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
style2prop = (function () { | |
re = new RegExp(""); | |
re.compile('-[a-z]', 'g'); | |
return function (str) { | |
return str.charAt(1).toUpperCase(); | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
カリー化というかなんというか、一つ目の関数を生成直後に呼んじゃってるからただのクロージャだけど。