UNPKG

crocks

Version:

A collection of well known Algebraic Datatypes for your utter enjoyment.

16 lines (11 loc) 433 B
/** @license ISC License (c) copyright 2016 original and current authors */ /** @author Ian Hofmann-Hicks (evil) */ var curry = require('../core/curry') var isFunction = require('../core/isFunction') function runWith(x, m) { if(!(m && isFunction(m.runWith))) { throw new TypeError('runWith: Arrow, Endo, Pred, Reader, Star or State required for second argument') } return m.runWith(x) } module.exports = curry(runWith)