The derivative of a functionfcan be computed more efficiently usingimprove,as follows:within eps(improve(differentiateh0f x))
This example reads like a proof in a theory paper. It's a great illustration of the challenge of using FP: procedural thinking is difficult for humans, but abstract thinking is even harder. Imperative programming is constant procedural thinking, while functional programming is constant abstract thinking. This makes FP even better human-mind training than programming in general, but simultaneously means humans' inherent weakness at abstract thinking counteracts the power of programming functionally.