Does Haskell have a splat operator like Python and Ruby?

前端 未结 3 1550
忘了有多久
忘了有多久 2021-01-01 19:23

In Python and Ruby (and others as well, I\'m sure). you can prefix an enumerable with * (\"splat\") to use it as an argument list. For instance, in Python:

3条回答
  •  星月不相逢
    2021-01-01 20:08

    The uncurry function turns a function on two arguments into a function on a tuple. Lists would not work in general because of their requirement for homogeneity.

提交回复
热议问题