1.0.1 • Published 3 years ago

sanctuary-adt-matrix v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Sanctuary ADT Matrix

npm

Usage:

$ npx sanctuary-adt-matrix
Type ClassPairMaybeEitherFuture
Setoid
Ord
Semigroupoid
Category
Semigroup
Monoid
Group
Filterable
Functor
Bifunctor
Profunctor
Apply
Applicative
Chain
ChainRec
Monad
Alt
Plus
Alternative
Foldable
Traversable
Extend
Comonad
Contravariant

Using the matrix API

Test Sanctuary's Algebraic Data Types (ADT) for Type Class support.

The API is unstable and will probably change between minor versions.

const { adts, typeClassTests } = require ('sanctuary-adt-matrix');

// adts :: Array (Array (String Adt))
[
  ['Pair'  , Adt],
  ['Maybe' , Adt],
  ['Either', Adt],
  ['Future', Adt]
]

// typeClassTests :: Array (Array (String Adt) -> Array (String))
typeClassTests [0] (adts) // -> [ 'Setoid', '✅', '✅', '✅', '❌' ]