olleicua / hcl

Hot Cocoa Lisp
GNU General Public License v3.0
34 stars 4 forks source link

add refs to builtin loops #17

Closed olleicua closed 10 years ago

olleicua commented 10 years ago

e.g

(for (a (b))
  (stuff))

should compile to

(function() {
  var _collection_ = b();
  for (_i0_ = 0; _i0_ < _collection_.length; _i0_++) {
    (function(a) { stuff(); }).call(this, _collection_[_i0_]);
  }
}).call(this)
olleicua commented 10 years ago

example assumes #16 is done first