New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curried bounded function works wrong. #232

Sitin opened this Issue Dec 16, 2012 · 0 comments


None yet
2 participants

Sitin commented Dec 16, 2012

It seems that curried bounded function looses it's context.
The following test written in LiveScript for Node.js fails.

 * Curried bounded function works wrong.
assert = require \assert

class A
  (@list = \middle) ->

  enclose: (head, tail) ~~>
    [head, @list, tail].join!

a = new A

fn = a.enclose \head
curried = fn \tail

plain = a.enclose \head, \tail

# "Plain" and curried results should be equal:
assert.equal curried, plain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment