Rob Pike describes a way of encoding options using functions. Let's see if we can do something similar in JavaScript.
NOTE: To execute this document as code, try erudite.
We'll need a "Foo" type to follow along with the blog post. We'll use a constructor: