Source: https://kilthub.cmu.edu/articles/journal_contribution/Programming_in_Ada_examples/6608666/files/12100088.pdf