fantasyland / sweet-fantasies

sweet.js macros for Fantasy Land compatible structures.
34 stars 7 forks source link

Fix/var bindings in tail #6

Closed markandrus closed 10 years ago

markandrus commented 10 years ago

Following up on @raimohanska's report of issue #5, this pull request adds some missing var-binding cases. Pretty mechanical work, and not very fun to write, so I hope I didn't miss anything (a fresh pair of eyes would be swell!).

However, this implementation requires each var-binding include the var prefix:

$do {
  a <- Identity.of(1)
  var b = a + 1
  var c = b * b
  return d
}
puffnfresh commented 10 years ago

Looks awesome, thanks!