In JavaScript or any other programming languages that functions are first-class object, we can confirm as below:
const f = a => a * 2;
console.log(
f(1)
); //2
console.log(
(a => f(a))(1)
); //2
Although comparing the functions with actual inputs seems a typical way, reviewing an answer:
How to compare two functions for equivalence, as in (λx.2*x) == (λx.x+x)?
I want to try SMT solvers in JavaScript to solve this problem, but don't know exactly how.
Any idea? Thanks.
There is