raganwald-deprecated / homoiconic

An experiment in publishing code and words about code on a small scale.
http://github.com/raganwald/homoiconic/tree/master/homoiconic.markdown
Other
1.82k stars 112 forks source link

Detranspilerization tweaks for JavaScript examples #23

Closed insin closed 11 years ago

insin commented 11 years ago

Tweaked JavaScript examples to look a little bit more like they'd be written by hand:

  1. Started out with function declarations in example 1, so example 2 implicitly demonstrates moving from declarations to expressions.
  2. Made pop() use a function scoped variable instead of the transpilation of the defensive use of do.
  3. Switched examples 3 and 4 to return the function-holding object directly, as a progression from example 2's declare and return.