Giter Club home page Giter Club logo

fp-ts-ramda's Introduction

(WIP!) fp-ts-ramda

Some Ramda functions reimplemented using fp-ts.

Since the question "how do I implement x from Ramda in fp-ts" comes up pretty often

Contribution guidelines

Each function should:

  • be API compatible with the original Ramda function (as far as possible, see below)
  • come with a property-based test to verify such compatibility (see other tests as an example)
  • be typesafe (or even improve on the status of @types/ramda, if possible)
  • come with a few typelevel tests (see other tests as an example)
  • be non deprecated in Ramda

More specific notes regarding implementation choices

[TODO] API compatibility with Ramda

For some Ramda functions, 100% API compatibility is easy to obtain. For others (typically the ones relying on instances of some typeclass), it's difficult or nearly impossible without compromising type-safety.

Currying

All Ramda functions are "auto curried". Since an objective is to remain mostly API-compatible, translations must be curried too.

Each function should have a series of TS overloads making all the possible combinations of parameters well-typed, and be implemented using manual currying: see for instance adjust.ts. Manual currying is preferred in order to avoid compromising perf, but might be revisited in the future.

Out of scope

A few things I haven't considered up to now and/or not sure how to handle:

  • the R.__ placeholder
  • "Acts as a transducer if a transformer is given..."
  • "Dispatches to the X method of argument, if present."

fp-ts-ramda's People

Contributors

erjanmx avatar gcanti avatar giogonzo avatar kightlingerh avatar kutyel avatar mfirry avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.