UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

13 lines (12 loc) 373 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.applyTo = void 0; const main_1 = require("./main"); function applyTo(value, fn) { if (arguments.length === 1) { return (_fn) => applyTo(value, _fn); } const mappable = fn || ((_) => null); return mappable((0, main_1.getValue)(value)); } exports.applyTo = applyTo;