Skip to content

Instantly share code, notes, and snippets.

@mickey
Created December 6, 2009 23:32
Show Gist options
  • Save mickey/250494 to your computer and use it in GitHub Desktop.
Save mickey/250494 to your computer and use it in GitHub Desktop.
function record(channel) {
console.log("recording channel: " + channel);
}
var surf = fun(
[{genre: 'football', showTitle: _, repeat: _, station: _}, $, record],
[{genre: 'comedy', showTitle: _, repeat: false, station: _}, $, record],
[{genre: 'crime', showTitle: 'Cops', repeat: _, station: _}, $, record],
[{genre: _, showTitle: _, repeat: _, station: _}, $, function () {}]
);
Object.forEach(channels, function (channel, number) {
surf(channel, number);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment