Source: https://mfleck.cs.illinois.edu/building-blocks/version-1.0/functions-one-to-one.pdf