crocks
Version:
A collection of well known Algebraic Datatypes for your utter enjoyment.
14 lines (10 loc) • 356 B
JavaScript
/** @license ISC License (c) copyright 2016 original and current authors */
/** @author Ian Hofmann-Hicks (evil) */
var hasAlg = require('./hasAlg')
var isApply = require('./isApply')
// isApplicative : a -> Boolean
function isApplicative(m) {
return isApply(m)
&& (hasAlg('of', m) || hasAlg('of', m.constructor))
}
module.exports = isApplicative