UNPKG

fp-ts

Version:

Functional programming in TypeScript

15 lines (14 loc) 280 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tailRec = void 0; /** * @since 2.0.0 */ function tailRec(a, f) { var v = f(a); while (v._tag === 'Left') { v = f(v.left); } return v.right; } exports.tailRec = tailRec;