crocks
Version:
A collection of well known Algebraic Datatypes for your utter enjoyment.
15 lines (10 loc) • 309 B
JavaScript
/** @license ISC License (c) copyright 2016 original and current authors */
/** @author Ian Hofmann-Hicks (evil) */
var isFunction = require('../core/isFunction')
function fst(m) {
if(!(m && isFunction(m.fst))) {
throw new TypeError('fst: Pair required')
}
return m.fst()
}
module.exports = fst