通常我發現我想編寫兩個函數f和g,但g需要多個參數。哈斯克爾是否提供了一組運營商所提供的(我知道我可以寫我自己,但似乎相當普遍的,我不想重複已經存在於哈斯克爾運營商)Haskell符號用於組成兩個函數f和g,其中g需要多個參數
即像
([email protected]) = (.)
([email protected]@) f g x1 x2 = f $ g x1 x2
([email protected]@@) f g x1 x2 x3 = f $ g x1 x2 x3
([email protected]@@@) f g x1 x2 x3 x4 = f $ g x1 x2 x3 x4
...
高達參數
您可能對[composition](http://hackage.haskell.org/package/composition-1.0.1.0/docs/Data-Composition.html)庫 – bheklilr
感興趣請問您能舉一個具體的例子嗎? – Shoe
@bheklilr謝謝,這就是我正在尋找的答案。它是(。:)(。::)等我試着用谷歌搜索「haskell撰寫函數多個參數」,但谷歌沒有給出任何有用的鏈接 – dspyz