giogonzo / fp-ts-ramda

Ramda functions reimplemented in fp-ts
https://giogonzo.github.io/fp-ts-ramda/
MIT License
138 stars 9 forks source link

equals #28

Closed kightlingerh closed 4 years ago

kightlingerh commented 4 years ago

Here is an attempt at equals. The type signature seems unnecessarily complicated but it was a result of typescript interpreting certain values as type literals which caused issues with type inference in currying.

For instance, when I only had one type parameter A for everything.

FR.equals(eqNumber, 125) returned an expected type of Predicate<125> rather than Predicate<number>. Obviously you could fix this by calling FR.equals<number>(eqNumber, 125) but that seemed to be poor ergonomics for the developer.

I'm open to any suggestions you have on this.

kightlingerh commented 4 years ago

Sounds good. Not really sure what's going on with travis-ci here considering the check is failing in an area where no code changes were made.

giogonzo commented 4 years ago

@kightlingerh yes it's unrelated, "fixed" in https://github.com/giogonzo/fp-ts-ramda/commit/1c50043f40d1d74a86735f0b4b0c8faf58cd0833