Skip to content

Curried bounded function works wrong. #232

Closed

Description

@Sitin

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions