{"name":"sanctuary-type-classes","version":"7.2.0","description":"Standard library for Fantasy Land","license":"MIT","repository":{"type":"git","url":"git://github.com/sanctuary-js/sanctuary-type-classes.git"},"scripts":{"test":"make lint test"},"dependencies":{"sanctuary-type-identifiers":"1.0.x"},"devDependencies":{"doctest":"0.12.x","eslint":"4.9.x","fantasy-land":"3.4.0","istanbul":"0.4.x","mocha":"2.x.x","remark-cli":"3.x.x","remark-lint-no-undefined-references":"1.x.x","remark-lint-no-unused-definitions":"1.x.x","remember-bower":"0.1.x","sanctuary-style":"1.0.x","transcribe":"0.5.x","xyz":"2.0.x"},"files":["/LICENSE","/README.md","/index.js","/package.json"],"gitHead":"b0c871d6649cb374e8ec47257ad502ad60cfa8b8","bugs":{"url":"https://github.com/sanctuary-js/sanctuary-type-classes/issues"},"homepage":"https://github.com/sanctuary-js/sanctuary-type-classes#readme","_id":"sanctuary-type-classes@7.2.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"davidchambers","email":"dc@davidchambers.me"},"dist":{"integrity":"sha512-UXDC0BR+YTpLUY+K4QRotUAZ/2WfY7GJfF0pYXIU+YwuJUOg2MnSpr/E1R6jxPvwxnnWpHa20b0XbSCuHWMQyQ==","shasum":"025bf029083fc04c59defe13925e44bd4fae0a56","tarball":"http://registry-npm.ywwl.com/sanctuary-type-classes/download/sanctuary-type-classes-7.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHNyMELdneo8aAMBAEdR+jgkTlt9ktCZrfmWnyX0uBj1AiEA+LqWoFuDo+9pFvUpsIgkImtLuY+CAfz5XjL8yqGgLmg="}],"size":21326,"noattachment":false,"key":"/sanctuary-type-classes/-/sanctuary-type-classes-7.2.0.tgz"},"maintainers":[{"name":"avaq","email":"aldwin.vlasblom@gmail.com"},{"name":"bperez","email":"ben@plaid.com"},{"name":"davidchambers","email":"dc@davidchambers.me"},{"name":"gabejohnson","email":"gijohnson105@gmail.com"},{"name":"jaforbes","email":"james.a.forbes@gmail.com"},{"name":"joneshf","email":"jones3.hardy@gmail.com"},{"name":"kedashoe","email":"kwallace@gmail.com"},{"name":"rjmk","email":"rafekennedy@gmail.com"},{"name":"safareli","email":"i.safareli@gmail.com"},{"name":"scott-christopher","email":"schristopher@konputa.com"},{"name":"shard","email":"mark@afrotoss.com"},{"name":"svozza","email":"svozza@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sanctuary-type-classes-7.2.0.tgz_1515086321038_0.3210193563718349"},"directories":{},"readme":"# sanctuary-type-classes\n\nThe [Fantasy Land Specification][FL] \"specifies interoperability of common\nalgebraic structures\" by defining a number of type classes. For each type\nclass, it states laws which every member of a type must obey in order for\nthe type to be a member of the type class. In order for the Maybe type to\nbe considered a [Functor][], for example, every `Maybe a` value must have\na `fantasy-land/map` method which obeys the identity and composition laws.\n\nThis project provides:\n\n  - [`TypeClass`](#TypeClass), a function for defining type classes;\n  - one `TypeClass` value for each Fantasy Land type class;\n  - lawful Fantasy Land methods for JavaScript's built-in types;\n  - one function for each Fantasy Land method; and\n  - several functions derived from these functions.\n\n## Type-class hierarchy\n\n<pre>\n <a href=\"#Setoid\">Setoid</a>   <a href=\"#Semigroupoid\">Semigroupoid</a>  <a href=\"#Semigroup\">Semigroup</a>   <a href=\"#Foldable\">Foldable</a>        <a href=\"#Functor\">Functor</a>      <a href=\"#Contravariant\">Contravariant</a>  <a href=\"#Filterable\">Filterable</a>\n(<a href=\"#equals\">equals</a>)    (<a href=\"#compose\">compose</a>)    (<a href=\"#concat\">concat</a>)   (<a href=\"#reduce\">reduce</a>)         (<a href=\"#map\">map</a>)        (<a href=\"#contramap\">contramap</a>)    (<a href=\"#filter\">filter</a>)\n    |           |           |           \\         / | | | | \\\n    |           |           |            \\       /  | | | |  \\\n    |           |           |             \\     /   | | | |   \\\n    |           |           |              \\   /    | | | |    \\\n    |           |           |               \\ /     | | | |     \\\n   <a href=\"#Ord\">Ord</a>      <a href=\"#Category\">Category</a>     <a href=\"#Monoid\">Monoid</a>         <a href=\"#Traversable\">Traversable</a> | | | |      \\\n  (<a href=\"#lte\">lte</a>)       (<a href=\"#id\">id</a>)       (<a href=\"#empty\">empty</a>)        (<a href=\"#traverse\">traverse</a>)  / | | \\       \\\n                            |                      /  | |  \\       \\\n                            |                     /   / \\   \\       \\\n                            |             <a href=\"#Profunctor\">Profunctor</a> /   \\ <a href=\"#Bifunctor\">Bifunctor</a> \\\n                            |              (<a href=\"#promap\">promap</a>) /     \\ (<a href=\"#bimap\">bimap</a>)   \\\n                            |                      /       \\           \\\n                          <a href=\"#Group\">Group</a>                   /         \\           \\\n                         (<a href=\"#invert\">invert</a>)               <a href=\"#Alt\">Alt</a>        <a href=\"#Apply\">Apply</a>      <a href=\"#Extend\">Extend</a>\n                                               (<a href=\"#alt\">alt</a>)        (<a href=\"#ap\">ap</a>)     (<a href=\"#extend\">extend</a>)\n                                                /           / \\           \\\n                                               /           /   \\           \\\n                                              /           /     \\           \\\n                                             /           /       \\           \\\n                                            /           /         \\           \\\n                                          <a href=\"#Plus\">Plus</a>    <a href=\"#Applicative\">Applicative</a>    <a href=\"#Chain\">Chain</a>      <a href=\"#Comonad\">Comonad</a>\n                                         (<a href=\"#zero\">zero</a>)       (<a href=\"#of\">of</a>)      (<a href=\"#chain\">chain</a>)    (<a href=\"#extract\">extract</a>)\n                                            \\         / \\         / \\\n                                             \\       /   \\       /   \\\n                                              \\     /     \\     /     \\\n                                               \\   /       \\   /       \\\n                                                \\ /         \\ /         \\\n                                            <a href=\"#Alternative\">Alternative</a>    <a href=\"#Monad\">Monad</a>     <a href=\"#ChainRec\">ChainRec</a>\n                                                                    (<a href=\"#chainRec\">chainRec</a>)\n</pre>\n\n## API\n\n#### <a name=\"TypeClass\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L609\">`TypeClass :: (String, String, Array TypeClass, a -⁠> Boolean) -⁠> TypeClass`</a>\n\nThe arguments are:\n\n  - the name of the type class, prefixed by its npm package name;\n  - the documentation URL of the type class;\n  - an array of dependencies; and\n  - a predicate which accepts any JavaScript value and returns `true`\n    if the value satisfies the requirements of the type class; `false`\n    otherwise.\n\nExample:\n\n```javascript\n//    hasMethod :: String -> a -> Boolean\nconst hasMethod = name => x => x != null && typeof x[name] == 'function';\n\n//    Foo :: TypeClass\nconst Foo = Z.TypeClass (\n  'my-package/Foo',\n  'http://example.com/my-package#Foo',\n  [],\n  hasMethod ('foo')\n);\n\n//    Bar :: TypeClass\nconst Bar = Z.TypeClass (\n  'my-package/Bar',\n  'http://example.com/my-package#Bar',\n  [Foo],\n  hasMethod ('bar')\n);\n```\n\nTypes whose values have a `foo` method are members of the Foo type class.\nMembers of the Foo type class whose values have a `bar` method are also\nmembers of the Bar type class.\n\nEach `TypeClass` value has a `test` field: a function which accepts\nany JavaScript value and returns `true` if the value satisfies the\ntype class's predicate and the predicates of all the type class's\ndependencies; `false` otherwise.\n\n`TypeClass` values may be used with [sanctuary-def][type-classes]\nto define parametrically polymorphic functions which verify their\ntype-class constraints at run time.\n\n#### <a name=\"Setoid\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L740\">`Setoid :: TypeClass`</a>\n\n`TypeClass` value for [Setoid][].\n\n```javascript\n> Z.Setoid.test (null)\ntrue\n\n> Z.Setoid.test (Useless)\nfalse\n\n> Z.Setoid.test ([1, 2, 3])\ntrue\n\n> Z.Setoid.test ([Useless])\nfalse\n```\n\n#### <a name=\"Ord\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L777\">`Ord :: TypeClass`</a>\n\n`TypeClass` value for [Ord][].\n\n```javascript\n> Z.Ord.test (0)\ntrue\n\n> Z.Ord.test (Math.sqrt)\nfalse\n\n> Z.Ord.test ([1, 2, 3])\ntrue\n\n> Z.Ord.test ([Math.sqrt])\nfalse\n```\n\n#### <a name=\"Semigroupoid\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L811\">`Semigroupoid :: TypeClass`</a>\n\n`TypeClass` value for [Semigroupoid][].\n\n```javascript\n> Z.Semigroupoid.test (Math.sqrt)\ntrue\n\n> Z.Semigroupoid.test (0)\nfalse\n```\n\n#### <a name=\"Category\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L831\">`Category :: TypeClass`</a>\n\n`TypeClass` value for [Category][].\n\n```javascript\n> Z.Category.test (Math.sqrt)\ntrue\n\n> Z.Category.test (0)\nfalse\n```\n\n#### <a name=\"Semigroup\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L851\">`Semigroup :: TypeClass`</a>\n\n`TypeClass` value for [Semigroup][].\n\n```javascript\n> Z.Semigroup.test ('')\ntrue\n\n> Z.Semigroup.test (0)\nfalse\n```\n\n#### <a name=\"Monoid\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L873\">`Monoid :: TypeClass`</a>\n\n`TypeClass` value for [Monoid][].\n\n```javascript\n> Z.Monoid.test ('')\ntrue\n\n> Z.Monoid.test (0)\nfalse\n```\n\n#### <a name=\"Group\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L895\">`Group :: TypeClass`</a>\n\n`TypeClass` value for [Group][].\n\n```javascript\n> Z.Group.test (Sum (0))\ntrue\n\n> Z.Group.test ('')\nfalse\n```\n\n#### <a name=\"Filterable\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L913\">`Filterable :: TypeClass`</a>\n\n`TypeClass` value for [Filterable][].\n\n```javascript\n> Z.Filterable.test ({})\ntrue\n\n> Z.Filterable.test ('')\nfalse\n```\n\n#### <a name=\"Functor\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L934\">`Functor :: TypeClass`</a>\n\n`TypeClass` value for [Functor][].\n\n```javascript\n> Z.Functor.test ([])\ntrue\n\n> Z.Functor.test ('')\nfalse\n```\n\n#### <a name=\"Bifunctor\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L956\">`Bifunctor :: TypeClass`</a>\n\n`TypeClass` value for [Bifunctor][].\n\n```javascript\n> Z.Bifunctor.test (Pair ('foo') (64))\ntrue\n\n> Z.Bifunctor.test ([])\nfalse\n```\n\n#### <a name=\"Profunctor\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L974\">`Profunctor :: TypeClass`</a>\n\n`TypeClass` value for [Profunctor][].\n\n```javascript\n> Z.Profunctor.test (Math.sqrt)\ntrue\n\n> Z.Profunctor.test ([])\nfalse\n```\n\n#### <a name=\"Apply\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L994\">`Apply :: TypeClass`</a>\n\n`TypeClass` value for [Apply][].\n\n```javascript\n> Z.Apply.test ([])\ntrue\n\n> Z.Apply.test ('')\nfalse\n```\n\n#### <a name=\"Applicative\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1016\">`Applicative :: TypeClass`</a>\n\n`TypeClass` value for [Applicative][].\n\n```javascript\n> Z.Applicative.test ([])\ntrue\n\n> Z.Applicative.test ({})\nfalse\n```\n\n#### <a name=\"Chain\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1037\">`Chain :: TypeClass`</a>\n\n`TypeClass` value for [Chain][].\n\n```javascript\n> Z.Chain.test ([])\ntrue\n\n> Z.Chain.test ({})\nfalse\n```\n\n#### <a name=\"ChainRec\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1058\">`ChainRec :: TypeClass`</a>\n\n`TypeClass` value for [ChainRec][].\n\n```javascript\n> Z.ChainRec.test ([])\ntrue\n\n> Z.ChainRec.test ({})\nfalse\n```\n\n#### <a name=\"Monad\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1079\">`Monad :: TypeClass`</a>\n\n`TypeClass` value for [Monad][].\n\n```javascript\n> Z.Monad.test ([])\ntrue\n\n> Z.Monad.test ({})\nfalse\n```\n\n#### <a name=\"Alt\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1092\">`Alt :: TypeClass`</a>\n\n`TypeClass` value for [Alt][].\n\n```javascript\n> Z.Alt.test ({})\ntrue\n\n> Z.Alt.test ('')\nfalse\n```\n\n#### <a name=\"Plus\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1113\">`Plus :: TypeClass`</a>\n\n`TypeClass` value for [Plus][].\n\n```javascript\n> Z.Plus.test ({})\ntrue\n\n> Z.Plus.test ('')\nfalse\n```\n\n#### <a name=\"Alternative\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1134\">`Alternative :: TypeClass`</a>\n\n`TypeClass` value for [Alternative][].\n\n```javascript\n> Z.Alternative.test ([])\ntrue\n\n> Z.Alternative.test ({})\nfalse\n```\n\n#### <a name=\"Foldable\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1147\">`Foldable :: TypeClass`</a>\n\n`TypeClass` value for [Foldable][].\n\n```javascript\n> Z.Foldable.test ({})\ntrue\n\n> Z.Foldable.test ('')\nfalse\n```\n\n#### <a name=\"Traversable\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1168\">`Traversable :: TypeClass`</a>\n\n`TypeClass` value for [Traversable][].\n\n```javascript\n> Z.Traversable.test ([])\ntrue\n\n> Z.Traversable.test ('')\nfalse\n```\n\n#### <a name=\"Extend\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1189\">`Extend :: TypeClass`</a>\n\n`TypeClass` value for [Extend][].\n\n```javascript\n> Z.Extend.test ([])\ntrue\n\n> Z.Extend.test ({})\nfalse\n```\n\n#### <a name=\"Comonad\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1210\">`Comonad :: TypeClass`</a>\n\n`TypeClass` value for [Comonad][].\n\n```javascript\n> Z.Comonad.test (Identity (0))\ntrue\n\n> Z.Comonad.test ([])\nfalse\n```\n\n#### <a name=\"Contravariant\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1228\">`Contravariant :: TypeClass`</a>\n\n`TypeClass` value for [Contravariant][].\n\n```javascript\n> Z.Contravariant.test (Math.sqrt)\ntrue\n\n> Z.Contravariant.test ([])\nfalse\n```\n\n#### <a name=\"equals\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1248\">`equals :: (a, b) -⁠> Boolean`</a>\n\nReturns `true` if its arguments are equal; `false` otherwise.\n\nSpecifically:\n\n  - Arguments with different [type identities][] are unequal.\n\n  - If the first argument has a [`fantasy-land/equals`][] method,\n    that method is invoked to determine whether the arguments are\n    equal (`fantasy-land/equals` implementations are provided for the\n    following built-in types: Null, Undefined, Boolean, Number, Date,\n    RegExp, String, Array, Arguments, Error, Object, and Function).\n\n  - Otherwise, the arguments are equal if their\n    [entries][`Object.entries`] are equal (according to this algorithm).\n\nThe algorithm supports circular data structures. Two arrays are equal\nif they have the same index paths and for each path have equal values.\nTwo arrays which represent `[1, [1, [1, [1, [1, ...]]]]]`, for example,\nare equal even if their internal structures differ. Two objects are equal\nif they have the same property paths and for each path have equal values.\n\n```javascript\n> Z.equals (0, -0)\ntrue\n\n> Z.equals (NaN, NaN)\ntrue\n\n> Z.equals (Cons (1, Cons (2, Nil)), Cons (1, Cons (2, Nil)))\ntrue\n\n> Z.equals (Cons (1, Cons (2, Nil)), Cons (2, Cons (1, Nil)))\nfalse\n```\n\n#### <a name=\"lt\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1308\">`lt :: (a, b) -⁠> Boolean`</a>\n\nReturns `true` if its arguments are of the same type and the first is\nless than the second according to the type's [`fantasy-land/lte`][]\nmethod; `false` otherwise.\n\nThis function is derived from [`lte`](#lte).\n\nSee also [`gt`](#gt) and [`gte`](#gte).\n\n```javascript\n> Z.lt (0, 0)\nfalse\n\n> Z.lt (0, 1)\ntrue\n\n> Z.lt (1, 0)\nfalse\n```\n\n#### <a name=\"lte\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1330\">`lte :: (a, b) -⁠> Boolean`</a>\n\nReturns `true` if its arguments are of the same type and the first\nis less than or equal to the second according to the type's\n[`fantasy-land/lte`][] method; `false` otherwise.\n\n`fantasy-land/lte` implementations are provided for the following\nbuilt-in types: Null, Undefined, Boolean, Number, Date, String, Array,\nArguments, and Object.\n\nThe algorithm supports circular data structures in the same manner as\n[`equals`](#equals).\n\nSee also [`lt`](#lt), [`gt`](#gt), and [`gte`](#gte).\n\n```javascript\n> Z.lte (0, 0)\ntrue\n\n> Z.lte (0, 1)\ntrue\n\n> Z.lte (1, 0)\nfalse\n```\n\n#### <a name=\"gt\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1377\">`gt :: (a, b) -⁠> Boolean`</a>\n\nReturns `true` if its arguments are of the same type and the first is\ngreater than the second according to the type's [`fantasy-land/lte`][]\nmethod; `false` otherwise.\n\nThis function is derived from [`lte`](#lte).\n\nSee also [`lt`](#lt) and [`gte`](#gte).\n\n```javascript\n> Z.gt (0, 0)\nfalse\n\n> Z.gt (0, 1)\nfalse\n\n> Z.gt (1, 0)\ntrue\n```\n\n#### <a name=\"gte\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1399\">`gte :: (a, b) -⁠> Boolean`</a>\n\nReturns `true` if its arguments are of the same type and the first\nis greater than or equal to the second according to the type's\n[`fantasy-land/lte`][] method; `false` otherwise.\n\nThis function is derived from [`lte`](#lte).\n\nSee also [`lt`](#lt) and [`gt`](#gt).\n\n```javascript\n> Z.gte (0, 0)\ntrue\n\n> Z.gte (0, 1)\nfalse\n\n> Z.gte (1, 0)\ntrue\n```\n\n#### <a name=\"min\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1421\">`min :: Ord a => (a, a) -⁠> a`</a>\n\nReturns the smaller of its two arguments.\n\nThis function is derived from [`lte`](#lte).\n\nSee also [`max`](#max).\n\n```javascript\n> Z.min (10, 2)\n2\n\n> Z.min (new Date ('1999-12-31'), new Date ('2000-01-01'))\nnew Date ('1999-12-31')\n\n> Z.min ('10', '2')\n'10'\n```\n\n#### <a name=\"max\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1441\">`max :: Ord a => (a, a) -⁠> a`</a>\n\nReturns the larger of its two arguments.\n\nThis function is derived from [`lte`](#lte).\n\nSee also [`min`](#min).\n\n```javascript\n> Z.max (10, 2)\n10\n\n> Z.max (new Date ('1999-12-31'), new Date ('2000-01-01'))\nnew Date ('2000-01-01')\n\n> Z.max ('10', '2')\n'2'\n```\n\n#### <a name=\"clamp\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1461\">`clamp :: Ord a => (a, a, a) -⁠> a`</a>\n\nTakes a lower bound, an upper bound, and a value of the same type.\nReturns the value if it is within the bounds; the nearer bound otherwise.\n\nThis function is derived from [`min`](#min) and [`max`](#max).\n\n```javascript\n> Z.clamp (0, 100, 42)\n42\n\n> Z.clamp (0, 100, -1)\n0\n\n> Z.clamp ('A', 'Z', '~')\n'Z'\n```\n\n#### <a name=\"compose\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1480\">`compose :: Semigroupoid c => (c j k, c i j) -⁠> c i k`</a>\n\nFunction wrapper for [`fantasy-land/compose`][].\n\n`fantasy-land/compose` implementations are provided for the following\nbuilt-in types: Function.\n\n```javascript\n> Z.compose (Math.sqrt, x => x + 1) (99)\n10\n```\n\n#### <a name=\"id\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1493\">`id :: Category c => TypeRep c -⁠> c`</a>\n\nFunction wrapper for [`fantasy-land/id`][].\n\n`fantasy-land/id` implementations are provided for the following\nbuilt-in types: Function.\n\n```javascript\n> Z.id (Function) ('foo')\n'foo'\n```\n\n#### <a name=\"concat\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1506\">`concat :: Semigroup a => (a, a) -⁠> a`</a>\n\nFunction wrapper for [`fantasy-land/concat`][].\n\n`fantasy-land/concat` implementations are provided for the following\nbuilt-in types: String, Array, and Object.\n\n```javascript\n> Z.concat ('abc', 'def')\n'abcdef'\n\n> Z.concat ([1, 2, 3], [4, 5, 6])\n[1, 2, 3, 4, 5, 6]\n\n> Z.concat ({x: 1, y: 2}, {y: 3, z: 4})\n{x: 1, y: 3, z: 4}\n\n> Z.concat (Cons ('foo', Cons ('bar', Cons ('baz', Nil))), Cons ('quux', Nil))\nCons ('foo', Cons ('bar', Cons ('baz', Cons ('quux', Nil))))\n```\n\n#### <a name=\"empty\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1528\">`empty :: Monoid m => TypeRep m -⁠> m`</a>\n\nFunction wrapper for [`fantasy-land/empty`][].\n\n`fantasy-land/empty` implementations are provided for the following\nbuilt-in types: String, Array, and Object.\n\n```javascript\n> Z.empty (String)\n''\n\n> Z.empty (Array)\n[]\n\n> Z.empty (Object)\n{}\n\n> Z.empty (List)\nNil\n```\n\n#### <a name=\"invert\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1550\">`invert :: Group g => g -⁠> g`</a>\n\nFunction wrapper for [`fantasy-land/invert`][].\n\n```javascript\n> Z.invert (Sum (5))\nSum (-5)\n```\n\n#### <a name=\"filter\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1560\">`filter :: Filterable f => (a -⁠> Boolean, f a) -⁠> f a`</a>\n\nFunction wrapper for [`fantasy-land/filter`][]. Discards every element\nwhich does not satisfy the predicate.\n\n`fantasy-land/filter` implementations are provided for the following\nbuilt-in types: Array and Object.\n\nSee also [`reject`](#reject).\n\n```javascript\n> Z.filter (x => x % 2 == 1, [1, 2, 3])\n[1, 3]\n\n> Z.filter (x => x % 2 == 1, {x: 1, y: 2, z: 3})\n{x: 1, z: 3}\n\n> Z.filter (x => x % 2 == 1, Cons (1, Cons (2, Cons (3, Nil))))\nCons (1, Cons (3, Nil))\n\n> Z.filter (x => x % 2 == 1, Nothing)\nNothing\n\n> Z.filter (x => x % 2 == 1, Just (0))\nNothing\n\n> Z.filter (x => x % 2 == 1, Just (1))\nJust (1)\n```\n\n#### <a name=\"reject\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1591\">`reject :: Filterable f => (a -⁠> Boolean, f a) -⁠> f a`</a>\n\nDiscards every element which satisfies the predicate.\n\nThis function is derived from [`filter`](#filter).\n\n```javascript\n> Z.reject (x => x % 2 == 1, [1, 2, 3])\n[2]\n\n> Z.reject (x => x % 2 == 1, {x: 1, y: 2, z: 3})\n{y: 2}\n\n> Z.reject (x => x % 2 == 1, Cons (1, Cons (2, Cons (3, Nil))))\nCons (2, Nil)\n\n> Z.reject (x => x % 2 == 1, Nothing)\nNothing\n\n> Z.reject (x => x % 2 == 1, Just (0))\nJust (0)\n\n> Z.reject (x => x % 2 == 1, Just (1))\nNothing\n```\n\n#### <a name=\"map\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1618\">`map :: Functor f => (a -⁠> b, f a) -⁠> f b`</a>\n\nFunction wrapper for [`fantasy-land/map`][].\n\n`fantasy-land/map` implementations are provided for the following\nbuilt-in types: Array, Object, and Function.\n\n```javascript\n> Z.map (Math.sqrt, [1, 4, 9])\n[1, 2, 3]\n\n> Z.map (Math.sqrt, {x: 1, y: 4, z: 9})\n{x: 1, y: 2, z: 3}\n\n> Z.map (Math.sqrt, s => s.length) ('Sanctuary')\n3\n\n> Z.map (Math.sqrt, Pair ('foo') (64))\nPair ('foo') (8)\n\n> Z.map (Math.sqrt, Nil)\nNil\n\n> Z.map (Math.sqrt, Cons (1, Cons (4, Cons (9, Nil))))\nCons (1, Cons (2, Cons (3, Nil)))\n```\n\n#### <a name=\"flip\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1646\">`flip :: Functor f => (f (a -⁠> b), a) -⁠> f b`</a>\n\nMaps over the given functions, applying each to the given value.\n\nThis function is derived from [`map`](#map).\n\n```javascript\n> Z.flip (x => y => x + y, '!') ('foo')\n'foo!'\n\n> Z.flip ([Math.floor, Math.ceil], 1.5)\n[1, 2]\n\n> Z.flip ({floor: Math.floor, ceil: Math.ceil}, 1.5)\n{floor: 1, ceil: 2}\n\n> Z.flip (Cons (Math.floor, Cons (Math.ceil, Nil)), 1.5)\nCons (1, Cons (2, Nil))\n```\n\n#### <a name=\"bimap\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1667\">`bimap :: Bifunctor f => (a -⁠> b, c -⁠> d, f a c) -⁠> f b d`</a>\n\nFunction wrapper for [`fantasy-land/bimap`][].\n\n```javascript\n> Z.bimap (s => s.toUpperCase (), Math.sqrt, Pair ('foo') (64))\nPair ('FOO') (8)\n```\n\n#### <a name=\"mapLeft\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1677\">`mapLeft :: Bifunctor f => (a -⁠> b, f a c) -⁠> f b c`</a>\n\nMaps the given function over the left side of a Bifunctor.\n\n```javascript\n> Z.mapLeft (Math.sqrt, Pair (64) (9))\nPair (8) (9)\n```\n\n#### <a name=\"promap\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1687\">`promap :: Profunctor p => (a -⁠> b, c -⁠> d, p b c) -⁠> p a d`</a>\n\nFunction wrapper for [`fantasy-land/promap`][].\n\n`fantasy-land/promap` implementations are provided for the following\nbuilt-in types: Function.\n\n```javascript\n> Z.promap (Math.abs, x => x + 1, Math.sqrt) (-100)\n11\n```\n\n#### <a name=\"ap\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1700\">`ap :: Apply f => (f (a -⁠> b), f a) -⁠> f b`</a>\n\nFunction wrapper for [`fantasy-land/ap`][].\n\n`fantasy-land/ap` implementations are provided for the following\nbuilt-in types: Array, Object, and Function.\n\n```javascript\n> Z.ap ([Math.sqrt, x => x * x], [1, 4, 9, 16, 25])\n[1, 2, 3, 4, 5, 1, 16, 81, 256, 625]\n\n> Z.ap ({a: Math.sqrt, b: x => x * x}, {a: 16, b: 10, c: 1})\n{a: 4, b: 100}\n\n> Z.ap (s => n => s.slice (0, n), s => Math.ceil (s.length / 2)) ('Haskell')\n'Hask'\n\n> Z.ap (Identity (Math.sqrt), Identity (64))\nIdentity (8)\n\n> Z.ap (Cons (Math.sqrt, Cons (x => x * x, Nil)), Cons (16, Cons (100, Nil)))\nCons (4, Cons (10, Cons (256, Cons (10000, Nil))))\n```\n\n#### <a name=\"lift2\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1725\">`lift2 :: Apply f => (a -⁠> b -⁠> c, f a, f b) -⁠> f c`</a>\n\nLifts `a -> b -> c` to `Apply f => f a -> f b -> f c` and returns the\nresult of applying this to the given arguments.\n\nThis function is derived from [`map`](#map) and [`ap`](#ap).\n\nSee also [`lift3`](#lift3).\n\n```javascript\n> Z.lift2 (x => y => Math.pow (x, y), [10], [1, 2, 3])\n[10, 100, 1000]\n\n> Z.lift2 (x => y => Math.pow (x, y), Identity (10), Identity (3))\nIdentity (1000)\n```\n\n#### <a name=\"lift3\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1743\">`lift3 :: Apply f => (a -⁠> b -⁠> c -⁠> d, f a, f b, f c) -⁠> f d`</a>\n\nLifts `a -> b -> c -> d` to `Apply f => f a -> f b -> f c -> f d` and\nreturns the result of applying this to the given arguments.\n\nThis function is derived from [`map`](#map) and [`ap`](#ap).\n\nSee also [`lift2`](#lift2).\n\n```javascript\n> Z.lift3 (x => y => z => x + z + y,\n.          ['<', '['],\n.          ['>', ']'],\n.          ['foo', 'bar', 'baz'])\n[ '<foo>', '<bar>', '<baz>',\n. '<foo]', '<bar]', '<baz]',\n. '[foo>', '[bar>', '[baz>',\n. '[foo]', '[bar]', '[baz]' ]\n\n> Z.lift3 (x => y => z => x + z + y,\n.          Identity ('<'),\n.          Identity ('>'),\n.          Identity ('baz'))\nIdentity ('<baz>')\n```\n\n#### <a name=\"apFirst\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1770\">`apFirst :: Apply f => (f a, f b) -⁠> f a`</a>\n\nCombines two effectful actions, keeping only the result of the first.\nEquivalent to Haskell's `(<*)` function.\n\nThis function is derived from [`lift2`](#lift2).\n\nSee also [`apSecond`](#apSecond).\n\n```javascript\n> Z.apFirst ([1, 2], [3, 4])\n[1, 1, 2, 2]\n\n> Z.apFirst (Identity (1), Identity (2))\nIdentity (1)\n```\n\n#### <a name=\"apSecond\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1788\">`apSecond :: Apply f => (f a, f b) -⁠> f b`</a>\n\nCombines two effectful actions, keeping only the result of the second.\nEquivalent to Haskell's `(*>)` function.\n\nThis function is derived from [`lift2`](#lift2).\n\nSee also [`apFirst`](#apFirst).\n\n```javascript\n> Z.apSecond ([1, 2], [3, 4])\n[3, 4, 3, 4]\n\n> Z.apSecond (Identity (1), Identity (2))\nIdentity (2)\n```\n\n#### <a name=\"of\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1806\">`of :: Applicative f => (TypeRep f, a) -⁠> f a`</a>\n\nFunction wrapper for [`fantasy-land/of`][].\n\n`fantasy-land/of` implementations are provided for the following\nbuilt-in types: Array and Function.\n\n```javascript\n> Z.of (Array, 42)\n[42]\n\n> Z.of (Function, 42) (null)\n42\n\n> Z.of (List, 42)\nCons (42, Nil)\n```\n\n#### <a name=\"append\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1825\">`append :: (Applicative f, Semigroup (f a)) => (a, f a) -⁠> f a`</a>\n\nReturns the result of appending the first argument to the second.\n\nThis function is derived from [`concat`](#concat) and [`of`](#of).\n\nSee also [`prepend`](#prepend).\n\n```javascript\n> Z.append (3, [1, 2])\n[1, 2, 3]\n\n> Z.append (3, Cons (1, Cons (2, Nil)))\nCons (1, Cons (2, Cons (3, Nil)))\n```\n\n#### <a name=\"prepend\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1842\">`prepend :: (Applicative f, Semigroup (f a)) => (a, f a) -⁠> f a`</a>\n\nReturns the result of prepending the first argument to the second.\n\nThis function is derived from [`concat`](#concat) and [`of`](#of).\n\nSee also [`append`](#append).\n\n```javascript\n> Z.prepend (1, [2, 3])\n[1, 2, 3]\n\n> Z.prepend (1, Cons (2, Cons (3, Nil)))\nCons (1, Cons (2, Cons (3, Nil)))\n```\n\n#### <a name=\"chain\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1859\">`chain :: Chain m => (a -⁠> m b, m a) -⁠> m b`</a>\n\nFunction wrapper for [`fantasy-land/chain`][].\n\n`fantasy-land/chain` implementations are provided for the following\nbuilt-in types: Array and Function.\n\n```javascript\n> Z.chain (x => [x, x], [1, 2, 3])\n[1, 1, 2, 2, 3, 3]\n\n> Z.chain (x => x % 2 == 1 ? Z.of (List, x) : Nil,\n.          Cons (1, Cons (2, Cons (3, Nil))))\nCons (1, Cons (3, Nil))\n\n> Z.chain (n => s => s.slice (0, n),\n.          s => Math.ceil (s.length / 2))\n.         ('Haskell')\n'Hask'\n```\n\n#### <a name=\"join\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1881\">`join :: Chain m => m (m a) -⁠> m a`</a>\n\nRemoves one level of nesting from a nested monadic structure.\n\nThis function is derived from [`chain`](#chain).\n\n```javascript\n> Z.join ([[1], [2], [3]])\n[1, 2, 3]\n\n> Z.join ([[[1, 2, 3]]])\n[[1, 2, 3]]\n\n> Z.join (Identity (Identity (1)))\nIdentity (1)\n```\n\n#### <a name=\"chainRec\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1899\">`chainRec :: ChainRec m => (TypeRep m, (a -⁠> c, b -⁠> c, a) -⁠> m c, a) -⁠> m b`</a>\n\nFunction wrapper for [`fantasy-land/chainRec`][].\n\n`fantasy-land/chainRec` implementations are provided for the following\nbuilt-in types: Array.\n\n```javascript\n> Z.chainRec (\n.   Array,\n.   (next, done, s) => s.length == 2 ? [s + '!', s + '?'].map (done)\n.                                    : [s + 'o', s + 'n'].map (next),\n.   ''\n. )\n['oo!', 'oo?', 'on!', 'on?', 'no!', 'no?', 'nn!', 'nn?']\n```\n\n#### <a name=\"alt\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1917\">`alt :: Alt f => (f a, f a) -⁠> f a`</a>\n\nFunction wrapper for [`fantasy-land/alt`][].\n\n`fantasy-land/alt` implementations are provided for the following\nbuilt-in types: Array and Object.\n\n```javascript\n> Z.alt ([1, 2, 3], [4, 5, 6])\n[1, 2, 3, 4, 5, 6]\n\n> Z.alt (Nothing, Nothing)\nNothing\n\n> Z.alt (Nothing, Just (1))\nJust (1)\n\n> Z.alt (Just (2), Just (3))\nJust (2)\n```\n\n#### <a name=\"zero\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1939\">`zero :: Plus f => TypeRep f -⁠> f a`</a>\n\nFunction wrapper for [`fantasy-land/zero`][].\n\n`fantasy-land/zero` implementations are provided for the following\nbuilt-in types: Array and Object.\n\n```javascript\n> Z.zero (Array)\n[]\n\n> Z.zero (Object)\n{}\n\n> Z.zero (Maybe)\nNothing\n```\n\n#### <a name=\"reduce\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1958\">`reduce :: Foldable f => ((b, a) -⁠> b, b, f a) -⁠> b`</a>\n\nFunction wrapper for [`fantasy-land/reduce`][].\n\n`fantasy-land/reduce` implementations are provided for the following\nbuilt-in types: Array and Object.\n\n```javascript\n> Z.reduce ((xs, x) => [x].concat (xs), [], [1, 2, 3])\n[3, 2, 1]\n\n> Z.reduce (Z.concat, '', Cons ('foo', Cons ('bar', Cons ('baz', Nil))))\n'foobarbaz'\n\n> Z.reduce (Z.concat, '', {foo: 'x', bar: 'y', baz: 'z'})\n'yzx'\n```\n\n#### <a name=\"size\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L1977\">`size :: Foldable f => f a -⁠> Integer`</a>\n\nReturns the number of elements of the given structure.\n\nThis function is derived from [`reduce`](#reduce).\n\n```javascript\n> Z.size ([])\n0\n\n> Z.size (['foo', 'bar', 'baz'])\n3\n\n> Z.size (Nil)\n0\n\n> Z.size (Cons ('foo', Cons ('bar', Cons ('baz', Nil))))\n3\n```\n\n#### <a name=\"all\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2002\">`all :: Foldable f => (a -⁠> Boolean, f a) -⁠> Boolean`</a>\n\nReturns `true` if all the elements of the structure satisfy the\npredicate; `false` otherwise.\n\nThis function is derived from [`reduce`](#reduce).\n\nSee also [`any`](#any) and [`none`](#none).\n\n```javascript\n> Z.all (Number.isInteger, [])\ntrue\n\n> Z.all (Number.isInteger, [1, 2, 3])\ntrue\n\n> Z.all (Number.isInteger, [0, 0.25, 0.5, 0.75, 1])\nfalse\n```\n\n#### <a name=\"any\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2027\">`any :: Foldable f => (a -⁠> Boolean, f a) -⁠> Boolean`</a>\n\nReturns `true` if any element of the structure satisfies the predicate;\n`false` otherwise.\n\nThis function is derived from [`reduce`](#reduce).\n\nSee also [`all`](#all) and [`none`](#none).\n\n```javascript\n> Z.any (Number.isInteger, [])\nfalse\n\n> Z.any (Number.isInteger, [1, 2, 3])\ntrue\n\n> Z.any (Number.isInteger, [0, 0.25, 0.5, 0.75, 1])\ntrue\n```\n\n#### <a name=\"none\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2052\">`none :: Foldable f => (a -⁠> Boolean, f a) -⁠> Boolean`</a>\n\nReturns `true` if none of the elements of the structure satisfies the\npredicate; `false` otherwise.\n\nThis function is derived from [`any`](#any). `Z.none (pred, foldable)` is\nequivalent to `!(Z.any (pred, foldable))`.\n\nSee also [`all`](#all).\n\n```javascript\n> Z.none (Number.isInteger, [])\ntrue\n\n> Z.none (Number.isInteger, [0, 0.25, 0.5, 0.75, 1])\nfalse\n```\n\n#### <a name=\"elem\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2071\">`elem :: (Setoid a, Foldable f) => (a, f a) -⁠> Boolean`</a>\n\nTakes a value and a structure and returns `true` if the\nvalue is an element of the structure; `false` otherwise.\n\nThis function is derived from [`equals`](#equals) and\n[`reduce`](#reduce).\n\n```javascript\n> Z.elem ('c', ['a', 'b', 'c'])\ntrue\n\n> Z.elem ('x', ['a', 'b', 'c'])\nfalse\n\n> Z.elem (3, {x: 1, y: 2, z: 3})\ntrue\n\n> Z.elem (8, {x: 1, y: 2, z: 3})\nfalse\n\n> Z.elem (0, Just (0))\ntrue\n\n> Z.elem (0, Just (1))\nfalse\n\n> Z.elem (0, Nothing)\nfalse\n```\n\n#### <a name=\"intercalate\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2103\">`intercalate :: (Monoid m, Foldable f) => (m, f m) -⁠> m`</a>\n\nConcatenates the elements of the given structure, separating each pair\nof adjacent elements with the given separator.\n\nThis function is derived from [`concat`](#concat), [`empty`](#empty),\nand [`reduce`](#reduce).\n\n```javascript\n> Z.intercalate (', ', [])\n''\n\n> Z.intercalate (', ', ['foo', 'bar', 'baz'])\n'foo, bar, baz'\n\n> Z.intercalate (', ', Nil)\n''\n\n> Z.intercalate (', ', Cons ('foo', Cons ('bar', Cons ('baz', Nil))))\n'foo, bar, baz'\n\n> Z.intercalate ([0, 0, 0], [])\n[]\n\n> Z.intercalate ([0, 0, 0], [[1], [2, 3], [4, 5, 6], [7, 8], [9]])\n[1, 0, 0, 0, 2, 3, 0, 0, 0, 4, 5, 6, 0, 0, 0, 7, 8, 0, 0, 0, 9]\n```\n\n#### <a name=\"foldMap\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2142\">`foldMap :: (Monoid m, Foldable f) => (TypeRep m, a -⁠> m, f a) -⁠> m`</a>\n\nDeconstructs a foldable by mapping every element to a monoid and\nconcatenating the results.\n\nThis function is derived from [`concat`](#concat), [`empty`](#empty),\nand [`reduce`](#reduce).\n\n```javascript\n> Z.foldMap (String, f => f.name, [Math.sin, Math.cos, Math.tan])\n'sincostan'\n```\n\n#### <a name=\"reverse\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2162\">`reverse :: (Applicative f, Foldable f, Monoid (f a)) => f a -⁠> f a`</a>\n\nReverses the elements of the given structure.\n\nThis function is derived from [`concat`](#concat), [`empty`](#empty),\n[`of`](#of), and [`reduce`](#reduce).\n\n```javascript\n> Z.reverse ([1, 2, 3])\n[3, 2, 1]\n\n> Z.reverse (Cons (1, Cons (2, Cons (3, Nil))))\nCons (3, Cons (2, Cons (1, Nil)))\n```\n\n#### <a name=\"sort\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2187\">`sort :: (Ord a, Applicative f, Foldable f, Monoid (f a)) => f a -⁠> f a`</a>\n\nPerforms a [stable sort][] of the elements of the given structure,\nusing [`lte`](#lte) for comparisons.\n\nThis function is derived from [`lte`](#lte), [`concat`](#concat),\n[`empty`](#empty), [`of`](#of), and [`reduce`](#reduce).\n\nSee also [`sortBy`](#sortBy).\n\n```javascript\n> Z.sort (['foo', 'bar', 'baz'])\n['bar', 'baz', 'foo']\n\n> Z.sort ([Just (2), Nothing, Just (1)])\n[Nothing, Just (1), Just (2)]\n\n> Z.sort (Cons ('foo', Cons ('bar', Cons ('baz', Nil))))\nCons ('bar', Cons ('baz', Cons ('foo', Nil)))\n```\n\n#### <a name=\"sortBy\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2209\">`sortBy :: (Ord b, Applicative f, Foldable f, Monoid (f a)) => (a -⁠> b, f a) -⁠> f a`</a>\n\nPerforms a [stable sort][] of the elements of the given structure,\nusing [`lte`](#lte) to compare the values produced by applying the\ngiven function to each element of the structure.\n\nThis function is derived from [`lte`](#lte), [`concat`](#concat),\n[`empty`](#empty), [`of`](#of), and [`reduce`](#reduce).\n\nSee also [`sort`](#sort).\n\n```javascript\n> Z.sortBy (s => s.length, ['red', 'green', 'blue'])\n['red', 'blue', 'green']\n\n> Z.sortBy (s => s.length, ['black', 'white'])\n['black', 'white']\n\n> Z.sortBy (s => s.length, ['white', 'black'])\n['white', 'black']\n\n> Z.sortBy (s => s.length, Cons ('red', Cons ('green', Cons ('blue', Nil))))\nCons ('red', Cons ('blue', Cons ('green', Nil)))\n```\n\n#### <a name=\"traverse\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2264\">`traverse :: (Applicative f, Traversable t) => (TypeRep f, a -⁠> f b, t a) -⁠> f (t b)`</a>\n\nFunction wrapper for [`fantasy-land/traverse`][].\n\n`fantasy-land/traverse` implementations are provided for the following\nbuilt-in types: Array and Object.\n\nSee also [`sequence`](#sequence).\n\n```javascript\n> Z.traverse (Array, x => x, [[1, 2, 3], [4, 5]])\n[[1, 4], [1, 5], [2, 4], [2, 5], [3, 4], [3, 5]]\n\n> Z.traverse (Identity, x => Identity (x + 1), [1, 2, 3])\nIdentity ([2, 3, 4])\n```\n\n#### <a name=\"sequence\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2282\">`sequence :: (Applicative f, Traversable t) => (TypeRep f, t (f a)) -⁠> f (t a)`</a>\n\nInverts the given `t (f a)` to produce an `f (t a)`.\n\nThis function is derived from [`traverse`](#traverse).\n\n```javascript\n> Z.sequence (Array, Identity ([1, 2, 3]))\n[Identity (1), Identity (2), Identity (3)]\n\n> Z.sequence (Identity, [Identity (1), Identity (2), Identity (3)])\nIdentity ([1, 2, 3])\n```\n\n#### <a name=\"extend\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2299\">`extend :: Extend w => (w a -⁠> b, w a) -⁠> w b`</a>\n\nFunction wrapper for [`fantasy-land/extend`][].\n\n`fantasy-land/extend` implementations are provided for the following\nbuilt-in types: Array and Function.\n\n```javascript\n> Z.extend (ss => ss.join (''), ['x', 'y', 'z'])\n['xyz', 'yz', 'z']\n\n> Z.extend (f => f ([3, 4]), Z.reverse) ([1, 2])\n[4, 3, 2, 1]\n```\n\n#### <a name=\"duplicate\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2315\">`duplicate :: Extend w => w a -⁠> w (w a)`</a>\n\nAdds one level of nesting to a comonadic structure.\n\nThis function is derived from [`extend`](#extend).\n\n```javascript\n> Z.duplicate (Identity (1))\nIdentity (Identity (1))\n\n> Z.duplicate ([1])\n[[1]]\n\n> Z.duplicate ([1, 2, 3])\n[[1, 2, 3], [2, 3], [3]]\n\n> Z.duplicate (Z.reverse) ([1, 2]) ([3, 4])\n[4, 3, 2, 1]\n```\n\n#### <a name=\"extract\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2336\">`extract :: Comonad w => w a -⁠> a`</a>\n\nFunction wrapper for [`fantasy-land/extract`][].\n\n```javascript\n> Z.extract (Identity (42))\n42\n```\n\n#### <a name=\"contramap\" href=\"https://github.com/sanctuary-js/sanctuary-type-classes/blob/v13.0.0/index.js#L2346\">`contramap :: Contravariant f => (b -⁠> a, f a) -⁠> f b`</a>\n\nFunction wrapper for [`fantasy-land/contramap`][].\n\n`fantasy-land/contramap` implementations are provided for the following\nbuilt-in types: Function.\n\n```javascript\n> Z.contramap (s => s.length, Math.sqrt) ('Sanctuary')\n3\n```\n\n[Alt]:                      https://github.com/fantasyland/fantasy-land/tree/v5.0.0#alt\n[Alternative]:              https://github.com/fantasyland/fantasy-land/tree/v5.0.0#alternative\n[Applicative]:              https://github.com/fantasyland/fantasy-land/tree/v5.0.0#applicative\n[Apply]:                    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#apply\n[Bifunctor]:                https://github.com/fantasyland/fantasy-land/tree/v5.0.0#bifunctor\n[Category]:                 https://github.com/fantasyland/fantasy-land/tree/v5.0.0#category\n[Chain]:                    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#chain\n[ChainRec]:                 https://github.com/fantasyland/fantasy-land/tree/v5.0.0#chainrec\n[Comonad]:                  https://github.com/fantasyland/fantasy-land/tree/v5.0.0#comonad\n[Contravariant]:            https://github.com/fantasyland/fantasy-land/tree/v5.0.0#contravariant\n[Extend]:                   https://github.com/fantasyland/fantasy-land/tree/v5.0.0#extend\n[FL]:                       https://github.com/fantasyland/fantasy-land/tree/v5.0.0\n[Filterable]:               https://github.com/fantasyland/fantasy-land/tree/v5.0.0#filterable\n[Foldable]:                 https://github.com/fantasyland/fantasy-land/tree/v5.0.0#foldable\n[Functor]:                  https://github.com/fantasyland/fantasy-land/tree/v5.0.0#functor\n[Group]:                    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#group\n[Monad]:                    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#monad\n[Monoid]:                   https://github.com/fantasyland/fantasy-land/tree/v5.0.0#monoid\n[Ord]:                      https://github.com/fantasyland/fantasy-land/tree/v5.0.0#ord\n[Plus]:                     https://github.com/fantasyland/fantasy-land/tree/v5.0.0#plus\n[Profunctor]:               https://github.com/fantasyland/fantasy-land/tree/v5.0.0#profunctor\n[Semigroup]:                https://github.com/fantasyland/fantasy-land/tree/v5.0.0#semigroup\n[Semigroupoid]:             https://github.com/fantasyland/fantasy-land/tree/v5.0.0#semigroupoid\n[Setoid]:                   https://github.com/fantasyland/fantasy-land/tree/v5.0.0#setoid\n[Traversable]:              https://github.com/fantasyland/fantasy-land/tree/v5.0.0#traversable\n[`Object.entries`]:         https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries\n[`fantasy-land/alt`]:       https://github.com/fantasyland/fantasy-land/tree/v5.0.0#alt-method\n[`fantasy-land/ap`]:        https://github.com/fantasyland/fantasy-land/tree/v5.0.0#ap-method\n[`fantasy-land/bimap`]:     https://github.com/fantasyland/fantasy-land/tree/v5.0.0#bimap-method\n[`fantasy-land/chain`]:     https://github.com/fantasyland/fantasy-land/tree/v5.0.0#chain-method\n[`fantasy-land/chainRec`]:  https://github.com/fantasyland/fantasy-land/tree/v5.0.0#chainrec-method\n[`fantasy-land/compose`]:   https://github.com/fantasyland/fantasy-land/tree/v5.0.0#compose-method\n[`fantasy-land/concat`]:    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#concat-method\n[`fantasy-land/contramap`]: https://github.com/fantasyland/fantasy-land/tree/v5.0.0#contramap-method\n[`fantasy-land/empty`]:     https://github.com/fantasyland/fantasy-land/tree/v5.0.0#empty-method\n[`fantasy-land/equals`]:    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#equals-method\n[`fantasy-land/extend`]:    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#extend-method\n[`fantasy-land/extract`]:   https://github.com/fantasyland/fantasy-land/tree/v5.0.0#extract-method\n[`fantasy-land/filter`]:    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#filter-method\n[`fantasy-land/id`]:        https://github.com/fantasyland/fantasy-land/tree/v5.0.0#id-method\n[`fantasy-land/invert`]:    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#invert-method\n[`fantasy-land/lte`]:       https://github.com/fantasyland/fantasy-land/tree/v5.0.0#lte-method\n[`fantasy-land/map`]:       https://github.com/fantasyland/fantasy-land/tree/v5.0.0#map-method\n[`fantasy-land/of`]:        https://github.com/fantasyland/fantasy-land/tree/v5.0.0#of-method\n[`fantasy-land/promap`]:    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#promap-method\n[`fantasy-land/reduce`]:    https://github.com/fantasyland/fantasy-land/tree/v5.0.0#reduce-method\n[`fantasy-land/traverse`]:  https://github.com/fantasyland/fantasy-land/tree/v5.0.0#traverse-method\n[`fantasy-land/zero`]:      https://github.com/fantasyland/fantasy-land/tree/v5.0.0#zero-method\n[stable sort]:              https://en.wikipedia.org/wiki/Sorting_algorithm#Stability\n[type identities]:          https://github.com/sanctuary-js/sanctuary-type-identifiers/tree/v3.0.0\n[type-classes]:             https://github.com/sanctuary-js/sanctuary-def#type-classes\n","publish_time":1515086322878,"_cnpm_publish_time":1515086322878,"dist-tags":{"latest":"13.0.0"}}