spica
Advanced tools
Comparing version 0.0.794 to 0.0.795
@@ -10,10 +10,19 @@ import { MonadPlus } from './monadplus'; | ||
} | ||
// Bug: TypeScript | ||
// @ts-ignore-error | ||
public fmap<b>(f: (a: a) => b): Maybe<b> { | ||
return this.bind(a => new Just(f(a))); | ||
} | ||
// Bug: TypeScript | ||
// @ts-ignore-error | ||
public ap<a, z>(this: Maybe<(a: a) => z>, a: Maybe<a>): Maybe<z>; | ||
// @ts-ignore-error | ||
public ap<a, b, z>(this: Maybe<(a: a, b: b) => z>, a: Maybe<a>): Maybe<(b: b) => z>; | ||
// @ts-ignore-error | ||
public ap<a, b, c, z>(this: Maybe<(a: a, b: b, c: c) => z>, a: Maybe<a>): Maybe<(b: b, c: c) => z>; | ||
// @ts-ignore-error | ||
public ap<a, b, c, d, z>(this: Maybe<(a: a, b: b, c: c, d: d) => z>, a: Maybe<a>): Maybe<(b: b, c: c, d: d) => z>; | ||
// @ts-ignore-error | ||
public ap<a, b, c, d, e, z>(this: Maybe<(a: a, b: b, c: c, d: d, e: e) => z>, a: Maybe<a>): Maybe<(b: b, c: c, d: d, e: e) => z>; | ||
// @ts-ignore-error | ||
public ap<a, z>(this: Maybe<(...as: any[]) => z>, a: Maybe<a>): Maybe<z> { | ||
@@ -20,0 +29,0 @@ return Maybe.ap(this, a); |
{ | ||
"name": "spica", | ||
"version": "0.0.794", | ||
"version": "0.0.795", | ||
"description": "Supervisor, Coroutine, Channel, select, AtomicPromise, Cancellation, Cache, List, Queue, Stack, and some utils.", | ||
@@ -5,0 +5,0 @@ "private": false, |
847084
27652