Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sweet-monads/interfaces

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sweet-monads/interfaces - npm Package Compare versions

Comparing version 0.0.4 to 1.0.0

applicative.ts

1

functor.d.ts
export interface Functor<T> {
map<R>(f: (a: T) => R): Functor<R>;
asyncMap<R>(f: (a: T) => Promise<R>): Promise<Functor<R>>;
}

@@ -1,5 +0,9 @@

import { Functor } from "./functor";
export interface Monad<T> extends Functor<T> {
chain<B>(f: (a: T) => Monad<B>): Monad<B>;
asyncChain<B>(f: (a: T) => Promise<Monad<B>>): Promise<Monad<B>>;
import { Applicative, ApplicativeConstructor } from "./applicative";
export interface Monad<T> extends Applicative<T> {
chain<B>(f: (a: T) => Monad<B>): Monad<B>;
}
export interface MonadConstructor extends ApplicativeConstructor {
from<I>(item: I): Monad<I>;
}
{
"name": "@sweet-monads/interfaces",
"version": "0.0.4",
"version": "1.0.0",
"description": "Monad interfaces",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc