Overview

rescript-fp-core is an alternative to rescript-core.

rescript-core has guiding principals to make it align with JS apis as much as possible. This makes it easy to pick up and use if you already know JavaScript and you want to continue to write code in a similar way.

rescript-fp-core has a different focus of embracing functional programming and only using safe JS apis that do not mutate data or cause side-effects. This means there is more of a runtime cost using this library over core, but it does try to use zero-cost bindings as much as possible.

Inspiration

rescript-fp-core is heavily inspired by fp-ts. It also draws inspiration from monet.js, Crocks, and F#.

Core modules

This library is built on top of rescript-core and exposes most of its modules.

The following modules are directly from rescript-core. Please refer to those docs when using these modules.

  • BigInt

  • Console

  • Dict

  • Error

  • Float

  • Int

  • Intl

  • Iterator

  • JSON

  • List

  • Map

  • Math

  • Ordering

  • Promise

  • RegExp

  • Set

  • String

  • Symbol

  • Type

  • WeakMap

  • WeakSet