crocks
Version:
A collection of well known Algebraic Datatypes for your utter enjoyment.
1 lines • 126 kB
JavaScript
(function r(n,t){if(typeof exports==="object"&&typeof module==="object")module.exports=t();else if(typeof define==="function"&&define.amd)define([],t);else if(typeof exports==="object")exports["crocks"]=t();else n["crocks"]=t()})(window,function(){return function(t){var e={};function o(r){if(e[r]){return e[r].exports}var n=e[r]={i:r,l:false,exports:{}};t[r].call(n.exports,n,n.exports,o);n.l=true;return n.exports}o.m=t;o.c=e;o.d=function(r,n,t){if(!o.o(r,n)){Object.defineProperty(r,n,{enumerable:true,get:t})}};o.r=function(r){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(r,"__esModule",{value:true})};o.t=function(n,r){if(r&1)n=o(n);if(r&8)return n;if(r&4&&typeof n==="object"&&n&&n.__esModule)return n;var t=Object.create(null);o.r(t);Object.defineProperty(t,"default",{enumerable:true,value:n});if(r&2&&typeof n!="string")for(var e in n)o.d(t,e,function(r){return n[r]}.bind(null,e));return t};o.n=function(n){var r=n&&n.__esModule?function r(){return n["default"]}:function r(){return n};o.d(r,"a",r);return r};o.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)};o.p="";return o(o.s=0)}([function(r,n,t){var e=t(1);var o=t(14);var u=t(27);var i={Arrow:t(111),Async:t(114),Const:t(120),Either:t(121),Equiv:t(124),Identity:t(125),IO:t(126),List:t(127),Maybe:t(130),Pair:t(131),Pred:t(133),Reader:t(135),ReaderT:t(136),Result:t(137),Star:t(138),State:t(139),Tuple:t(141),Unit:t(142),Writer:t(143)};var a=Object.assign({},t(144),{branch:t(190),fanout:t(191),find:t(192),getPath:t(193),getProp:t(194),prop:t(195),propPath:t(196),safe:t(197),safeAfter:t(198),safeLift:t(199),toPairs:t(200),tryCatch:t(201)});var f={All:t(202),Any:t(203),Assign:t(204),Endo:t(205),First:t(206),Last:t(207),Max:t(208),Min:t(209),Prod:t(210),Sum:t(211)};var c=Object.assign({},t(212),{evalWith:t(251),execWith:t(252),fst:t(253),log:t(254),nmap:t(255),project:t(256),race:t(257),read:t(258),snd:t(259)});var p={arrayToList:t(260),asyncToPromise:t(261),eitherToAsync:t(262),eitherToFirst:t(263),eitherToLast:t(264),eitherToMaybe:t(265),eitherToResult:t(266),firstToAsync:t(267),firstToEither:t(268),firstToLast:t(269),firstToMaybe:t(270),firstToResult:t(271),lastToAsync:t(272),lastToEither:t(273),lastToFirst:t(274),lastToMaybe:t(275),lastToResult:t(276),listToArray:t(277),maybeToArray:t(278),maybeToAsync:t(279),maybeToEither:t(280),maybeToFirst:t(281),maybeToLast:t(282),maybeToList:t(283),maybeToResult:t(284),resultToAsync:t(285),resultToEither:t(286),resultToFirst:t(287),resultToLast:t(288),resultToMaybe:t(289),tupleToArray:t(290),writerToPair:t(291)};r.exports=Object.assign({},e,i,a,o,f,c,u,p)},function(r,n,t){r.exports={applyTo:t(2),compose2:t(5),composeB:t(6),constant:t(8),converge:t(9),flip:t(10),identity:t(11),psi:t(12),substitution:t(13)}},function(r,n,t){var e=t(3);var o=t(4);function u(r,n){if(!o(n)){throw new TypeError("applyTo: Function required for second argument")}return n(r)}r.exports=e(u)},function(r,n,t){var u=t(4);var e="@@crocks/curried";function i(r,n){if(!u(r)){return r}return r.length>1?r.bind(null,n):r.call(null,n)}function a(o){if(o[e]){return o}function r(){var r=[],n=arguments.length;while(n--)r[n]=arguments[n];var t=r.length?r:[undefined];if(t.length<o.length){return a(Function.bind.apply(o,[null].concat(t)))}var e=t.length===o.length?o.apply(null,t):t.reduce(i,o);if(u(e)){return a(e)}return e}Object.defineProperty(r,e,{enumerable:false,writable:false,value:true});return r}r.exports=a},function(r,n){function t(r){return typeof r==="function"}r.exports=t},function(r,n,t){var u=t(3);var i=t(4);function e(r,n,t,e,o){if(!i(r)||!i(n)||!i(t)){throw new TypeError("compose2: First, second and third arguments must be functions")}return u(r)(n(e),t(o))}r.exports=u(e)},function(r,n,t){var e=t(7);var o=t(3);var u=t(4);function i(r,n){if(!(u(r)&&u(n))){throw new TypeError("composeB: Functions required for first two arguments")}return e(r,n)}r.exports=o(i)},function(r,n){function t(n,t){return function(r){return n(t(r))}}r.exports=t},function(r,n,t){var e=t(3);var o=function(r){return function(){return r}};r.exports=e(o)},function(r,n,t){var o=t(3);var u=t(4);function e(r,n,t,e){if(!u(r)||!u(n)||!u(t)){throw new TypeError("converge: Functions required for first three arguments")}return o(r)(n(e),t(e))}r.exports=o(e)},function(r,n,t){var e=t(3);var o=t(4);function u(r,n,t){if(!o(r)){throw new TypeError("flip: Function required for first argument")}return e(r)(t,n)}r.exports=e(u)},function(r,n){var t=function(r){return r};r.exports=t},function(r,n,t){var o=t(3);var u=t(4);function e(r,n,t,e){if(!u(r)||!u(n)){throw new TypeError("psi: First and second arguments must be functions")}return o(r)(n(t),n(e))}r.exports=o(e)},function(r,n,t){var e=t(3);var o=t(4);function u(r,n,t){if(!(o(r)&&o(n))){throw new TypeError("substitution: Functions required for first two arguments")}return e(r)(t,n(t))}r.exports=e(u)},function(r,n,t){r.exports={and:t(15),ifElse:t(21),implies:t(22),not:t(23),or:t(24),unless:t(25),when:t(26)}},function(r,n,t){var e=t(3);var o=t(16);var u=t(20);function i(n,t){if(!(o(n)&&o(t))){throw new TypeError("and: Preds or predicate functions required for first two arguments")}return function(r){return!!(u(n,r)&&u(t,r))}}r.exports=e(i)},function(r,n,t){var e=t(17).proxy("Pred");var o=t(4);var u=t(18);var i=function(r){return o(r)||u(e,r)};r.exports=i},function(r,n){var t={unk:function(){return"unknown"},All:function(){return"All"},Any:function(){return"Any"},Arrow:function(){return"Arrow"},Assign:function(){return"Assign"},Async:function(){return"Async"},Const:function(r){return"Const("+r+")"},Either:function(){return"Either"},Endo:function(){return"Endo"},Equiv:function(){return"Equiv"},First:function(){return"First"},Identity:function(){return"Identity"},IO:function(){return"IO"},Last:function(){return"Last"},List:function(){return"List"},Max:function(){return"Max"},Maybe:function(){return"Maybe"},Min:function(){return"Min"},Pair:function(){return"Pair"},Pred:function(){return"Pred"},Prod:function(){return"Prod"},Reader:function(){return"Reader"},Result:function(){return"Result"},Star:function(){return"Star"},State:function(){return"State"},Sum:function(){return"Sum"},Tuple:function(r){return r+"-Tuple"},Unit:function(){return"Unit"},Writer:function(){return"Writer"}};var o=function(r){return t[r]||t["unk"]};var e=function(r,n){return{type:function(){return o(r)(n)}}};var u=function(r,n,t){var e=o(r)(t);return"crocks/"+e+"@"+(n||0)};r.exports={proxy:e,type:o,typeFn:u}},function(r,n,t){var e=t(3);var o=t(4);var u=t(19);function i(r,n){var t=u(r);var e=u(n);return t===e||o(r)&&r.name===e||o(n)&&n.name===t}r.exports=e(i)},function(r,n,t){var e=t(4);function o(r){if(r){if(e(r.type)){return r.type()}}return{}.toString.call(r).slice(8,-1)}r.exports=o},function(r,n,t){var e=t(4);function o(r,n){if(e(r)){return r(n)}return r.runWith(n)}r.exports=o},function(r,n,t){var e=t(3);var o=t(4);var u=t(16);var i=t(20);function a(n,t,e){if(!u(n)){throw new TypeError("ifElse: Pred or predicate function required for first argument")}if(!(o(t)&&o(e))){throw new TypeError("ifElse: Functions required for second and third arguments")}return function(r){return i(n,r)?t(r):e(r)}}r.exports=e(a)},function(r,n,t){var e=t(3);var o=t(16);var u=t(20);function i(n,t){if(!(o(n)&&o(t))){throw new TypeError("implies: Preds or predicate functions required for first two arguments")}return function(r){return!u(n,r)||!!u(t,r)}}r.exports=e(i)},function(r,n,t){var e=t(3);var o=t(16);var u=t(20);function i(r,n){if(!o(r)){throw new TypeError("not: Pred or predicate function required for first argument")}return!u(r,n)}r.exports=e(i)},function(r,n,t){var e=t(3);var o=t(16);var u=t(20);function i(n,t){if(!(o(n)&&o(t))){throw new TypeError("or: Preds or predicate functions required for first two arguments")}return function(r){return!!(u(n,r)||u(t,r))}}r.exports=e(i)},function(r,n,t){var e=t(3);var o=t(16);var u=t(4);var i=t(20);function a(n,t){if(!o(n)){throw new TypeError("unless: Pred or predicate function required for first argument")}if(!u(t)){throw new TypeError("unless: Function required for second argument")}return function(r){return!i(n,r)?t(r):r}}r.exports=e(a)},function(r,n,t){var e=t(3);var o=t(20);var u=t(16);var i=t(4);function a(n,t){if(!u(n)){throw new TypeError("when: Pred or predicate function required for first argument")}if(!i(t)){throw new TypeError("when: Function required for second argument")}return function(r){return o(n,r)?t(r):r}}r.exports=e(a)},function(r,n,t){r.exports={hasProp:t(28),hasProps:t(42),hasPropPath:t(44),isAlt:t(46),isAlternative:t(49),isApplicative:t(53),isApply:t(54),isArray:t(55),isBifunctor:t(56),isBichain:t(58),isBoolean:t(60),isCategory:t(61),isChain:t(63),isContravariant:t(65),isDate:t(67),isDefined:t(69),isEmpty:t(70),isExtend:t(71),isFalse:t(73),isFalsy:t(74),isFoldable:t(75),isFunction:t(76),isFunctor:t(77),isInteger:t(78),isIterable:t(79),isMap:t(81),isMonad:t(83),isMonoid:t(85),isNil:t(86),isNumber:t(87),isObject:t(88),isPlus:t(89),isProfunctor:t(90),isPromise:t(92),isSame:t(94),isSameType:t(95),isSemigroup:t(96),isSemigroupoid:t(97),isSetoid:t(98),isString:t(99),isSymbol:t(100),isTraversable:t(102),isTrue:t(103),isTruthy:t(104),pathEq:t(105),pathSatisfies:t(106),propEq:t(107),propPathEq:t(108),propSatisfies:t(109),propPathSatisfies:t(110)}},function(r,n,t){var e=t(3);var o=t(29);var u=t(30);var i=t(39);var a=t(41);var f=t(36);function c(r,n){if(!(f(r)&&!u(r)||i(r))){throw new TypeError("hasProp: Non-empty String or Integer required for first argument")}if(a(n)){return false}return o(n[r])}r.exports=e(c)},function(r,n){function t(r){return r!==undefined}r.exports=t},function(r,n,t){var e=t(31);var o=t(32);var u=t(37);var i=t(34);function a(r){if(o(r)){var n=r.constructor[i["empty"]]||r.constructor["empty"]||r["empty"];return u(r,n())}if(e(r)){return!Object.keys(r).length}if(r&&r.length!==undefined){return!r.length}return true}r.exports=a},function(r,n){var t=Object.prototype.toString;function e(r){return!!r&&t.call(r)==="[object Object]"}r.exports=e},function(r,n,t){var e=t(33);var o=t(35);function u(r){return o(r)&&(e("empty",r)||e("empty",r.constructor))}r.exports=u},function(r,n,t){var e=t(4);var o=t(34);var u=function(r,n){return e(n[o[r]])||e(n[r])};var i=function(r,n){return e(n["@@implements"])&&!!n["@@implements"](r)};var a=function(r,n){return!!n&&(u(r,n)||i(r,n))};r.exports=a},function(r,n){r.exports={alt:"fantasy-land/alt",bimap:"fantasy-land/bimap",chain:"fantasy-land/chain",compose:"fantasy-land/compose",concat:"fantasy-land/concat",contramap:"fantasy-land/contramap",empty:"fantasy-land/empty",equals:"fantasy-land/equals",extend:"fantasy-land/extend",filter:"fantasy-land/filter",id:"fantasy-land/id",map:"fantasy-land/map",of:"fantasy-land/of",promap:"fantasy-land/promap",reduce:"fantasy-land/reduce",zero:"fantasy-land/zero"}},function(r,n,t){var e=t(36);var o=t(33);function u(r){return e(r)||!!r&&o("concat",r)}r.exports=u},function(r,n){function t(r){return typeof r==="string"}r.exports=t},function(r,n,t){var e=t(18);var o=t(38);var u=t(33);var i=t(19);var a=t(34);var f=function(r,n){return r.valueOf()===n.valueOf()};var c={Array:function(r,n){return r.length===n.length&&p(r,n)},Date:function(r,n){return o(r.valueOf(),n.valueOf())},Error:function(r,n){return r.name===n.name&&r.message===n.message},Object:function(r,n){return Object.keys(r).length===Object.keys(n).length&&p(r,n)},RegExp:function(r,n){return r.source===n.source&&r.ignoreCase===n.ignoreCase&&r.global===n.global&&r.multiline===n.multiline&&r.unicode===n.unicode}};function p(r,n){for(var t in r){if(!s(r[t],n[t])){return false}}return true}function s(r,n){if(o(r,n)){return true}if(!e(r,n)){return false}if(u("equals",r)){return(n[a.equals]||n.equals).call(n,r)}return(c[i(r)]||f)(r,n)}r.exports=s},function(r,n){function t(r,n){if(r===n){return r!==0||1/r===1/n}return r!==r&&n!==n}r.exports=t},function(r,n,t){var e=t(40);function o(r){return e(r)&&isFinite(r)&&Math.floor(r)===r}r.exports=o},function(r,n){function t(r){return typeof r==="number"&&!isNaN(r)}r.exports=t},function(r,n){function t(r){return r==null||r!==r}r.exports=t},function(r,n,t){var e=t(3);var o=t(29);var u=t(30);var i=t(43);var a=t(39);var f=t(41);var c=t(36);var p="hasProps: First argument must be a Foldable of Non-empty Strings or Integers";var s=function(r){return c(r)&&!u(r)||a(r)};var v=function(n){return function(r){if(!s(r)){throw new TypeError(p)}return o(n[r])}};var y=function(t){return function(r,n){return(r===null?true:r)&&t(n)}};function h(r,n){if(!i(r)){throw new TypeError(p)}if(f(n)){return false}var t=r.reduce(y(v(n)),null);return t===null||t}r.exports=e(h)},function(r,n,t){var e=t(33);function o(r){return!!r&&e("reduce",r)}r.exports=o},function(r,n,t){var e=t(3);var u=t(45);var i=t(29);var a=t(30);var f=t(39);var c=t(41);var p=t(36);function o(r,n){if(!u(r)){throw new TypeError("hasPropPath: Array of Non-empty Strings or Integers required for first argument")}if(c(n)){return false}var t=n;for(var e=0;e<r.length;e++){var o=r[e];if(!(p(o)&&!a(o)||f(o))){throw new TypeError("hasPropPath: Array of Non-empty Strings or Integers required for first argument")}if(c(t)){return false}t=t[o];if(!i(t)){return false}}return true}r.exports=e(o)},function(r,n){function t(r){return Array.isArray(r)}r.exports=t},function(r,n,t){r.exports=t(47)},function(r,n,t){var e=t(33);var o=t(48);function u(r){return o(r)&&e("alt",r)}r.exports=u},function(r,n,t){var e=t(33);function o(r){return!!r&&e("map",r)}r.exports=o},function(r,n,t){var e=t(50);var o=t(52);function u(r){return o(r)&&e(r)}r.exports=u},function(r,n,t){var e=t(33);var o=t(51);function u(r){return o(r)&&(e("of",r)||e("of",r.constructor))}r.exports=u},function(r,n,t){var e=t(33);var o=t(48);function u(r){return o(r)&&e("ap",r)}r.exports=u},function(r,n,t){var e=t(33);var o=t(47);function u(r){return o(r)&&(e("zero",r)||e("zero",r.constructor))}r.exports=u},function(r,n,t){r.exports=t(50)},function(r,n,t){r.exports=t(51)},function(r,n,t){r.exports=t(45)},function(r,n,t){r.exports=t(57)},function(r,n,t){var e=t(33);var o=t(48);function u(r){return o(r)&&e("bimap",r)}r.exports=u},function(r,n,t){r.exports=t(59)},function(r,n,t){var e=t(33);function o(r){return e("bichain",r)}r.exports=o},function(r,n){function t(r){return typeof r==="boolean"}r.exports=t},function(r,n,t){var e=t(33);var o=t(62);function u(r){return o(r)&&(e("id",r)||e("id",r.constructor))}r.exports=u},function(r,n,t){var e=t(33);function o(r){return!!r&&e("compose",r)}r.exports=o},function(r,n,t){r.exports=t(64)},function(r,n,t){var e=t(33);var o=t(51);function u(r){return o(r)&&e("chain",r)}r.exports=u},function(r,n,t){r.exports=t(66)},function(r,n,t){var e=t(33);function o(r){return!!r&&e("contramap",r)}r.exports=o},function(r,n,t){r.exports=t(68)},function(r,n){function t(r){return Object.prototype.toString.apply(r)==="[object Date]"&&!isNaN(r.valueOf())}r.exports=t},function(r,n,t){r.exports=t(29)},function(r,n,t){r.exports=t(30)},function(r,n,t){r.exports=t(72)},function(r,n,t){var e=t(33);var o=t(48);function u(r){return o(r)&&e("extend",r)}r.exports=u},function(r,n){function t(r){return r===false}r.exports=t},function(r,n){function t(r){return!r}r.exports=t},function(r,n,t){r.exports=t(43)},function(r,n,t){r.exports=t(4)},function(r,n,t){r.exports=t(48)},function(r,n,t){r.exports=t(39)},function(r,n,t){r.exports=t(80)},function(r,n,t){var e=t(4);var o=t(41);function u(r){return!o(r)&&e(r[Symbol.iterator])}r.exports=u},function(r,n,t){r.exports=t(82)},function(r,n){function t(r){return r instanceof Map}r.exports=t},function(r,n,t){r.exports=t(84)},function(r,n,t){var e=t(33);var o=t(50);function u(r){return o(r)&&e("chain",r)}r.exports=u},function(r,n,t){r.exports=t(32)},function(r,n,t){r.exports=t(41)},function(r,n,t){r.exports=t(40)},function(r,n,t){r.exports=t(31)},function(r,n,t){r.exports=t(52)},function(r,n,t){r.exports=t(91)},function(r,n,t){var e=t(33);var o=t(66);var u=t(48);function i(r){return o(r)&&u(r)&&e("promap",r)}r.exports=i},function(r,n,t){r.exports=t(93)},function(r,n,t){var e=t(4);function o(r){return!!r&&e(r.then)&&e(r.catch)}r.exports=o},function(r,n,t){var e=t(3);var o=t(38);r.exports=e(o)},function(r,n,t){r.exports=t(18)},function(r,n,t){r.exports=t(35)},function(r,n,t){r.exports=t(62)},function(r,n,t){var e=t(33);function o(r){return!!r&&e("equals",r)}r.exports=o},function(r,n,t){r.exports=t(36)},function(r,n,t){r.exports=t(101)},function(r,n){function t(r){return typeof r==="symbol"}r.exports=t},function(r,n,t){var e=t(33);var o=t(48);function u(r){return o(r)&&e("traverse",r)}r.exports=u},function(r,n){function t(r){return r===true}r.exports=t},function(r,n){function t(r){return!!r}r.exports=t},function(r,n,t){var e=t(3);var a=t(37);var f=t(45);var c=t(29);var p=t(30);var s=t(39);var v=t(41);var y=t(36);var h=function(r){return r+": First argument must be an Array of non-empty Strings or Integers"};function o(i){function r(r,n,t){if(!f(r)){throw new TypeError(h(i))}if(v(t)){return false}var e=t;for(var o=0;o<r.length;o++){var u=r[o];if(!(y(u)&&!p(u)||s(u))){throw new TypeError(h(i))}if(v(e)){return false}e=e[u];if(!c(e)){return false}}return a(e,n)}return e(r)}var u=o("pathEq");u.origFn=o;r.exports=u},function(r,n,t){var e=t(3);var a=t(45);var f=t(30);var c=t(39);var p=t(41);var s=t(16);var v=t(36);var y=t(20);var h=function(r){return r+": First argument must be an Array of non-empty Strings or Integers"};function o(i){function r(r,n,t){if(!a(r)){throw new TypeError(h(i))}if(!s(n)){throw new TypeError(i+": Second argument must be a Pred or predicate Function")}if(p(t)){return false}var e=t;for(var o=0;o<r.length;o++){var u=r[o];if(!(v(u)&&!f(u)||c(u))){throw new TypeError(h(i))}if(p(e)){return false}e=e[u]}return!!y(n,e)}return e(r)}var u=o("pathSatisfies");u.origFn=o;r.exports=u},function(r,n,t){var e=t(3);var o=t(37);var u=t(29);var i=t(30);var a=t(39);var f=t(41);var c=t(36);function p(r,n,t){if(!(c(r)&&!i(r)||a(r))){throw new TypeError("propEq: Non-empty String or Integer required for first argument")}if(f(t)){return false}var e=t[r];return u(e)&&o(e,n)}r.exports=e(p)},function(r,n,t){var e=t(105);r.exports=e.origFn("propPathEq")},function(r,n,t){var e=t(3);var o=t(30);var u=t(39);var i=t(41);var a=t(16);var f=t(36);var c=t(20);function p(r,n,t){if(!(f(r)&&!o(r)||u(r))){throw new TypeError("propSatisfies: Non-empty String or Integer required for first argument")}if(!a(n)){throw new TypeError("propSatisfies: Pred or predicate function required for second argument")}return i(t)?false:!!c(n,t[r])}r.exports=e(p)},function(r,n,t){var e=t(106);r.exports=e.origFn("propPathSatisfies")},function(r,n,t){var e=2;var o=t(112);var v=t(113);var y=t(17).type("Arrow");var h=t(17).typeFn(y(),e);var w=t(34);var l=t(4);var m=t(18);var d=t(17).proxy("Pair");var g=function(){return T(function(r){return r})};function T(e){var r;if(!l(e)){throw new TypeError("Arrow: Function required")}var n=function(){return"Arrow"+v(e)};var t=g;var o=function(n){return T(function(r){return n(e(r))})};function u(n){return function(r){if(!m(T,r)){throw new TypeError("Arrow."+n+": Arrow required")}return o(r.runWith)}}function i(n){return function(r){if(!l(r)){throw new TypeError("Arrow."+n+": Function required")}return o(r)}}function a(r){return function(n){if(!l(n)){throw new TypeError("Arrow."+r+": Function required")}return T(function(r){return e(n(r))})}}function f(r){return function(n,t){if(!l(n)||!l(t)){throw new TypeError("Arrow."+r+": Functions required for both arguments")}return T(function(r){return t(e(n(r)))})}}function c(){return T(function(r){if(!m(d,r)){throw TypeError("Arrow.first: Pair required for inner argument")}return r.bimap(e,function(r){return r})})}function p(){return T(function(r){if(!m(d,r)){throw TypeError("Arrow.second: Pair required for inner argument")}return r.bimap(function(r){return r},e)})}function s(){return T(function(r){if(!m(d,r)){throw TypeError("Arrow.both: Pair required for inner argument")}return r.bimap(e,e)})}return r={inspect:n,toString:n,type:y,runWith:e,id:t,first:c,second:p,both:s,compose:u("compose"),map:i("map"),contramap:a("contramap"),promap:f("promap")},r[w.id]=t,r[w.compose]=u(w.compose),r[w.map]=i(w.map),r[w.contramap]=a(w.contramap),r[w.promap]=f(w.promap),r["@@type"]=h,r.constructor=T,r}T.id=g;T.type=y;T[w.id]=g;T["@@type"]=h;T["@@implements"]=o(["compose","contramap","id","map","promap"]);r.exports=T},function(r,n){var t=function(n){return function(r){return n.indexOf(r)!==-1}};r.exports=t},function(r,n,t){var e=t(45);var o=t(4);var u=t(31);var i=t(36);var a=t(101);var f=t(68);function c(r){return r.length?r.map(p).reduce(function(r,n){return r+","+n}):r}function p(t){if(t&&o(t.inspect)){return" "+t.inspect()}if(o(t)){return" Function"}if(e(t)){return" ["+c(t)+" ]"}if(u(t)){return" { "+Object.keys(t).reduce(function(r,n){return r.concat([n+":"+p(t[n])])},[]).join(", ")+" }"}if(i(t)){return' "'+t+'"'}if(a(t)||f(t)){return" "+t.toString()}return" "+t}r.exports=p},function(r,n,t){var e=5;var o=t(112);var w=t(113);var l=t(17).type("Async");var m=t(17).typeFn(l(),e);var d=t(34);var u=t(115);var g=t(7);var T=t(118);var E=t(119);var i=t(45);var a=t(43);var q=t(4);var f=t(39);var c=t(93);var x=t(18);var p=function(r){return r.reduce(function(r,n){return r&&x(O,n)},true)};var b=function(t){return O(function(r,n){return n(t)})};var s=function(n){return O(function(r){return r(n)})};function v(r){if(!(a(r)&&p(r))){throw new TypeError("Async.all: Foldable structure of Asyncs required")}if(i(r)){return u.sequence(O.of,r)}return r.sequence(O.of)}function y(o,u){if(!q(o)){throw new TypeError("Async.fromNode: CPS function required")}return function(){var r=[],n=arguments.length;while(n--)r[n]=arguments[n];return O(function(t,e){o.apply(u,r.concat(function(r,n){return r?t(r):e(n)}))})}}function h(o){if(!q(o)){throw new TypeError("Async.fromPromise: Promise returning function required")}return function(){var e=arguments;return O(function(r,n){var t=o.apply(null,e);if(!c(t)){throw new TypeError("Async.fromPromise: Promise returning function required")}t.then(n,r)})}}function A(t,e){if(!(f(t)&&t>=0)){throw new TypeError("Async.rejectAfter: Positive Integer required for first argument")}return O(function(r){var n=setTimeout(function(){r(e)},t);return function(){clearTimeout(n)}})}function F(e,o){if(!(f(e)&&e>=0)){throw new TypeError("Async.resolveAfter: Positive Integer required for first argument")}return O(function(r,n){var t=setTimeout(function(){n(o)},e);return function(){clearTimeout(t)}})}function O(p){var r;if(!q(p)){throw new TypeError("Async: Function required")}var n=b;var t=function(){return"Async"+w(p)};function y(r,n,t){if(!q(r)||!q(n)){throw new TypeError("Async.fork: Reject and resolve functions required")}var e=false;var o=false;var u=function(){e=true};var i=q(t)?t:E;var a=function(r,n){if(!o){o=true;if(e){return E()}return r(n)}};var f=p(a.bind(null,r),a.bind(null,n));var c=q(f)?f:E;return T(function(){return i(u(c()))})}function e(){return new Promise(function(r,n){y(n,r)})}function o(a){if(!x(O,a)){throw new TypeError("Async.race: Async required")}return O(function(t,e){var r=T(function(r,n){return r?e(n):t(n)});var n=r.bind(null,true);var o=r.bind(null,false);var u=y(o,n);var i=a.fork(o,n);return function(){u();i()}})}function u(t,e){if(!q(t)||!q(e)){throw new TypeError("Async.swap: Functions required for both arguments")}return O(function(r,n){return y(g(n,t),g(r,e))})}function i(t,e){if(!q(t)||!q(e)){throw new TypeError("Async.coalesce: Functions required for both arguments")}return O(function(r,n){return y(g(n,t),g(n,e))})}function a(r){return function(t){if(!q(t)){throw new TypeError("Async."+r+": Function required")}return O(function(r,n){return y(r,g(n,t))})}}function f(r){return function(t,e){if(!q(t)||!q(e)){throw new TypeError("Async."+r+": Functions required for both arguments")}return O(function(r,n){return y(g(r,t),g(n,e))})}}function c(r){return function(o){if(!x(O,o)){throw new TypeError("Async."+r+": Async required")}return O(function(r,n){var t=E;var e=E;t=y(function(){e=o.fork(r,n)},n);return T(function(){return e(t())})})}}function s(v){if(!x(O,v)){throw new TypeError("Async.ap: Async required")}return O(function(r,n){var t=null;var e=null;var o=false;var u=false;var i=false;var a=function(){i=true};var f=T(r);function c(){if(!i&&o&&u){g(n,t)(e)}}var p=y(f,function(r){if(!q(r)){throw new TypeError("Async.ap: Wrapped value must be a function")}o=true;t=r;c()});var s=v.fork(f,function(r){u=true;e=r;c()});return function(){p();s();a()}})}function v(i){return function(u){if(!q(u)){throw new TypeError("Async."+i+": Async returning function required")}return O(function(t,e){var r=E;var o=E;r=y(t,function(r){var n=u(r);if(!x(O,n)){throw new TypeError("Async."+i+": Function must return another Async")}o=n.fork(t,e)});return T(function(){return o(r())})})}}function h(t,i){var a="Async.bichain: Both arguments must be Async returning functions";if(!q(t)||!q(i)){throw new TypeError(a)}return O(function(e,o){var r=E;var u=E;function n(t){return function(r){var n=t(r);if(!x(O,n)){throw new TypeError(a)}u=n.fork(e,o)}}r=y(n(t),n(i));return T(function(){return u(r())})})}return r={fork:y,toPromise:e,inspect:t,toString:t,type:l,swap:u,race:o,coalesce:i,ap:s,of:n,alt:c("alt"),bimap:f("bimap"),map:a("map"),chain:v("chain"),bichain:h},r[d.of]=n,r[d.alt]=c(d.alt),r[d.bimap]=f(d.bimap),r[d.map]=a(d.map),r[d.chain]=v(d.chain),r["@@type"]=m,r.constructor=O,r}O.of=b;O.type=l;O[d.of]=b;O["@@type"]=m;O.Rejected=s;O.Resolved=b;O.fromPromise=h;O.fromNode=y;O.all=v;O.rejectAfter=A;O.resolveAfter=F;O["@@implements"]=o(["alt","ap","bimap","chain","map","of"]);r.exports=O},function(r,n,t){var u=t(51);var i=t(45);var o=t(30);var e=t(4);var a=t(18);var f=t(35);var c=t(116);var p=function(r){return r};var s=function(n){return function(r){return n.concat(r)}};function v(e,o){return function(r,n){var t=o(n);if(!((u(r)||i(r))&&a(r,t))){throw new TypeError("Array."+e+": Must wrap Applys of the same type")}if(i(t)){return w(r,h(function(r){return s([r])},t))}return t.map(function(r){return s([r])}).ap(r)}}var y=function(r){return r.reduce(function(r,n){return r&&e(n)},true)};var h=function(n,r){return r.map(function(r){return n(r)})};function w(t,r){if(!(r.length&&y(r))){throw new TypeError("Array.ap: Second Array must all be functions")}return r.reduce(function(r,n){return r.concat(h(n,t))},[])}function l(e,r){return r.reduce(function(r,n){var t=e(n);if(!i(t)){throw new TypeError("Array.chain: Function must return an Array")}return r.concat(t)},[])}function m(r,n){var t=c(r);return n.reduceRight(v("sequence",p),t([]))}function d(r,n,t){var e=c(r);return t.reduceRight(v("traverse",n),e([]))}function g(r){if(o(r)){throw new TypeError("Array.fold: Non-empty Array of Semigroups required")}var n=r[0];if(!f(n)){throw new TypeError("Array.fold: Must contain Semigroups of the same type")}return r.reduce(function(r,n){if(!a(r,n)){throw new TypeError("Array.fold: Must contain Semigroups of the same type")}return r.concat(n)})}function T(e,r){if(o(r)){throw new TypeError("Array.foldMap: Non-empty Array required")}var n=e(r[0]);if(!f(n)){throw new TypeError("Array.foldMap: Provided function must return Semigroups of the same type")}return r.length===1?n:r.slice(1).reduce(function(r,n){var t=e(n);if(!(a(r,t)&&f(t))){throw new TypeError("Array.foldMap: Provided function must return Semigroups of the same type")}return r.concat(t)},n)}function E(r,n,t){var e=t.slice();e[r]=n;return e}function q(r,n){return n.slice(0,r).concat(n.slice(r+1))}r.exports={ap:w,chain:l,fold:g,foldMap:T,map:h,sequence:m,set:E,traverse:d,unset:q}},function(r,n,t){var e=t(50);var o=t(117);var u=function(n){return function(r){return e(n)?n.of(r):o(Array,n)?[r]:n(r)}};r.exports=u},function(r,n,t){var e=t(4);var o=function(r,n){return e(n)&&(r===n||r.name===n.name)};r.exports=o},function(r,n){function t(r){var n,t;return function(){if(!n){n=true;t=r.apply(null,arguments)}return t}}r.exports=t},function(r,n){r.exports=Function.prototype},function(r,n,t){var e=3;var h=t(37);var o=t(112);var w=t(113);var u=t(17).type("Const");var i=t(17).typeFn;var l=t(34);var m=t(4);var a=t(32);var d=t(18);var g=t(35);var T=function(r){return m(r.type)?r.type():r.name};var E=function(r){return function(){return r}};var f={Array:function(){return[]},String:function(){return""}};var q=function(r){return r[l.empty]||r.empty||f[r.name]};var x=function(r){return a(r)||r.name==="String"||r.name==="Array"};function c(f){if(!m(f)){throw new TypeError("Const: TypeRep required for construction")}var c=E(u(T(f)));var p=i("Const",e,T(f));function s(r){return function(){if(!x(f)){throw new TypeError(c()+"."+r+": Must be fixed to a Monoid")}return y(q(f)())}}function v(r){return function(){if(!x(f)){throw new TypeError(c()+"."+r+": Must be fixed to a Monoid")}return y(q(f)())}}function y(t){var r;if(!d(f,t)){throw new TypeError(c()+": "+T(f)+" required")}var n=E(""+c()+w(t));var e=E(t);var o=function(r){return d(y,r)&&h(t,r.valueOf())};function u(n){return function(r){if(!g(t)){throw new TypeError(c()+"."+n+": Must be fixed to a Semigroup")}if(!d(y,r)){throw new TypeError(c()+"."+n+": "+c()+" required")}return y(t.concat(r.valueOf()))}}function i(n){return function(r){if(!m(r)){throw new TypeError(c()+"."+n+": Function required")}return y(t)}}function a(r){if(!g(t)){throw new TypeError(c()+".ap: Must be fixed to a Semigroup")}if(!d(y,r)){throw new TypeError(c()+".ap: "+c()+" required")}return y(t.concat(r.valueOf()))}return r={inspect:n,toString:n,valueOf:e,type:c,ap:a,equals:o,concat:u("concat"),empty:s("empty"),map:i("map"),of:v("of")},r[l.concat]=u(l.concat),r[l.empty]=s(l.empty),r[l.equals]=o,r[l.map]=i(l.map),r[l.of]=v(l.of),r["@@type"]=p,r.constructor=y,r}y.empty=s("empty");y.of=v("of");y.type=c;y[l.empty]=s(l.empty);y[l.of]=v(l.of);y["@@type"]=p;y["@@implements"]=o(["ap","concat","empty","equals","map","of"]);return y}r.exports=c},function(r,n,t){var e=4;var o=t(122);var d=t(37);var u=t(112);var g=t(123);var T=t(113);var E=t(17).type("Either");var q=t(17).typeFn(E(),e);var x=t(34);var b=t(116);var A=t(7);var F=t(45);var O=t(50);var P=t(51);var S=t(4);var R=t(18);var M=function(r){return function(){return r}};var L=o({Left:["a"],Right:["b"]});var i=L.Left;var j=L.Right;I.Left=A(I,i);I.Right=A(I,j);var N=I.Right;function W(r){if(!(P(r)||F(r))){throw new TypeError("Either.sequence: Must wrap an Apply")}return r.map(N)}function I(r){var n;if(!arguments.length){throw new TypeError("Either: Must wrap something, try using Left or Right constructors")}var t=!L.includes(r)?j(r):r;var e=function(r){return R(I,r)&&i(function(n){return r.either(function(r){return d(r,n)},M(false))},function(n){return r.either(M(false),function(r){return d(r,n)})})};var o=N;var u=function(){return i(function(r){return"Left"+T(r)},function(r){return"Right"+T(r)})};function i(r,n){if(!S(r)||!S(n)){throw new TypeError("Either.either: Requires both left and right functions")}return L.caseOf({Left:r,Right:n},t)}function a(n){return function(r){if(!R(I,r)){throw new TypeError("Either."+n+": Either of Semigroup required")}return i(I.Left,g("Either."+n,r))}}function f(r,n){if(!S(r)||!S(n)){throw new TypeError("Either.swap: Requires both left and right functions")}return i(A(I.Right,r),A(I.Left,n))}function c(r,n){if(!S(r)||!S(n)){throw new TypeError("Either.coalesce: Requires both left and right functions")}return I.Right(i(r,n))}function p(r,n){var t="Either.bichain: Both arguments must be Either returning functions";if(!(S(r)&&S(n))){throw new TypeError(t)}var e=i(r,n);if(!R(I,e)){throw new TypeError(t)}return e}function s(n){return function(r){if(!S(r)){throw new TypeError("Either."+n+": Function required")}return i(I.Left,A(I.Right,r))}}function v(t){return function(r,n){if(!S(r)||!S(n)){throw new TypeError("Either."+t+": Requires both left and right functions")}return i(A(I.Left,r),A(I.Right,n))}}function y(n){return function(r){if(!R(I,r)){throw new TypeError("Either."+n+": Either required")}return i(M(r),I.Right)}}function h(n){if(!i(M(true),S)){throw new TypeError("Either.ap: Wrapped value must be a function")}else if(!i(M(true),M(R(I,n)))){throw new TypeError("Either.ap: Either required")}return i(I.Left,function(r){return n.map(r)})}function w(t){return function(r){if(!S(r)){throw new TypeError("Either."+t+": Function required")}var n=i(I.Left,r);if(!R(I,n)){throw new TypeError("Either."+t+": Function must return an Either")}return n}}function l(r){if(!(O(r)||S(r))){throw new TypeError("Either.sequence: Applicative TypeRep or Apply returning function required")}var n=b(r);return i(A(n,I.Left),W)}function m(r,n){if(!(O(r)||S(r))){throw new TypeError("Either.traverse: Applicative TypeRep or Apply returning function required for first argument")}if(!S(n)){throw new TypeError("Either.traverse: Apply returning function required for second argument")}var t=b(r);var e=i(A(t,I.Left),n);if(!(P(e)||F(e))){throw new TypeError("Either.traverse: Both functions must return an Apply of the same type")}return i(M(e),M(e.map(N)))}return n={inspect:u,toString:u,either:i,type:E,swap:f,coalesce:c,bichain:p,equals:e,ap:h,of:o,sequence:l,traverse:m,alt:y("alt"),bimap:v("bimap"),concat:a("concat"),chain:w("chain"),map:s("map")},n[x.of]=o,n[x.equals]=e,n[x.alt]=y(x.alt),n[x.bimap]=v(x.bimap),n[x.concat]=a(x.concat),n[x.map]=s(x.map),n[x.chain]=w(x.chain),n["@@type"]=q,n.constructor=I,n}I.of=N;I.type=E;I[x.of]=N;I["@@type"]=q;I["@@implements"]=u(["alt","ap","bimap","chain","concat","equals","map","of","traverse"]);r.exports=I},function(r,n,t){var o=t(3);var u=t(45);var i=t(30);var e=t(4);var a=t(31);var f=t(36);var c=function(r){return function(){return r}};var p=function(r){return f(r)&&r.length};function s(u){return function(r,t){var n=t.tag;var e=u[n()];var o=e.reduce(function(r,n){return r.concat([t[n].value()])},[]);return r[n()].apply(null,o)}}var v=function(n){return function(r){return!!r&&e(r.tag)&&Object.keys(n).indexOf(r.tag())!==-1}};function y(n,t){return function(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];return n.reduce(function(r,n,t){r[n]={value:c(e[t])};return r},{tag:c(t)})}}function h(e){if(!a(e)||i(e)){throw new TypeError("defineUnion: Argument must be an Object containing definition lists")}return Object.keys(e).reduce(function(r,n){var t=e[n];if(!u(t)||!t.reduce(function(r,n){return r&&p(n)},true)){throw new TypeError("defineUnion: Definitions must be a list of non-empty string identifiers")}r[n]=y(t,n);return r},{caseOf:o(s(e)),includes:o(v(e))})}r.exports=h},function(r,n,t){var e=t(18);var o=t(35);function u(t,r){return function(n){if(!o(n)){throw new TypeError(t+": Both containers must contain Semigroups of the same type")}return r.map(function(r){if(!e(n,r)){throw new TypeError(t+": Both containers must contain Semigroups of the same type")}return n.concat(r)})}}r.exports=u},function(r,n,t){var e=2;var o=t(112);var f=t(113);var c=t(3);var p=t(4);var s=t(18);var v=t(17).type("Equiv");var y=t(17).typeFn(v(),e);var h=t(34);var w=function(){return l(function(){return true})};function l(t){var r;if(!p(t)){throw new TypeError("Equiv: Comparison function required")}var e=c(function(r,n){return!!t(r,n)});var n=function(){return"Equiv"+f(t)};var o=w;var u=function(){return e};function i(r){return function(t){if(!p(t)){throw new TypeError("Equiv."+r+": Function required")}return l(function(r,n){return e(t(r),t(n))})}}function a(r){return function(t){if(!s(l,t)){throw new TypeError("Equiv."+r+": Equiv required")}return l(function(r,n){return e(r,n)&&t.compareWith(r,n)})}}return r={inspect:n,toString:n,type:v,compareWith:e,valueOf:u,empty:o,concat:a("concat"),contramap:i("contramap")},r[h.empty]=o,r[h.concat]=a(h.concat),r[h.contramap]=i(h.contramap),r["@@type"]=y,r.constructor=l,r}l.empty=w;l.type=v;l[h.empty]=w;l["@@type"]=y;l["@@implements"]=o(["concat","contramap","empty"]);r.exports=l},function(r,n,t){var e=3;var v=t(37);var o=t(112);var y=t(123);var h=t(113);var w=t(17).type("Identity");var l=t(17).typeFn(w(),e);var m=t(34);var d=t(45);var g=t(51);var T=t(50);var E=t(4);var q=t(18);var x=b;function b(e){var r;if(!arguments.length){throw new TypeError("Identity: Must wrap something")}var n=function(){return e};var t=x;var o=function(r){return q(b,r)&&v(e,r.valueOf())};var u=function(){return"Identity"+h(e)};function i(n){return function(r){if(!q(b,r)){throw new TypeError("Identity."+n+": Identity of Semigroup required")}return y("Identity."+n,r)(e)}}function a(n){return function(r){if(!E(r)){throw new TypeError("Identity."+n+": Function required")}return b(r(e))}}function f(r){if(!E(e)){throw new TypeError("Identity.ap: Wrapped value must be a function")}else if(!q(b,r)){throw new TypeError("Identity.ap: Identity required")}return r.map(e)}function c(t){return function(r){if(!E(r)){throw new TypeError("Identity."+t+": Function required")}var n=r(e);if(!q(b,n)){throw new TypeError("Identity."+t+": Function must return an Identity")}return n}}function p(r){if(!(T(r)||E(r))){throw new TypeError("Identity.sequence: Applicative TypeRep or Apply returning function required")}if(!(g(e)||d(e))){throw new TypeError("Identity.sequence: Must wrap an Apply")}return e.map(x)}function s(r,n){if(!(T(r)||E(r))){throw new TypeError("Identity.traverse: Applicative TypeRep or Apply returning function required for first argument")}if(!E(n)){throw new TypeError("Identity.traverse: Apply returning functions required for second argument")}var t=n(e);if(!(g(t)||d(t))){throw new TypeError("Identity.traverse: Both functions must return an Apply of the same type")}return t.map(x)}return r={inspect:u,toString:u,valueOf:n,type:w,equals:o,ap:f,of:t,sequence:p,traverse:s,concat:i("concat"),map:a("map"),chain:c("chain")},r[m.of]=t,r[m.equals]=o,r[m.concat]=i(m.concat),r[m.map]=a(m.map),r[m.chain]=c(m.chain),r["@@type"]=l,r.constructor=b,r}b.of=x;b.type=w;b[m.of]=x;b["@@type"]=l;b["@@implements"]=o(["ap","chain","concat","equals","map","of","traverse"]);r.exports=b},function(r,n,t){var e=2;var o=t(112);var a=t(113);var f=t(17).type("IO");var c=t(17).typeFn(f(),e);var p=t(34);var s=t(7);var v=t(4);var y=t(18);var h=function(r){return w(function(){return r})};function w(e){var r;if(!v(e)){throw new TypeError("IO: Must wrap a function")}var n=h;var t=function(){return"IO"+a(e)};function o(n){return function(r){if(!v(r)){throw new TypeError("IO."+n+": Function required")}return w(s(r,e))}}function u(n){if(!y(w,n)){throw new TypeError("IO.ap: IO required")}return w(function(){var r=e();if(!v(r)){throw new TypeError("IO.ap: Wrapped value must be a function")}return n.map(r).run()})}function i(t){return function(n){if(!v(n)){throw new TypeError("IO."+t+": Function required")}return w(function(){var r=n(e());if(!y(w,r)){throw new TypeError("IO."+t+": Function must return an IO")}return r.run()})}}return r={inspect:t,toString:t,run:e,type:f,ap:u,of:n,map:o("map"),chain:i("chain")},r[p.of]=n,r[p.map]=o(p.map),r[p.chain]=i(p.chain),r["@@type"]=c,r.constructor=w,r}w.of=h;w.type=f;w[p.of]=h;w["@@type"]=c;w["@@implements"]=o(["ap","chain","map","of"]);r.exports=w},function(r,n,t){r.exports=t(128)},function(r,n,t){var e=4;var A=t(37);var o=t(112);var F=t(113);var O=t(17).type("List");var P=t(17).typeFn(O(),e);var S=t(34);var u=t(115);var R=t(116);var M=t(50);var i=t(51);var L=t(45);var j=t(30);var N=t(4);var W=t(16);var I=t(18);var k=t(35);var B=t(20);var C=function(n){return function(r){return!n(r)}};var a=function(n){return function(r){return n.concat(r)}};var f=t(129);var J=f.Nothing;var U=f.Just;var z=function(r){return G([r])};var _=function(){return G([])};function c(r){if(!L(r)){throw new TypeError("List.fromArray: Array required")}return r.reduce(function(r,n){return r.concat(G.of(n))},G.empty())}function p(r,n){if(L(r)){return u.ap(r,u.map(function(r){return a(G.of(r))},n))}return n.map(function(r){return a(G.of(r))}).ap(r)}function D(r,n){if(!((i(r)||L(r))&&I(r,n))){throw new TypeError("List.sequence: Must wrap Applys of the same type")}return p(r,n)}function K(e){return function(r,n){var t=e(n);if(!((i(r)||L(r))&&I(r,t))){throw new TypeError("List.traverse: Both functions must return an Apply of the same type")}return p(r,t)}}function G(r){var n;if(!arguments.length){throw new TypeError("List: List must wrap something")}var o=L(r)?r.slice():[r];function t(e,o){return function(r,n){var t=o(n);if(!I(G,t)){throw new TypeError("List."+e+": Function must return a List")}return r.concat(t.valueOf())}}var e=z;var u=function(){return o.slice()};var i=u;var a=_;var f=function(){return"List"+F(o)};var c=function(){return o.length?U(o[0]):J()};var p=function(){return o.length&&o.length>1?U(G(o.slice(1))):J()};var s=function(r){return G([r].concat(o))};var v=function(r){return I(G,r)&&A(o,r.valueOf())};function y(n){return function(r){if(!I(G,r)){throw new TypeError("List."+n+": List required")}return G(o.concat(r.valueOf()))}}function h(t){return function(r,n){if(!N(r)){throw new TypeError("List."+t+": Function required for first argument")}return o.reduce(r,n)}}function w(r,n){if(!N(r)){throw new TypeError("List.reduceRight: Function required for first argument")}return o.reduceRight(r,n)}function l(){if(j(o)){throw new TypeError("List.fold: List must contain at least one Semigroup")}var r=o[0];if(!k(r)){throw new TypeError("List.fold: List must contain Semigroups of the same type")}return o.reduce(function(r,n){if(!I(r,n)){throw new TypeError("List.fold: List must contain Semigroups of the same type")}return r.concat(n)})}function m(e){if(!N(e)){throw new TypeError("List.foldMap: Semigroup returning function required")}if(j(o)){throw new TypeError("List.foldMap: List must not be empty")}var r=e(o[0]);if(!k(r)){throw new TypeError("List.foldMap: Provided function must return Semigroups of the same type")}return o.length!==1?o.slice(1).reduce(function(r,n){var t=e(n);if(!(I(r,t)&&k(t))){throw new TypeError("List.foldMap: Provided function must return Semigroups of the same type")}return r.concat(t)},r):r}function d(r){return function(t){if(!W(t)){throw new TypeError("List."+r+": Pred or predicate function required")}return G(o.reduce(function(r,n){return B(t,n)?r.concat([n]):r},[]))}}function g(n){if(!W(n)){throw new TypeError("List.reject: Pred or predicate function required")}var t=C(function(r){return B(n,r)});return G(o.reduce(function(r,n){return t(n)?r.concat([n]):r},[]))}function T(r){return function(n){if(!N(n)){throw new TypeError("List."+r+": Function required")}return G(o.map(function(r){return n(r)}))}}function E(r){if(!I(G,r)){throw new TypeError("List.ap: List required")}var t=r.valueOf();return G(o.reduce(function(r,n){if(!N(n)){throw new TypeError("List.ap: Wrapped values must all be functions")}return r.concat(t.map(function(r){return n(r)}))},[]))}function q(n){return function(r){if(!N(r)){throw new TypeError("List."+n+": Function required")}return G(o.reduce(t(n,r),[]))}}function x(r){if(!(M(r)||N(r))){throw new TypeError("List.sequence: Applicative TypeRep or Apply returning function required")}var n=R(r);return w(D,n(G.empty()))}function b(r,n){if(!(M(r)||N(r))){throw new TypeError("List.traverse: Applicative TypeRep or Apply returning function required for first argument")}if(!N(n)){throw new TypeError("List.traverse: Apply returning functions required for second argument")}var t=R(r);return w(K(n),t(G.empty()))}return n={inspect:f,toString:f,valueOf:u,toArray:i,head:c,tail:p,cons:s,type:O,equals:v,empty:a,reduceRight:w,fold:l,foldMap:m,reject:g,ap:E,of:e,sequence:x,traverse:b,concat:y("concat"),map:T("map"),chain:q("chain"),reduce:h("reduce"),filter:d("filter")},n[S.of]=e,n[S.equals]=v,n[S.concat]=y(S.concat),n[S.empty]=a,n[S.map]=T(S.map),n[S.chain]=q(S.chain),n[S.reduce]=h(S.reduce),n[S.filter]=d(S.filter),n["@@type"]=P,n.constructor=G,n}G.of=z;G.empty=_;G.type=O;G[S.of]=z;G[S.empty]=_;G["@@type"]=P;G.fromArray=c;G["@@implements"]=o(["ap","chain","concat","empty","equals","map","of","reduce","traverse"]);r.exports=G},function(r,n,t){var e=4;var o=t(122);var d=t(37);var u=t(112);var g=t(123);var T=t(113);var E=t(17).type("Maybe");var q=t(17).typeFn(E(),e);var x=t(34);var b=t(116);var A=t(7);var F=t(50);var O=t(51);var P=t(45);var S=t(4);var R=t(18);var M=function(r){return function(){return r}};var L=function(r){return r};var j=o({Nothing:[],Just:["a"]});var i=j.Nothing;var N=j.Just;B.Nothing=A(B,i);B.Just=A(B,N);var W=A(B,N);var I=A(B,i);function k(r){if(!(O(r)||P(r))){throw new TypeError("Maybe.sequence: Must wrap an Apply")}return r.map(W)}function B(r){var n;if(!arguments.length){throw new TypeError("Maybe: Must wrap something, try using Nothing or Just constructors")}var t=!j.includes(r)?N(r):r;var e=W;var o=I;var u=function(r){return f(M(r),L)};var i=function(r){return R(B,r)&&f(M(r.either(M(true),M(false))),function(n){return r.either(M(false),function(r){return d(r,n)})})};var a=function(){return f(M("Nothing"),function(r){return"Just"+T(r)})};function f(r,n){if(!S(r)||!S(n)){throw new TypeError("Maybe.either: Requires both left and right functions")}return j.caseOf({Nothing:r,Just:n},t)}function c(n){return function(r){if(!R(B,r)){throw new TypeError("Maybe."+n+": Maybe of Semigroup required")}return f(B.Nothing,g("Maybe."+n,r))}}function p(r,n){if(!S(r)||!S(n)){throw new TypeError("Maybe.coalesce: Requires both left and right functions")}return B.Just(f(r,n))}function s(r,n){var t="Maybe.bichain: Both arguments must be Maybe returning functions";if(!(S(r)&&S(n))){throw new TypeError(t)}var e=f(r,n);if(!R(B,e)){throw new TypeError(t)}return e}function v(n){return function(r){if(!S(r)){throw new TypeError("Maybe."+n+": Function required")}return f(B.Nothing,A(B.Just,r))}}function y(n){return function(r){if(!R(B,r)){throw new TypeError("Maybe."+n+": Maybe required")}return f(M(r),B.Just)}}function h(r){var n=u(M(undefined));if(!S(n)){throw new TypeError("Maybe.ap: Wrapped value must be a function")}else if(!R(B,r)){throw new TypeError("Maybe.ap: Maybe required")}return f(B.Nothing,r.map)}function w(t){return function(r){if(!S(r)){throw new TypeError("Maybe."+t+": Function required")}var n=f(B.Nothing,r);if(!R(B,n)){throw new TypeError("Maybe."+t+": Function must return a Maybe")}return n}}function l(r){if(!(F(r)||S(r))){throw new TypeError("Maybe.sequence: Applicative TypeRep or Apply returning function required")}var n=b(r);return f(A(n,B.Nothing),k)}function m(r,n){if(!(F(r)||S(r))){throw new TypeError("Maybe.traverse: Applicative TypeRep or Apply returning function required for first argument")}if(!S(n)){throw new TypeError("Maybe.traverse: Apply returning function required for second argument")}var t=b(r);var e=f(A(t,B.Nothing),n);if(!(O(e)||P(e))){throw new TypeError("Maybe.traverse: Both functions must return an Apply of the same type")}return f(M(e),M(e.map(W)))}return n={inspect:a,toString:a,either:f,option:u,type:E,equals:i,bichain:s,coalesce:p,zero:o,ap:h,of:e,sequence:l,traverse:m,alt:y("alt"),chain:w("chain"),concat:c("concat"),map:v("map")},n[x.zero]=o,n[x.of]=e,n[x.equals]=i,n[x.alt]=y(x.alt),n[x.concat]=c(x.concat),n[x.map]=v(x.map),n[x.chain]=w(x.chain),n["@@type"]=q,n.constructor=B,n}B.of=W;B.zero=I;B.type=E;B[x.of]=W;B[x.zero]=I;B["@@type"]=q;B["@@implements"]=u(["alt","ap","chain","concat","equals","map","of","traverse","zero"]);r.exports=B},function(r,n,t){r.exports=t(129)},function(r,n,t){r.exports=t(132)},function(r,n,t){var e=4;var d=t(37);var o=t(112);var g=t(113);var T=t(17).type("Pair");var E=t(17).typeFn(T(),e);var q=t(34);var x=t(50);var b=t(51);var A=t(45);var F=t(4);var O=t(18);var P=t(35);function S(e,o){var r;if(arguments.length<2){throw new TypeError("Pair: Must provide a first and second value")}var i=function(){return e};var a=function(){return o};var n=function(){return"Pair("+g(e)+","+g(o)+" )"};var t=function(){return[e,o]};function u(r){if(!F(r)){throw new TypeError("Pair.merge: Binary function required")}return r(i(),a())}function f(r){return O(S,r)&&d(r.fst(),i())&&d(r.snd(),a())}function c(u){return function(r){if(!O(S,r)){throw new TypeError("Pair."+u+": Pair required")}var n=i();var t=a();var e=r.fst();var o=r.snd();if(!(P(n)&&P(t))){throw new TypeError("Pair."+u+": Both Pairs must contain Semigroups of the same type")}if(!(O(n,e)&&O(t,o))){throw new TypeError("Pair."+u+": Both Pairs must contain Semigroups of the same type")}return S(n.concat(e),t.concat(o))}}function p(r,n){if(!F(r)||!F(n)){throw new TypeError("Pair.swap: Requires both left and right functions")}return S(n(o),r(e))}function s(n){return function(r){if(!F(r)){throw new TypeError("Pair."+n+": Function required")}return S(e,r(o))}}function v(t){return function(r,n){if(!F(r)||!F(n)){throw new TypeError("Pair."+t+": Function required for both arguments")}return S(r(e),n(o))}}function y(r){if(!O(S,r)){throw new TypeError("Pair.ap: Pair required")}var n=a();if(!F(n)){throw new TypeError("Pair.ap: Function required for second value")}var t=i();var e=r.fst();if(!(P(t)&&O(t,e))){throw new TypeError("Pair.ap: Semigroups of the same type is required for first values")}return S(t.concat(e),n(r.snd()))}function h(o){return function(r){var n=i();if(!F(r)){throw new TypeError("Pair."+o+": Function required")}if(!P(n)){throw new TypeError("Pair."+o+": Semigroups of the same type required for first values")}var t=r(a());if(!O(S,t)){throw new TypeError("Pair."+o+": Function must return a Pair")}var e=t.fst();if(!O(n,e)){throw new TypeError("Pair."+o+": Semigroups of the same type required for first values")}return S(n.concat(e),t.snd())}}function w(r){if(!(x(r)||F(r))){throw new TypeError("Pair.sequence: Applicative TypeRep or Apply returning function required")}if(!(b(o)||A(o))){throw new TypeError("Pair.sequence: Must wrap an Apply in the second")}return o.map(function(r){return S(e,r)})}function l(r,n){if(!(x(r)||F(r))){throw new TypeError("Pair.traverse: Applicative TypeRep or Apply returning function required for first argument")}if(!F(n)){throw new TypeError("Pair.traverse