News for hackers. Stuff that matters.
Re:Why I'm still using Python by ulucs on Friday December 30, 2022 @05:02PM (#34190616)
The thing you're looking for is easily found with a Hoogle search for type

    (a -> Maybe b) -> [a] -> [b]
Which yields mapMaybe: https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-.... so you end up with

    heads = mapMaybe safeHead
Re:Why I'm still using Python by ogogmad on Saturday December 31, 2022 @06:21AM (#34195436)
That doesn't look like a direct substitute that covers every case.