Why does Haskell's `head` crash on an empty list (or why *doesn't* it return an empty list)? (Language philosophy)
问题 Note to other potential contributors: Please don't hesitate to use abstract or mathematical notations to make your point. If I find your answer unclear, I will ask for elucidation, but otherwise feel free to express yourself in a comfortable fashion. To be clear: I am not looking for a "safe" head , nor is the choice of head in particular exceptionally meaningful. The meat of the question follows the discussion of head and head' , which serve to provide context. I've been hacking away with