Learn Physics with Functional Programming