As I delve into my Javascript learning journey, I encountered a puzzling Sa() function
within this code snippet.
Initially, I deemed it to be an unsolvable problem like the Kobayashi Maru, but upon closer inspection, I suspect that this Sa() function
might actually return not only other functions but also itself. Am I on the right track?
If indeed this hypothesis holds true, what purpose would such functionality serve?
var Jj, Ss, Sa;
Ss = function(n) {
return n + 1;
};
Jj = function(f, n) {
return function(i) {
if (n < 1) {
return i;
} else {
return f(Jj(f, n - 1)(i));
}
};
};
Sa = function(a, b) {
return Jj(Jj(Ss, a), b)(0);
};