版博士V2.0程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1 год назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. "use strict";
  2. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
  3. if (k2 === undefined) k2 = k;
  4. var desc = Object.getOwnPropertyDescriptor(m, k);
  5. if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
  6. desc = { enumerable: true, get: function() { return m[k]; } };
  7. }
  8. Object.defineProperty(o, k2, desc);
  9. }) : (function(o, m, k, k2) {
  10. if (k2 === undefined) k2 = k;
  11. o[k2] = m[k];
  12. }));
  13. var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
  14. Object.defineProperty(o, "default", { enumerable: true, value: v });
  15. }) : function(o, v) {
  16. o["default"] = v;
  17. });
  18. var __importStar = (this && this.__importStar) || function (mod) {
  19. if (mod && mod.__esModule) return mod;
  20. var result = {};
  21. if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  22. __setModuleDefault(result, mod);
  23. return result;
  24. };
  25. Object.defineProperty(exports, "__esModule", { value: true });
  26. exports.fromTaskK = exports.FromTask = exports.chainFirstReaderIOK = exports.chainFirstReaderIOKW = exports.chainReaderIOK = exports.chainReaderIOKW = exports.fromReaderIOK = exports.chainFirstReaderKW = exports.chainFirstReaderK = exports.chainReaderKW = exports.chainReaderK = exports.fromReaderK = exports.asks = exports.ask = exports.FromReader = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.FromIO = exports.chainFirstW = exports.chainFirst = exports.MonadTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecond = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.Functor = exports.URI = exports.flatten = exports.flattenW = exports.chainW = exports.chain = exports.of = exports.apW = exports.ap = exports.map = exports.asksReaderTask = exports.asksReaderTaskW = exports.local = exports.fromReaderIO = exports.fromIO = exports.fromTask = exports.fromReader = void 0;
  27. exports.run = exports.getMonoid = exports.getSemigroup = exports.readerTaskSeq = exports.readerTask = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.chainFirstTaskK = exports.chainTaskK = void 0;
  28. /**
  29. * @since 2.3.0
  30. */
  31. var Applicative_1 = require("./Applicative");
  32. var Apply_1 = require("./Apply");
  33. var Chain_1 = require("./Chain");
  34. var FromIO_1 = require("./FromIO");
  35. var FromReader_1 = require("./FromReader");
  36. var FromTask_1 = require("./FromTask");
  37. var function_1 = require("./function");
  38. var Functor_1 = require("./Functor");
  39. var _ = __importStar(require("./internal"));
  40. var R = __importStar(require("./Reader"));
  41. var RT = __importStar(require("./ReaderT"));
  42. var T = __importStar(require("./Task"));
  43. // -------------------------------------------------------------------------------------
  44. // conversions
  45. // -------------------------------------------------------------------------------------
  46. /**
  47. * @category conversions
  48. * @since 2.3.0
  49. */
  50. exports.fromReader = RT.fromReader(T.Pointed);
  51. /**
  52. * @category conversions
  53. * @since 2.3.0
  54. */
  55. exports.fromTask = R.of;
  56. /**
  57. * @category conversions
  58. * @since 2.3.0
  59. */
  60. exports.fromIO = (0, function_1.flow)(T.fromIO, exports.fromTask);
  61. /**
  62. * @category conversions
  63. * @since 2.13.0
  64. */
  65. exports.fromReaderIO = R.map(T.fromIO);
  66. // -------------------------------------------------------------------------------------
  67. // combinators
  68. // -------------------------------------------------------------------------------------
  69. /**
  70. * Changes the value of the local context during the execution of the action `ma` (similar to `Contravariant`'s
  71. * `contramap`).
  72. *
  73. * @since 2.3.0
  74. */
  75. exports.local = R.local;
  76. /**
  77. * Less strict version of [`asksReaderTask`](#asksreadertask).
  78. *
  79. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  80. *
  81. * @category constructors
  82. * @since 2.11.0
  83. */
  84. exports.asksReaderTaskW = R.asksReaderW;
  85. /**
  86. * Effectfully accesses the environment.
  87. *
  88. * @category constructors
  89. * @since 2.11.0
  90. */
  91. exports.asksReaderTask = exports.asksReaderTaskW;
  92. var _map = function (fa, f) { return (0, function_1.pipe)(fa, (0, exports.map)(f)); };
  93. var _apPar = function (fab, fa) { return (0, function_1.pipe)(fab, (0, exports.ap)(fa)); };
  94. var _apSeq = function (fab, fa) {
  95. return (0, function_1.pipe)(fab, (0, exports.chain)(function (f) { return (0, function_1.pipe)(fa, (0, exports.map)(f)); }));
  96. };
  97. var _chain = function (ma, f) { return (0, function_1.pipe)(ma, (0, exports.chain)(f)); };
  98. /**
  99. * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F<A>) => F<B>` whose argument and return types
  100. * use the type constructor `F` to represent some computational context.
  101. *
  102. * @category mapping
  103. * @since 2.3.0
  104. */
  105. exports.map = RT.map(T.Functor);
  106. /**
  107. * @since 2.3.0
  108. */
  109. exports.ap =
  110. /*#__PURE__*/ RT.ap(T.ApplyPar);
  111. /**
  112. * Less strict version of [`ap`](#ap).
  113. *
  114. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  115. *
  116. * @since 2.8.0
  117. */
  118. exports.apW = exports.ap;
  119. /**
  120. * @category constructors
  121. * @since 2.3.0
  122. */
  123. exports.of = RT.of(T.Pointed);
  124. /**
  125. * Composes computations in sequence, using the return value of one computation to determine the next computation.
  126. *
  127. * @category sequencing
  128. * @since 2.3.0
  129. */
  130. exports.chain =
  131. /*#__PURE__*/ RT.chain(T.Monad);
  132. /**
  133. * Less strict version of [`chain`](#chain).
  134. *
  135. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  136. *
  137. * @category sequencing
  138. * @since 2.6.7
  139. */
  140. exports.chainW = exports.chain;
  141. /**
  142. * Less strict version of [`flatten`](#flatten).
  143. *
  144. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  145. *
  146. * @category sequencing
  147. * @since 2.11.0
  148. */
  149. exports.flattenW =
  150. /*#__PURE__*/ (0, exports.chainW)(function_1.identity);
  151. /**
  152. * @category sequencing
  153. * @since 2.3.0
  154. */
  155. exports.flatten = exports.flattenW;
  156. /**
  157. * @category type lambdas
  158. * @since 2.3.0
  159. */
  160. exports.URI = 'ReaderTask';
  161. /**
  162. * @category instances
  163. * @since 2.7.0
  164. */
  165. exports.Functor = {
  166. URI: exports.URI,
  167. map: _map
  168. };
  169. /**
  170. * @category mapping
  171. * @since 2.10.0
  172. */
  173. exports.flap = (0, Functor_1.flap)(exports.Functor);
  174. /**
  175. * @category instances
  176. * @since 2.10.0
  177. */
  178. exports.Pointed = {
  179. URI: exports.URI,
  180. of: exports.of
  181. };
  182. /**
  183. * Runs computations in parallel.
  184. *
  185. * @category instances
  186. * @since 2.10.0
  187. */
  188. exports.ApplyPar = {
  189. URI: exports.URI,
  190. map: _map,
  191. ap: _apPar
  192. };
  193. /**
  194. * Combine two effectful actions, keeping only the result of the first.
  195. *
  196. * @since 2.3.0
  197. */
  198. exports.apFirst = (0, Apply_1.apFirst)(exports.ApplyPar);
  199. /**
  200. * Combine two effectful actions, keeping only the result of the second.
  201. *
  202. * @since 2.3.0
  203. */
  204. exports.apSecond = (0, Apply_1.apSecond)(exports.ApplyPar);
  205. /**
  206. * Runs computations in parallel.
  207. *
  208. * @category instances
  209. * @since 2.7.0
  210. */
  211. exports.ApplicativePar = {
  212. URI: exports.URI,
  213. map: _map,
  214. ap: _apPar,
  215. of: exports.of
  216. };
  217. /**
  218. * Runs computations sequentially.
  219. *
  220. * @category instances
  221. * @since 2.10.0
  222. */
  223. exports.ApplySeq = {
  224. URI: exports.URI,
  225. map: _map,
  226. ap: _apSeq
  227. };
  228. /**
  229. * Runs computations sequentially.
  230. *
  231. * @category instances
  232. * @since 2.7.0
  233. */
  234. exports.ApplicativeSeq = {
  235. URI: exports.URI,
  236. map: _map,
  237. ap: _apSeq,
  238. of: exports.of
  239. };
  240. /**
  241. * @category instances
  242. * @since 2.10.0
  243. */
  244. exports.Chain = {
  245. URI: exports.URI,
  246. map: _map,
  247. ap: _apPar,
  248. chain: _chain
  249. };
  250. /**
  251. * @category instances
  252. * @since 2.10.0
  253. */
  254. exports.Monad = {
  255. URI: exports.URI,
  256. map: _map,
  257. of: exports.of,
  258. ap: _apPar,
  259. chain: _chain
  260. };
  261. /**
  262. * @category instances
  263. * @since 2.10.0
  264. */
  265. exports.MonadIO = {
  266. URI: exports.URI,
  267. map: _map,
  268. of: exports.of,
  269. ap: _apPar,
  270. chain: _chain,
  271. fromIO: exports.fromIO
  272. };
  273. /**
  274. * @category instances
  275. * @since 2.10.0
  276. */
  277. exports.MonadTask = {
  278. URI: exports.URI,
  279. map: _map,
  280. of: exports.of,
  281. ap: _apPar,
  282. chain: _chain,
  283. fromIO: exports.fromIO,
  284. fromTask: exports.fromTask
  285. };
  286. /**
  287. * Composes computations in sequence, using the return value of one computation to determine the next computation and
  288. * keeping only the result of the first.
  289. *
  290. * @category sequencing
  291. * @since 2.3.0
  292. */
  293. exports.chainFirst =
  294. /*#__PURE__*/ (0, Chain_1.chainFirst)(exports.Chain);
  295. /**
  296. * Less strict version of [`chainFirst`](#chainfirst).
  297. *
  298. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  299. *
  300. * @category sequencing
  301. * @since 2.11.0
  302. */
  303. exports.chainFirstW = exports.chainFirst;
  304. /**
  305. * @category instances
  306. * @since 2.10.0
  307. */
  308. exports.FromIO = {
  309. URI: exports.URI,
  310. fromIO: exports.fromIO
  311. };
  312. /**
  313. * @category lifting
  314. * @since 2.4.0
  315. */
  316. exports.fromIOK = (0, FromIO_1.fromIOK)(exports.FromIO);
  317. /**
  318. * @category sequencing
  319. * @since 2.4.0
  320. */
  321. exports.chainIOK =
  322. /*#__PURE__*/ (0, FromIO_1.chainIOK)(exports.FromIO, exports.Chain);
  323. /**
  324. * @category sequencing
  325. * @since 2.10.0
  326. */
  327. exports.chainFirstIOK =
  328. /*#__PURE__*/ (0, FromIO_1.chainFirstIOK)(exports.FromIO, exports.Chain);
  329. /**
  330. * @category instances
  331. * @since 2.11.0
  332. */
  333. exports.FromReader = {
  334. URI: exports.URI,
  335. fromReader: exports.fromReader
  336. };
  337. /**
  338. * Reads the current context.
  339. *
  340. * @category constructors
  341. * @since 2.3.0
  342. */
  343. exports.ask = (0, FromReader_1.ask)(exports.FromReader);
  344. /**
  345. * Projects a value from the global context in a `ReaderTask`.
  346. *
  347. * @category constructors
  348. * @since 2.3.0
  349. */
  350. exports.asks = (0, FromReader_1.asks)(exports.FromReader);
  351. /**
  352. * @category lifting
  353. * @since 2.11.0
  354. */
  355. exports.fromReaderK = (0, FromReader_1.fromReaderK)(exports.FromReader);
  356. /**
  357. * @category sequencing
  358. * @since 2.11.0
  359. */
  360. exports.chainReaderK =
  361. /*#__PURE__*/ (0, FromReader_1.chainReaderK)(exports.FromReader, exports.Chain);
  362. /**
  363. * Less strict version of [`chainReaderK`](#chainreaderk).
  364. *
  365. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  366. *
  367. * @category sequencing
  368. * @since 2.11.0
  369. */
  370. exports.chainReaderKW = exports.chainReaderK;
  371. /**
  372. * @category sequencing
  373. * @since 2.11.0
  374. */
  375. exports.chainFirstReaderK =
  376. /*#__PURE__*/ (0, FromReader_1.chainFirstReaderK)(exports.FromReader, exports.Chain);
  377. /**
  378. * Less strict version of [`chainFirstReaderK`](#chainfirstreaderk).
  379. *
  380. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  381. *
  382. * @category sequencing
  383. * @since 2.11.0
  384. */
  385. exports.chainFirstReaderKW = exports.chainFirstReaderK;
  386. /**
  387. * @category lifting
  388. * @since 2.13.0
  389. */
  390. var fromReaderIOK = function (f) {
  391. return function () {
  392. var a = [];
  393. for (var _i = 0; _i < arguments.length; _i++) {
  394. a[_i] = arguments[_i];
  395. }
  396. return (0, exports.fromReaderIO)(f.apply(void 0, a));
  397. };
  398. };
  399. exports.fromReaderIOK = fromReaderIOK;
  400. /**
  401. * Less strict version of [`chainReaderIOK`](#chainreaderiok).
  402. *
  403. * @category sequencing
  404. * @since 2.13.0
  405. */
  406. var chainReaderIOKW = function (f) { return (0, exports.chainW)((0, exports.fromReaderIOK)(f)); };
  407. exports.chainReaderIOKW = chainReaderIOKW;
  408. /**
  409. * @category sequencing
  410. * @since 2.13.0
  411. */
  412. exports.chainReaderIOK = exports.chainReaderIOKW;
  413. /**
  414. * Less strict version of [`chainFirstReaderIOK`](#chainfirstreaderiok).
  415. *
  416. * @category sequencing
  417. * @since 2.13.0
  418. */
  419. var chainFirstReaderIOKW = function (f) { return (0, exports.chainFirstW)((0, exports.fromReaderIOK)(f)); };
  420. exports.chainFirstReaderIOKW = chainFirstReaderIOKW;
  421. /**
  422. * @category sequencing
  423. * @since 2.13.0
  424. */
  425. exports.chainFirstReaderIOK = exports.chainFirstReaderIOKW;
  426. /**
  427. * @category instances
  428. * @since 2.10.0
  429. */
  430. exports.FromTask = {
  431. URI: exports.URI,
  432. fromIO: exports.fromIO,
  433. fromTask: exports.fromTask
  434. };
  435. /**
  436. * @category lifting
  437. * @since 2.4.0
  438. */
  439. exports.fromTaskK = (0, FromTask_1.fromTaskK)(exports.FromTask);
  440. /**
  441. * @category sequencing
  442. * @since 2.4.0
  443. */
  444. exports.chainTaskK =
  445. /*#__PURE__*/ (0, FromTask_1.chainTaskK)(exports.FromTask, exports.Chain);
  446. /**
  447. * @category sequencing
  448. * @since 2.10.0
  449. */
  450. exports.chainFirstTaskK =
  451. /*#__PURE__*/ (0, FromTask_1.chainFirstTaskK)(exports.FromTask, exports.Chain);
  452. // -------------------------------------------------------------------------------------
  453. // do notation
  454. // -------------------------------------------------------------------------------------
  455. /**
  456. * @category do notation
  457. * @since 2.9.0
  458. */
  459. exports.Do = (0, exports.of)(_.emptyRecord);
  460. /**
  461. * @category do notation
  462. * @since 2.8.0
  463. */
  464. exports.bindTo = (0, Functor_1.bindTo)(exports.Functor);
  465. var let_ = /*#__PURE__*/ (0, Functor_1.let)(exports.Functor);
  466. exports.let = let_;
  467. /**
  468. * @category do notation
  469. * @since 2.8.0
  470. */
  471. exports.bind = (0, Chain_1.bind)(exports.Chain);
  472. /**
  473. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  474. *
  475. * @category do notation
  476. * @since 2.8.0
  477. */
  478. exports.bindW = exports.bind;
  479. /**
  480. * @category do notation
  481. * @since 2.8.0
  482. */
  483. exports.apS = (0, Apply_1.apS)(exports.ApplyPar);
  484. /**
  485. * Less strict version of [`apS`](#aps).
  486. *
  487. * The `W` suffix (short for **W**idening) means that the environment types will be merged.
  488. *
  489. * @category do notation
  490. * @since 2.8.0
  491. */
  492. exports.apSW = exports.apS;
  493. /**
  494. * @since 2.11.0
  495. */
  496. exports.ApT = (0, exports.of)(_.emptyReadonlyArray);
  497. // -------------------------------------------------------------------------------------
  498. // array utils
  499. // -------------------------------------------------------------------------------------
  500. /**
  501. * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(Applicative)`.
  502. *
  503. * @category traversing
  504. * @since 2.11.0
  505. */
  506. var traverseReadonlyNonEmptyArrayWithIndex = function (f) {
  507. return (0, function_1.flow)(R.traverseReadonlyNonEmptyArrayWithIndex(f), R.map(T.traverseReadonlyNonEmptyArrayWithIndex(function_1.SK)));
  508. };
  509. exports.traverseReadonlyNonEmptyArrayWithIndex = traverseReadonlyNonEmptyArrayWithIndex;
  510. /**
  511. * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`.
  512. *
  513. * @category traversing
  514. * @since 2.11.0
  515. */
  516. var traverseReadonlyArrayWithIndex = function (f) {
  517. var g = (0, exports.traverseReadonlyNonEmptyArrayWithIndex)(f);
  518. return function (as) { return (_.isNonEmpty(as) ? g(as) : exports.ApT); };
  519. };
  520. exports.traverseReadonlyArrayWithIndex = traverseReadonlyArrayWithIndex;
  521. /**
  522. * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`.
  523. *
  524. * @category traversing
  525. * @since 2.11.0
  526. */
  527. var traverseReadonlyNonEmptyArrayWithIndexSeq = function (f) {
  528. return (0, function_1.flow)(R.traverseReadonlyNonEmptyArrayWithIndex(f), R.map(T.traverseReadonlyNonEmptyArrayWithIndexSeq(function_1.SK)));
  529. };
  530. exports.traverseReadonlyNonEmptyArrayWithIndexSeq = traverseReadonlyNonEmptyArrayWithIndexSeq;
  531. /**
  532. * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`.
  533. *
  534. * @category traversing
  535. * @since 2.11.0
  536. */
  537. var traverseReadonlyArrayWithIndexSeq = function (f) {
  538. var g = (0, exports.traverseReadonlyNonEmptyArrayWithIndexSeq)(f);
  539. return function (as) { return (_.isNonEmpty(as) ? g(as) : exports.ApT); };
  540. };
  541. exports.traverseReadonlyArrayWithIndexSeq = traverseReadonlyArrayWithIndexSeq;
  542. /**
  543. * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`.
  544. *
  545. * @category traversing
  546. * @since 2.9.0
  547. */
  548. exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex;
  549. /**
  550. * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`.
  551. *
  552. * @category traversing
  553. * @since 2.9.0
  554. */
  555. var traverseArray = function (f) { return (0, exports.traverseReadonlyArrayWithIndex)(function (_, a) { return f(a); }); };
  556. exports.traverseArray = traverseArray;
  557. /**
  558. * Equivalent to `ReadonlyArray#sequence(Applicative)`.
  559. *
  560. * @category traversing
  561. * @since 2.9.0
  562. */
  563. exports.sequenceArray =
  564. /*#__PURE__*/ (0, exports.traverseArray)(function_1.identity);
  565. /**
  566. * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`.
  567. *
  568. * @category traversing
  569. * @since 2.10.0
  570. */
  571. exports.traverseSeqArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq;
  572. /**
  573. * Equivalent to `ReadonlyArray#traverse(ApplicativeSeq)`.
  574. *
  575. * @category traversing
  576. * @since 2.10.0
  577. */
  578. var traverseSeqArray = function (f) { return (0, exports.traverseReadonlyArrayWithIndexSeq)(function (_, a) { return f(a); }); };
  579. exports.traverseSeqArray = traverseSeqArray;
  580. // -------------------------------------------------------------------------------------
  581. // deprecated
  582. // -------------------------------------------------------------------------------------
  583. /**
  584. * Use `traverseReadonlyArrayWithIndexSeq` instead.
  585. *
  586. * @category zone of death
  587. * @since 2.10.0
  588. * @deprecated
  589. */
  590. exports.sequenceSeqArray =
  591. /*#__PURE__*/ (0, exports.traverseSeqArray)(function_1.identity);
  592. /**
  593. * This instance is deprecated, use small, specific instances instead.
  594. * For example if a function needs a `Functor` instance, pass `RT.Functor` instead of `RT.readerTask`
  595. * (where `RT` is from `import RT from 'fp-ts/ReaderTask'`)
  596. *
  597. * @category zone of death
  598. * @since 2.3.0
  599. * @deprecated
  600. */
  601. exports.readerTask = {
  602. URI: exports.URI,
  603. map: _map,
  604. of: exports.of,
  605. ap: _apPar,
  606. chain: _chain,
  607. fromIO: exports.fromIO,
  608. fromTask: exports.fromTask
  609. };
  610. /**
  611. * This instance is deprecated, use small, specific instances instead.
  612. * For example if a function needs a `Functor` instance, pass `RT.Functor` instead of `RT.readerTaskSeq`
  613. * (where `RT` is from `import RT from 'fp-ts/ReaderTask'`)
  614. *
  615. * @category zone of death
  616. * @since 2.3.0
  617. * @deprecated
  618. */
  619. exports.readerTaskSeq = {
  620. URI: exports.URI,
  621. map: _map,
  622. of: exports.of,
  623. ap: _apSeq,
  624. chain: _chain,
  625. fromIO: exports.fromIO,
  626. fromTask: exports.fromTask
  627. };
  628. /**
  629. * Use [`getApplySemigroup`](./Apply.ts.html#getapplysemigroup) instead.
  630. *
  631. * @category zone of death
  632. * @since 2.3.0
  633. * @deprecated
  634. */
  635. exports.getSemigroup =
  636. /*#__PURE__*/ (0, Apply_1.getApplySemigroup)(exports.ApplySeq);
  637. /**
  638. * Use [`getApplicativeMonoid`](./Applicative.ts.html#getapplicativemonoid) instead.
  639. *
  640. * @category zone of death
  641. * @since 2.3.0
  642. * @deprecated
  643. */
  644. exports.getMonoid =
  645. /*#__PURE__*/ (0, Applicative_1.getApplicativeMonoid)(exports.ApplicativeSeq);
  646. /**
  647. * @category zone of death
  648. * @since 2.4.0
  649. * @deprecated
  650. */
  651. /* istanbul ignore next */
  652. function run(ma, r) {
  653. return ma(r)();
  654. }
  655. exports.run = run;