Functional Foundations