問題:
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?任何人都可以舉一個可以在哪裏使用此功能的示例嗎?