</p> - <p> <strong>Installation:</strong> </p>- <p> Download and install Python <a href="http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi">http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi</a> </p>- <p> GCC compatible versions of the Python libraries need to be generated.doc=pyqt-windows-install.xhtml">http://kscraft.sourceforge.net/convert_xhtml.php?
def multiply = { x, y -> return x * y } // closure def triple = multiply.curry(3) // triple = { y -> return 3 * y } def quadruple = multiply.curry(4) // quadruple = { y -> return 4 * y } def composition = { f, g, x -> return f(g(x)) } def twelveTimes = composition.curry(triple, quadruple) def threeDozen = twelveTimes(3) println "threeDozen: ${threeDozen}" // threeDozen: 36.
Shining Ray ? 函數(shù)式編程
http://www.ahfyzs.com/content/08/1118/10/13015_1949355.shtml
2008/11/18 10:31:46
函數(shù)式編程。函數(shù)Currying,是我所一直不能確定的英文翻譯之一 ,另外還有一個(gè)Web的翻譯。函數(shù)Currying的意思就是將參數(shù)和函數(shù)關(guān)聯(lián)起來,變成一個(gè)新的函數(shù)。一般的語言中,要么是將b設(shè)為一個(gè)默認(rèn)值,要么就是直接出錯(cuò),而當(dāng)有了Currying,那么f1其實(shí)返回一個(gè)函數(shù)g x = f 1 x。其實(shí)其命名是為了紀(jì)念一個(gè)邏輯學(xué)家 Haskell Curry 的――函數(shù)式語言Haskell也是為紀(jì)念這個(gè)人,當(dāng)然這個(gè)東西并不是他第一個(gè)發(fā)現(xiàn)。
NSIS只提供讀取環(huán)境變量的方法:ReadEnvStr設(shè)置環(huán)境變量,可以使用system插件調(diào)用windows api函數(shù)SetEnvironmentVariable.示例:System::Call "Kernel32::SetEnvironmentVariable(t ‘TEST_V‘, t ‘TEST_VV‘) i .r6 ?e"ReadEnvStr $9 ‘TEST_V‘MessageBox MB_OK "variable TEST_V has value $9"彈出提示"variable TEST_V has value TEST_VV"可以看到環(huán)境變量已經(jīng)生效且此變量可以在子進(jìn)程中使用。