Comparing version
@@ -6,4 +6,6 @@ import { HKT } from './HKT'; | ||
export interface ChainRec<M> extends Chain<M> { | ||
chainRec<A, B>(f: Function1<A, HKT<M, Either<A, B>>>, a: A): B; | ||
/** forall a b. (a -> m (Either a b)) -> a -> m b */ | ||
chainRec<A, B>(f: Function1<A, HKT<M, Either<A, B>>>, a: A): HKT<M, B>; | ||
} | ||
/** forall a b. (a -> Either a b) -> a -> b */ | ||
export declare function tailRec<A, B>(f: Function1<A, Either<A, B>>, a: A): B; |
import { isLeft } from './Either'; | ||
/** forall a b. (a -> Either a b) -> a -> b */ | ||
export function tailRec(f, a) { | ||
@@ -3,0 +4,0 @@ var v = f(a); |
@@ -6,4 +6,6 @@ import { HKT } from './HKT'; | ||
export interface ChainRec<M> extends Chain<M> { | ||
chainRec<A, B>(f: Function1<A, HKT<M, Either<A, B>>>, a: A): B; | ||
/** forall a b. (a -> m (Either a b)) -> a -> m b */ | ||
chainRec<A, B>(f: Function1<A, HKT<M, Either<A, B>>>, a: A): HKT<M, B>; | ||
} | ||
/** forall a b. (a -> Either a b) -> a -> b */ | ||
export declare function tailRec<A, B>(f: Function1<A, Either<A, B>>, a: A): B; |
"use strict"; | ||
var Either_1 = require("./Either"); | ||
/** forall a b. (a -> Either a b) -> a -> b */ | ||
function tailRec(f, a) { | ||
@@ -4,0 +5,0 @@ var v = f(a); |
{ | ||
"name": "fp-ts", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Functional programming in TypeScript", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
248067
0.31%235
0.43%4048
0.15%