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