Python ã§ã«ãªã¼åãã¦ã¿ã
Python ã§ã«ãªã¼åããããªãã便å©ãªããããããªã©ã¨æã£ãã®ã§ä½ã¨ãªãä½ã£ã¦ã¿ãã
ã½ã¼ã¹ã¯ github GitHub - shomah4a/pycurry: function currying for python
使ãæ¹ã¯ãããªæã
import pycurry @pycurry.curryfunc def test(aa, bb, cc): print aa, bb, cc f = test(10) # => ã«ãªã¼åããã test(10, 20, 30) # => å®è¡ããã f(40, 50) # => å¼æ°ã足ããã®ã§å®è¡ããã f(200, cc=400) # => ããã§ãå®è¡ããã g = f('aaa') # => ã¾ã 足ããªãã®ã§ããã«ã«ãªã¼å g([10]) # => å®è¡ããã
ãªãã使ãããããªãã