问题:
Looking through the Haskell Prelude, I see a function const
:查看 Haskell Prelude,我看到了一个函数const
:
const x _ = x
I can't seem to find anything relevant regarding this function.我似乎找不到与此功能相关的任何内容。
What's the point?重点是什么? Can anyone give an example of where this function might be used?任何人都可以举一个可以在哪里使用此功能的示例吗?