2 ms·
Well, an equality function could be defined that compares closure values and instructions, as mentioned in the article. As I understand it, the reason it isn't
by skybrian 8y ago
Well, an equality function could be defined that compares closure values and instructions, as mentioned in the article.
As I understand it, the reason it isn't typically done is conceptual: two functions are mathematically equal if the same inputs produce the same outputs. (The same way you'd define equality for a hashmap by comparing keys and values.) But this is impossible to calculate for arbitrary functions.