crocks
Version:
A collection of well known Algebraic Datatypes for your utter enjoyment.
16 lines (11 loc) • 403 B
JavaScript
/** @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 execWith(x, m) {
if(!(m && isFunction(m.execWith))) {
throw new TypeError('execWith: State required for second argument')
}
return m.execWith(x)
}
module.exports = curry(execWith)