Posted in Uncategorized

2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

A San Francisco cable car holds 60 people. This blog was viewed about 300 times in 2015. If it were a cable car, it would take about 5 trips to carry that many people.

Click here to see the complete report.

Advertisements
Posted in Uncategorized

Tasty JavaScript Curry

JavaScript Curry:

A useful technique to partially evaluate functions.

Coming Soon…


function myFunc(a, b) {
if (arguments.length < 1) {
return myFunc;
} else if (arguments.length < 2) {
return function(c) { return a + c }
} else {
return a + b;
}
}

console.log(myFunc(2,2));

var add4 = myFunc(4);
console.log(add4);

console.log(add4(5));

var add = myFunc();
console.log(add);

var addTwo = add(5,6);
console.log(addTwo);

var addOne = add(1);
console.log(addOne(2));