Earlier quoted context omitted.
I don't know lisp so maybe there where more nuances in your code, but often your want to analyse an integral in symbolic terms (for whatever integration definition you are using) The expression of the integral operator as a function in code is contrary to that with how people usually think about functions and code. The only language I know that properly manages to represent integrals as code is Wolfram Mathematica by…
Many (if not all?) CAS have some internal tree representation of mathematical structures, Mathematica is not the only one. I worked on such a system myself. To define data types for your expressions and then evaluate them via different algorithms is quite natural. So yes, we also used something like Integral(f, from: a, to: b) and then had like a gazillion techniques to actually evaluate that. Proof assistants do som…
I was mostly referring to this. Mathematica is simply my only experience with this kind of approach.