Type safety back and forth | Hugonweb Annotated Link Bibliography

https://www.parsonsmatt.org/2017/10/11/type_safety_back_and_forth.html

If pushing responsibility forward means accepting whatever parameters and having the caller of the code handle possibility of failure, then pushing it back is going to mean we accept stricter parameters that we can’t fail with.

An example of the former is:

uncons :: [a] -> Maybe (a, [a])

and of the latter is:

head :: NonEmpty a -> a

Working with the latter pushes error handling to the data input code and cleans up all the rest.