Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

unbound use of Either.of fails due to this #7

Closed
ericgj opened this issue Oct 9, 2015 · 2 comments
Closed

unbound use of Either.of fails due to this #7

ericgj opened this issue Oct 9, 2015 · 2 comments

Comments

@ericgj
Copy link

ericgj commented Oct 9, 2015

Steps to reproduce:

var x = Either.of
x(1);  // TypeError: undefined is not a function

It seems it could be fixed by removing this (no?):

Either.of = function(a) {
  return Right(a)
}
@robotlolita
Copy link
Member

Sure, but that makes it harder to extend it. In particular, I don't see much of a problem with having to bind functions in JS.

@ericgj
Copy link
Author

ericgj commented Oct 18, 2015

Hadn't considered that. It tripped me up using ramda commute . But no big deal to bind it in such cases. Thanks for your excellent libraries btw.

@ericgj ericgj closed this as completed Oct 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants