Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is why it's always seemed to me that head ought to be typed as

    head :: [a] -> Maybe a


Scala's collections have this function as headOption, which I use almost exclusively over head.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: