@fncts/base 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. package/_cjs/collection/Iterable/api/traverseConc.cjs +16 -21
  2. package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
  3. package/_cjs/collection/compat/Record/instances.cjs +67 -16
  4. package/_cjs/collection/compat/Record/instances.cjs.map +1 -1
  5. package/_cjs/collection/immutable/Conc/api.cjs +9 -12
  6. package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
  7. package/_cjs/collection/immutable/Conc/definition.cjs +41 -43
  8. package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
  9. package/_cjs/collection/immutable/Dictionary/definition.cjs +2 -4
  10. package/_cjs/collection/immutable/Dictionary/definition.cjs.map +1 -1
  11. package/_cjs/collection/immutable/HashMap/api.cjs +26 -29
  12. package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
  13. package/_cjs/collection/immutable/HashMap/definition.cjs +15 -17
  14. package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
  15. package/_cjs/collection/immutable/ImmutableArray/api.cjs +136 -153
  16. package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
  17. package/_cjs/collection/immutable/ImmutableArray/definition.cjs +10 -12
  18. package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
  19. package/_cjs/collection/immutable/ImmutableArray/instances.cjs +11 -9
  20. package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
  21. package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +21 -22
  22. package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -1
  23. package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs +3 -9
  24. package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
  25. package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +8 -2
  26. package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
  27. package/_cjs/collection/immutable/RoseTree/definition.cjs +13 -15
  28. package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -1
  29. package/_cjs/collection/immutable/Vector/api.cjs +8 -12
  30. package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
  31. package/_cjs/collection/immutable/Vector/definition.cjs +11 -13
  32. package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
  33. package/_cjs/collection/weak/IterableWeakMap.cjs +51 -2
  34. package/_cjs/collection/weak/IterableWeakMap.cjs.map +1 -1
  35. package/_cjs/collection/weak/IterableWeakSet.cjs +59 -7
  36. package/_cjs/collection/weak/IterableWeakSet.cjs.map +1 -1
  37. package/_cjs/control/Eval/api.cjs +9 -3
  38. package/_cjs/control/Eval/api.cjs.map +1 -1
  39. package/_cjs/control/Eval/definition.cjs +0 -7
  40. package/_cjs/control/Eval/definition.cjs.map +1 -1
  41. package/_cjs/control/Eval/instance.cjs +6 -0
  42. package/_cjs/control/Eval/instance.cjs.map +1 -1
  43. package/_cjs/control/Z/api.cjs +16 -14
  44. package/_cjs/control/Z/api.cjs.map +1 -1
  45. package/_cjs/control/Z/definition.cjs +9 -14
  46. package/_cjs/control/Z/definition.cjs.map +1 -1
  47. package/_cjs/control/Z/instances.cjs +6 -0
  48. package/_cjs/control/Z/instances.cjs.map +1 -1
  49. package/_cjs/control/Z/runtime.cjs +15 -13
  50. package/_cjs/control/Z/runtime.cjs.map +1 -1
  51. package/_cjs/data/Const/definition.cjs +0 -7
  52. package/_cjs/data/Const/definition.cjs.map +1 -1
  53. package/_cjs/data/Const/instances.cjs +7 -5
  54. package/_cjs/data/Const/instances.cjs.map +1 -1
  55. package/_cjs/data/Datum/api.cjs +479 -0
  56. package/_cjs/data/Datum/api.cjs.map +1 -0
  57. package/_cjs/data/Datum/definition.cjs +142 -0
  58. package/_cjs/data/Datum/definition.cjs.map +1 -0
  59. package/_cjs/data/Datum/instances.cjs +69 -0
  60. package/_cjs/data/Datum/instances.cjs.map +1 -0
  61. package/_cjs/data/DatumEither/api.cjs +365 -0
  62. package/_cjs/data/DatumEither/api.cjs.map +1 -0
  63. package/_cjs/data/DatumEither/definition.cjs +9 -0
  64. package/_cjs/data/DatumEither/definition.cjs.map +1 -0
  65. package/_cjs/data/DecodeError/definition.cjs +3 -3
  66. package/_cjs/data/DecodeError/definition.cjs.map +1 -1
  67. package/_cjs/data/Decoder/definition.cjs +3 -10
  68. package/_cjs/data/Decoder/definition.cjs.map +1 -1
  69. package/_cjs/data/Either/api.cjs +21 -5
  70. package/_cjs/data/Either/api.cjs.map +1 -1
  71. package/_cjs/data/Either/definition.cjs +3 -10
  72. package/_cjs/data/Either/definition.cjs.map +1 -1
  73. package/_cjs/data/Either/instances.cjs +25 -23
  74. package/_cjs/data/Either/instances.cjs.map +1 -1
  75. package/_cjs/data/EitherT/api.cjs +106 -0
  76. package/_cjs/data/EitherT/api.cjs.map +1 -0
  77. package/_cjs/data/EitherT/definition.cjs +9 -0
  78. package/_cjs/data/EitherT/definition.cjs.map +1 -0
  79. package/_cjs/data/Environment/api.cjs +15 -14
  80. package/_cjs/data/Environment/api.cjs.map +1 -1
  81. package/_cjs/data/Environment/definition.cjs.map +1 -1
  82. package/_cjs/data/Identity/api.cjs +3 -1
  83. package/_cjs/data/Identity/api.cjs.map +1 -1
  84. package/_cjs/data/Identity/definition.cjs +2 -4
  85. package/_cjs/data/Identity/definition.cjs.map +1 -1
  86. package/_cjs/data/Identity/instances.cjs +6 -0
  87. package/_cjs/data/Identity/instances.cjs.map +1 -1
  88. package/_cjs/data/Intervals.cjs +292 -0
  89. package/_cjs/data/Intervals.cjs.map +1 -0
  90. package/_cjs/data/Maybe/api.cjs +3 -1
  91. package/_cjs/data/Maybe/api.cjs.map +1 -1
  92. package/_cjs/data/Maybe/definition.cjs +11 -13
  93. package/_cjs/data/Maybe/definition.cjs.map +1 -1
  94. package/_cjs/data/Maybe/instances.cjs +13 -11
  95. package/_cjs/data/Maybe/instances.cjs.map +1 -1
  96. package/_cjs/data/Newtype.cjs +3 -5
  97. package/_cjs/data/Newtype.cjs.map +1 -1
  98. package/_cjs/data/Struct/definition.cjs +2 -4
  99. package/_cjs/data/Struct/definition.cjs.map +1 -1
  100. package/_cjs/data/Zipped.cjs +55 -0
  101. package/_cjs/data/Zipped.cjs.map +1 -0
  102. package/_cjs/data/function/api.cjs +10 -0
  103. package/_cjs/data/function/api.cjs.map +1 -1
  104. package/_cjs/data/object/instances.cjs +9 -1
  105. package/_cjs/data/object/instances.cjs.map +1 -1
  106. package/_cjs/optics/Optional/definition.cjs +4 -6
  107. package/_cjs/optics/Optional/definition.cjs.map +1 -1
  108. package/_cjs/optics/Traversal/api/compose.cjs +1 -1
  109. package/_cjs/optics/Traversal/api/compose.cjs.map +1 -1
  110. package/_cjs/optics/Traversal/api/fromTraversable.cjs +1 -1
  111. package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
  112. package/_cjs/optics/Traversal/definition.cjs +3 -3
  113. package/_cjs/optics/Traversal/definition.cjs.map +1 -1
  114. package/_cjs/typeclass/Alt.cjs +0 -7
  115. package/_cjs/typeclass/Alt.cjs.map +1 -1
  116. package/_cjs/typeclass/ApplicativeExcept.cjs +9 -35
  117. package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
  118. package/_cjs/typeclass/Apply.cjs +39 -66
  119. package/_cjs/typeclass/Apply.cjs.map +1 -1
  120. package/_cjs/typeclass/Chain.cjs +6 -28
  121. package/_cjs/typeclass/Chain.cjs.map +1 -1
  122. package/_cjs/typeclass/Fail.cjs +0 -10
  123. package/_cjs/typeclass/Fail.cjs.map +1 -1
  124. package/_cjs/typeclass/Filterable.cjs +0 -36
  125. package/_cjs/typeclass/Filterable.cjs.map +1 -1
  126. package/_cjs/typeclass/Foldable.cjs +4 -34
  127. package/_cjs/typeclass/Foldable.cjs.map +1 -1
  128. package/_cjs/typeclass/FoldableWithIndex.cjs +4 -34
  129. package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -1
  130. package/_cjs/typeclass/Functor.cjs +3 -18
  131. package/_cjs/typeclass/Functor.cjs.map +1 -1
  132. package/_cjs/typeclass/Guard/definition.cjs +3 -10
  133. package/_cjs/typeclass/Guard/definition.cjs.map +1 -1
  134. package/_cjs/typeclass/MonadExcept.cjs +2 -10
  135. package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
  136. package/_cjs/typeclass/Nil.cjs +0 -10
  137. package/_cjs/typeclass/Nil.cjs.map +1 -1
  138. package/_cjs/typeclass/Pointed.cjs +0 -11
  139. package/_cjs/typeclass/Pointed.cjs.map +1 -1
  140. package/_cjs/typeclass/Semialign.cjs +18 -46
  141. package/_cjs/typeclass/Semialign.cjs.map +1 -1
  142. package/_cjs/typeclass/Semimonoidal.cjs +0 -11
  143. package/_cjs/typeclass/Semimonoidal.cjs.map +1 -1
  144. package/_cjs/typeclass/Showable/show.cjs +12 -12
  145. package/_cjs/typeclass/Showable/show.cjs.map +1 -1
  146. package/_cjs/typeclass/Traversable.cjs +7 -26
  147. package/_cjs/typeclass/Traversable.cjs.map +1 -1
  148. package/_cjs/typeclass/TraversableWithIndex.cjs +3 -7
  149. package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -1
  150. package/_cjs/typeclass/Witherable.cjs +3 -45
  151. package/_cjs/typeclass/Witherable.cjs.map +1 -1
  152. package/_cjs/typeclass/WitherableWithIndex.cjs +8 -44
  153. package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
  154. package/_mjs/collection/Iterable/api/traverseConc.mjs +16 -21
  155. package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -1
  156. package/_mjs/collection/compat/Record/instances.mjs +62 -16
  157. package/_mjs/collection/compat/Record/instances.mjs.map +1 -1
  158. package/_mjs/collection/immutable/Conc/api.mjs +7 -11
  159. package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
  160. package/_mjs/collection/immutable/Conc/definition.mjs +41 -42
  161. package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
  162. package/_mjs/collection/immutable/Dictionary/definition.mjs +2 -3
  163. package/_mjs/collection/immutable/Dictionary/definition.mjs.map +1 -1
  164. package/_mjs/collection/immutable/HashMap/api.mjs +18 -20
  165. package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
  166. package/_mjs/collection/immutable/HashMap/definition.mjs +15 -16
  167. package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
  168. package/_mjs/collection/immutable/ImmutableArray/api.mjs +128 -147
  169. package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
  170. package/_mjs/collection/immutable/ImmutableArray/definition.mjs +10 -11
  171. package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
  172. package/_mjs/collection/immutable/ImmutableArray/instances.mjs +9 -8
  173. package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
  174. package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +18 -19
  175. package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
  176. package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +0 -2
  177. package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
  178. package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +4 -3
  179. package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
  180. package/_mjs/collection/immutable/RoseTree/definition.mjs +13 -14
  181. package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -1
  182. package/_mjs/collection/immutable/Vector/api.mjs +8 -12
  183. package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
  184. package/_mjs/collection/immutable/Vector/definition.mjs +11 -12
  185. package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
  186. package/_mjs/collection/weak/IterableWeakMap.mjs +51 -2
  187. package/_mjs/collection/weak/IterableWeakMap.mjs.map +1 -1
  188. package/_mjs/collection/weak/IterableWeakSet.mjs +59 -7
  189. package/_mjs/collection/weak/IterableWeakSet.mjs.map +1 -1
  190. package/_mjs/control/Eval/api.mjs +9 -4
  191. package/_mjs/control/Eval/api.mjs.map +1 -1
  192. package/_mjs/control/Eval/definition.mjs +0 -1
  193. package/_mjs/control/Eval/definition.mjs.map +1 -1
  194. package/_mjs/control/Eval/instance.mjs +1 -0
  195. package/_mjs/control/Eval/instance.mjs.map +1 -1
  196. package/_mjs/control/Z/api.mjs +16 -15
  197. package/_mjs/control/Z/api.mjs.map +1 -1
  198. package/_mjs/control/Z/definition.mjs +4 -5
  199. package/_mjs/control/Z/definition.mjs.map +1 -1
  200. package/_mjs/control/Z/instances.mjs +1 -0
  201. package/_mjs/control/Z/instances.mjs.map +1 -1
  202. package/_mjs/control/Z/runtime.mjs +14 -13
  203. package/_mjs/control/Z/runtime.mjs.map +1 -1
  204. package/_mjs/data/Const/definition.mjs +0 -3
  205. package/_mjs/data/Const/definition.mjs.map +1 -1
  206. package/_mjs/data/Const/instances.mjs +6 -5
  207. package/_mjs/data/Const/instances.mjs.map +1 -1
  208. package/_mjs/data/Datum/api.mjs +403 -0
  209. package/_mjs/data/Datum/api.mjs.map +1 -0
  210. package/_mjs/data/Datum/definition.mjs +112 -0
  211. package/_mjs/data/Datum/definition.mjs.map +1 -0
  212. package/_mjs/data/Datum/instances.mjs +52 -0
  213. package/_mjs/data/Datum/instances.mjs.map +1 -0
  214. package/_mjs/data/DatumEither/api.mjs +290 -0
  215. package/_mjs/data/DatumEither/api.mjs.map +1 -0
  216. package/_mjs/data/DatumEither/definition.mjs +2 -0
  217. package/_mjs/data/DatumEither/definition.mjs.map +1 -0
  218. package/_mjs/data/DecodeError/definition.mjs +3 -3
  219. package/_mjs/data/DecodeError/definition.mjs.map +1 -1
  220. package/_mjs/data/Decoder/definition.mjs +0 -2
  221. package/_mjs/data/Decoder/definition.mjs.map +1 -1
  222. package/_mjs/data/Either/api.mjs +16 -3
  223. package/_mjs/data/Either/api.mjs.map +1 -1
  224. package/_mjs/data/Either/definition.mjs +0 -2
  225. package/_mjs/data/Either/definition.mjs.map +1 -1
  226. package/_mjs/data/Either/instances.mjs +23 -22
  227. package/_mjs/data/Either/instances.mjs.map +1 -1
  228. package/_mjs/data/EitherT/api.mjs +73 -0
  229. package/_mjs/data/EitherT/api.mjs.map +1 -0
  230. package/_mjs/data/EitherT/definition.mjs +2 -0
  231. package/_mjs/data/EitherT/definition.mjs.map +1 -0
  232. package/_mjs/data/Environment/api.mjs +12 -13
  233. package/_mjs/data/Environment/api.mjs.map +1 -1
  234. package/_mjs/data/Environment/definition.mjs.map +1 -1
  235. package/_mjs/data/Identity/api.mjs +2 -1
  236. package/_mjs/data/Identity/api.mjs.map +1 -1
  237. package/_mjs/data/Identity/definition.mjs +2 -3
  238. package/_mjs/data/Identity/definition.mjs.map +1 -1
  239. package/_mjs/data/Identity/instances.mjs +1 -0
  240. package/_mjs/data/Identity/instances.mjs.map +1 -1
  241. package/_mjs/data/Intervals.mjs +257 -0
  242. package/_mjs/data/Intervals.mjs.map +1 -0
  243. package/_mjs/data/Maybe/api.mjs +2 -1
  244. package/_mjs/data/Maybe/api.mjs.map +1 -1
  245. package/_mjs/data/Maybe/definition.mjs +8 -10
  246. package/_mjs/data/Maybe/definition.mjs.map +1 -1
  247. package/_mjs/data/Maybe/instances.mjs +12 -11
  248. package/_mjs/data/Maybe/instances.mjs.map +1 -1
  249. package/_mjs/data/Newtype.mjs +3 -4
  250. package/_mjs/data/Newtype.mjs.map +1 -1
  251. package/_mjs/data/Struct/definition.mjs +2 -3
  252. package/_mjs/data/Struct/definition.mjs.map +1 -1
  253. package/_mjs/data/Zipped.mjs +37 -0
  254. package/_mjs/data/Zipped.mjs.map +1 -0
  255. package/_mjs/data/function/api.mjs +8 -0
  256. package/_mjs/data/function/api.mjs.map +1 -1
  257. package/_mjs/data/object/instances.mjs +7 -1
  258. package/_mjs/data/object/instances.mjs.map +1 -1
  259. package/_mjs/optics/Optional/definition.mjs +4 -5
  260. package/_mjs/optics/Optional/definition.mjs.map +1 -1
  261. package/_mjs/optics/Traversal/api/compose.mjs +1 -1
  262. package/_mjs/optics/Traversal/api/compose.mjs.map +1 -1
  263. package/_mjs/optics/Traversal/api/fromTraversable.mjs +1 -1
  264. package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
  265. package/_mjs/optics/Traversal/definition.mjs +3 -3
  266. package/_mjs/optics/Traversal/definition.mjs.map +1 -1
  267. package/_mjs/typeclass/Alt.mjs +0 -5
  268. package/_mjs/typeclass/Alt.mjs.map +1 -1
  269. package/_mjs/typeclass/ApplicativeExcept.mjs +7 -32
  270. package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
  271. package/_mjs/typeclass/Apply.mjs +35 -65
  272. package/_mjs/typeclass/Apply.mjs.map +1 -1
  273. package/_mjs/typeclass/Chain.mjs +4 -25
  274. package/_mjs/typeclass/Chain.mjs.map +1 -1
  275. package/_mjs/typeclass/Fail.mjs +1 -8
  276. package/_mjs/typeclass/Fail.mjs.map +1 -1
  277. package/_mjs/typeclass/Filterable.mjs +0 -28
  278. package/_mjs/typeclass/Filterable.mjs.map +1 -1
  279. package/_mjs/typeclass/Foldable.mjs +3 -30
  280. package/_mjs/typeclass/Foldable.mjs.map +1 -1
  281. package/_mjs/typeclass/FoldableWithIndex.mjs +3 -30
  282. package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -1
  283. package/_mjs/typeclass/Functor.mjs +3 -16
  284. package/_mjs/typeclass/Functor.mjs.map +1 -1
  285. package/_mjs/typeclass/Guard/definition.mjs +0 -2
  286. package/_mjs/typeclass/Guard/definition.mjs.map +1 -1
  287. package/_mjs/typeclass/MonadExcept.mjs +2 -9
  288. package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
  289. package/_mjs/typeclass/Nil.mjs +1 -8
  290. package/_mjs/typeclass/Nil.mjs.map +1 -1
  291. package/_mjs/typeclass/Pointed.mjs +0 -9
  292. package/_mjs/typeclass/Pointed.mjs.map +1 -1
  293. package/_mjs/typeclass/Semialign.mjs +17 -45
  294. package/_mjs/typeclass/Semialign.mjs.map +1 -1
  295. package/_mjs/typeclass/Semimonoidal.mjs +0 -9
  296. package/_mjs/typeclass/Semimonoidal.mjs.map +1 -1
  297. package/_mjs/typeclass/Showable/show.mjs +12 -12
  298. package/_mjs/typeclass/Showable/show.mjs.map +1 -1
  299. package/_mjs/typeclass/Traversable.mjs +6 -25
  300. package/_mjs/typeclass/Traversable.mjs.map +1 -1
  301. package/_mjs/typeclass/TraversableWithIndex.mjs +2 -6
  302. package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -1
  303. package/_mjs/typeclass/Witherable.mjs +3 -40
  304. package/_mjs/typeclass/Witherable.mjs.map +1 -1
  305. package/_mjs/typeclass/WitherableWithIndex.mjs +6 -41
  306. package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
  307. package/_src/collection/Iterable/api/traverseConc.ts +24 -21
  308. package/_src/collection/compat/Record/instances.ts +44 -0
  309. package/_src/collection/immutable/Conc/api.ts +9 -11
  310. package/_src/collection/immutable/Conc/definition.ts +9 -5
  311. package/_src/collection/immutable/Dictionary/definition.ts +1 -1
  312. package/_src/collection/immutable/HashMap/api.ts +20 -17
  313. package/_src/collection/immutable/HashMap/definition.ts +10 -6
  314. package/_src/collection/immutable/ImmutableArray/api.ts +56 -113
  315. package/_src/collection/immutable/ImmutableArray/definition.ts +8 -5
  316. package/_src/collection/immutable/ImmutableArray/instances.ts +42 -42
  317. package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +13 -11
  318. package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +8 -3
  319. package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +24 -25
  320. package/_src/collection/immutable/RoseTree/definition.ts +7 -4
  321. package/_src/collection/immutable/Vector/api.ts +12 -16
  322. package/_src/collection/immutable/Vector/definition.ts +9 -9
  323. package/_src/collection/weak/IterableWeakMap.ts +50 -5
  324. package/_src/collection/weak/IterableWeakSet.ts +57 -9
  325. package/_src/control/Eval/api.ts +5 -2
  326. package/_src/control/Eval/definition.ts +7 -4
  327. package/_src/control/Eval/instance.ts +7 -7
  328. package/_src/control/Z/api.ts +16 -25
  329. package/_src/control/Z/definition.ts +32 -31
  330. package/_src/control/Z/instances.ts +3 -3
  331. package/_src/control/Z/runtime.ts +7 -7
  332. package/_src/data/Const/definition.ts +9 -17
  333. package/_src/data/Const/instances.ts +5 -5
  334. package/_src/data/Datum/api.ts +376 -0
  335. package/_src/data/Datum/definition.ts +102 -0
  336. package/_src/data/Datum/instances.ts +34 -0
  337. package/_src/data/DatumEither/api.ts +348 -0
  338. package/_src/data/DatumEither/definition.ts +20 -0
  339. package/_src/data/DecodeError/definition.ts +3 -3
  340. package/_src/data/Decoder/definition.ts +7 -4
  341. package/_src/data/Either/api.ts +12 -2
  342. package/_src/data/Either/definition.ts +9 -14
  343. package/_src/data/Either/instances.ts +6 -6
  344. package/_src/data/EitherT/api.ts +239 -0
  345. package/_src/data/EitherT/definition.ts +23 -0
  346. package/_src/data/Environment/api.ts +8 -6
  347. package/_src/data/Environment/definition.ts +2 -2
  348. package/_src/data/Identity/api.ts +2 -2
  349. package/_src/data/Identity/definition.ts +2 -2
  350. package/_src/data/Identity/instances.ts +7 -7
  351. package/_src/data/Intervals.ts +126 -0
  352. package/_src/data/Maybe/api.ts +2 -2
  353. package/_src/data/Maybe/definition.ts +7 -4
  354. package/_src/data/Maybe/instances.ts +10 -10
  355. package/_src/data/Newtype.ts +32 -11
  356. package/_src/data/Struct/definition.ts +1 -1
  357. package/_src/data/Tag/definition.ts +2 -2
  358. package/_src/data/Zipped.ts +52 -0
  359. package/_src/data/function/api.ts +8 -0
  360. package/_src/data/object/instances.ts +11 -1
  361. package/_src/optics/Optional/definition.ts +2 -2
  362. package/_src/optics/Traversal/api/compose.ts +1 -1
  363. package/_src/optics/Traversal/api/fromTraversable.ts +11 -11
  364. package/_src/optics/Traversal/definition.ts +13 -12
  365. package/_src/typeclass/Align.ts +1 -1
  366. package/_src/typeclass/Alt.ts +24 -54
  367. package/_src/typeclass/Alternative.ts +1 -1
  368. package/_src/typeclass/Applicative.ts +6 -1
  369. package/_src/typeclass/ApplicativeExcept.ts +55 -81
  370. package/_src/typeclass/Apply.ts +224 -253
  371. package/_src/typeclass/Chain.ts +71 -98
  372. package/_src/typeclass/Fail.ts +10 -28
  373. package/_src/typeclass/Filterable.ts +13 -67
  374. package/_src/typeclass/FilterableWithIndex.ts +13 -13
  375. package/_src/typeclass/Foldable.ts +16 -35
  376. package/_src/typeclass/FoldableWithIndex.ts +14 -37
  377. package/_src/typeclass/Functor.ts +11 -21
  378. package/_src/typeclass/FunctorWithIndex.ts +4 -4
  379. package/_src/typeclass/Guard/definition.ts +1 -3
  380. package/_src/typeclass/Monad.ts +1 -1
  381. package/_src/typeclass/MonadExcept.ts +11 -7
  382. package/_src/typeclass/Nil.ts +10 -27
  383. package/_src/typeclass/Pointed.ts +11 -30
  384. package/_src/typeclass/Semialign.ts +285 -253
  385. package/_src/typeclass/Semimonoidal.ts +23 -54
  386. package/_src/typeclass/Showable/show.ts +8 -10
  387. package/_src/typeclass/Traversable.ts +45 -63
  388. package/_src/typeclass/TraversableWithIndex.ts +37 -34
  389. package/_src/typeclass/Witherable.ts +28 -115
  390. package/_src/typeclass/WitherableWithIndex.ts +82 -115
  391. package/_src/types/extractions.ts +1 -1
  392. package/collection/Iterable/api/traverseConc.d.ts +4 -6
  393. package/collection/compat/Record/instances.d.ts +12 -0
  394. package/collection/immutable/Conc/api.d.ts +4 -6
  395. package/collection/immutable/Conc/definition.d.ts +9 -6
  396. package/collection/immutable/Dictionary/definition.d.ts +1 -1
  397. package/collection/immutable/HashMap/api.d.ts +13 -13
  398. package/collection/immutable/HashMap/definition.d.ts +10 -7
  399. package/collection/immutable/ImmutableArray/api.d.ts +16 -18
  400. package/collection/immutable/ImmutableArray/definition.d.ts +8 -6
  401. package/collection/immutable/ImmutableArray/instances.d.ts +17 -17
  402. package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +6 -5
  403. package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +7 -3
  404. package/collection/immutable/ImmutableNonEmptyArray/instances.d.ts +10 -10
  405. package/collection/immutable/RoseTree/definition.d.ts +7 -5
  406. package/collection/immutable/Vector/api.d.ts +4 -4
  407. package/collection/immutable/Vector/definition.d.ts +8 -9
  408. package/collection/weak/IterableWeakMap.d.ts +9 -3
  409. package/collection/weak/IterableWeakSet.d.ts +10 -4
  410. package/control/Eval/api.d.ts +6 -1
  411. package/control/Eval/definition.d.ts +6 -4
  412. package/control/Eval/instance.d.ts +3 -3
  413. package/control/Z/api.d.ts +8 -6
  414. package/control/Z/definition.d.ts +38 -32
  415. package/control/Z/instances.d.ts +2 -2
  416. package/control/Z/runtime.d.ts +5 -4
  417. package/data/Const/definition.d.ts +8 -16
  418. package/data/Const/instances.d.ts +4 -3
  419. package/data/Datum/api.d.ts +188 -0
  420. package/data/Datum/definition.d.ts +75 -0
  421. package/data/Datum/instances.d.ts +32 -0
  422. package/data/DatumEither/api.d.ts +169 -0
  423. package/data/DatumEither/definition.d.ts +21 -0
  424. package/data/Decoder/definition.d.ts +6 -4
  425. package/data/Either/api.d.ts +10 -0
  426. package/data/Either/definition.d.ts +8 -14
  427. package/data/Either/instances.d.ts +4 -3
  428. package/data/EitherT/api.d.ts +60 -0
  429. package/data/EitherT/definition.d.ts +12 -0
  430. package/data/Environment/api.d.ts +7 -5
  431. package/data/Environment/definition.d.ts +3 -3
  432. package/data/Identity/api.d.ts +2 -1
  433. package/data/Identity/definition.d.ts +2 -2
  434. package/data/Identity/instances.d.ts +3 -3
  435. package/data/Intervals.d.ts +53 -0
  436. package/data/Maybe/api.d.ts +2 -1
  437. package/data/Maybe/definition.d.ts +7 -4
  438. package/data/Maybe/instances.d.ts +6 -6
  439. package/data/Newtype.d.ts +9 -8
  440. package/data/Struct/definition.d.ts +1 -1
  441. package/data/Tag/definition.d.ts +2 -2
  442. package/data/Zipped.d.ts +24 -0
  443. package/data/function/api.d.ts +6 -0
  444. package/data/object/instances.d.ts +6 -1
  445. package/optics/Traversal/api/fromTraversable.d.ts +1 -1
  446. package/optics/Traversal/definition.d.ts +2 -4
  447. package/package.json +2 -2
  448. package/typeclass/Align.d.ts +1 -1
  449. package/typeclass/Alt.d.ts +2 -4
  450. package/typeclass/Alternative.d.ts +1 -1
  451. package/typeclass/Applicative.d.ts +2 -1
  452. package/typeclass/ApplicativeExcept.d.ts +5 -13
  453. package/typeclass/Apply.d.ts +20 -32
  454. package/typeclass/Chain.d.ts +5 -13
  455. package/typeclass/Fail.d.ts +2 -7
  456. package/typeclass/Filterable.d.ts +7 -31
  457. package/typeclass/FilterableWithIndex.d.ts +7 -7
  458. package/typeclass/Foldable.d.ts +6 -19
  459. package/typeclass/FoldableWithIndex.d.ts +6 -19
  460. package/typeclass/Functor.d.ts +4 -11
  461. package/typeclass/FunctorWithIndex.d.ts +2 -2
  462. package/typeclass/Guard/definition.d.ts +1 -4
  463. package/typeclass/Monad.d.ts +1 -1
  464. package/typeclass/MonadExcept.d.ts +3 -4
  465. package/typeclass/Nil.d.ts +2 -7
  466. package/typeclass/Pointed.d.ts +2 -7
  467. package/typeclass/Semialign.d.ts +26 -32
  468. package/typeclass/Semimonoidal.d.ts +3 -8
  469. package/typeclass/Traversable.d.ts +21 -12
  470. package/typeclass/TraversableWithIndex.d.ts +19 -6
  471. package/typeclass/Witherable.d.ts +5 -19
  472. package/typeclass/WitherableWithIndex.d.ts +33 -19
  473. package/types/extractions.d.ts +1 -1
@@ -1,6 +1,7 @@
1
1
  import { Z } from "@fncts/base/control/Z/definition";
2
2
  import { Conc } from "@fncts/base/collection/immutable/Conc";
3
3
  import { Exit } from "@fncts/base/data/Exit/definition";
4
+ import { Environment } from "@fncts/base/data/Environment/definition";
4
5
  import { Cause } from "@fncts/base/data/Cause/definition";
5
6
  /**
6
7
  * Runs this computation with the specified initial state, returning either a
@@ -8,26 +9,26 @@ import { Cause } from "@fncts/base/data/Cause/definition";
8
9
  * @tsplus fluent fncts.control.Z unsafeRunAll
9
10
  * @tsplus location "@fncts/base/control/Z/runtime"
10
11
  */
11
- export declare function unsafeRunAll_<W, S1, S2, E, A>(ma: Z<W, S1, S2, unknown, E, A>, s: S1): readonly [Conc<W>, Exit<E, readonly [S2, A]>];
12
+ export declare function unsafeRunAll_<W, S1, S2, E, A>(ma: Z<W, S1, S2, never, E, A>, s: S1): readonly [Conc<W>, Exit<E, readonly [S2, A]>];
12
13
  /**
13
14
  * Runs this computation with the specified initial state, returning both
14
15
  * the updated state and the result.
15
16
  * @tsplus fluent fncts.control.Z unsafeRun
16
17
  * @tsplus location "@fncts/base/control/Z/runtime"
17
18
  */
18
- export declare function unsafeRun_<W, S1, S2, A>(ma: Z<W, S1, S2, unknown, never, A>, s: S1): readonly [S2, A];
19
+ export declare function unsafeRun_<W, S1, S2, A>(ma: Z<W, S1, S2, never, never, A>, s: S1): readonly [S2, A];
19
20
  /**
20
21
  * Runs this computation, returning the result.
21
22
  * @tsplus getter fncts.control.Z unsafeRunResult
22
23
  * @tsplus location "@fncts/base/control/Z/runtime"
23
24
  */
24
- export declare function unsafeRunResult<W, A>(ma: Z<W, unknown, unknown, unknown, never, A>): A;
25
+ export declare function unsafeRunResult<W, A>(ma: Z<W, unknown, unknown, never, never, A>): A;
25
26
  /**
26
27
  * Runs this computation with the given environment, returning the result.
27
28
  * @tsplus fluent fncts.control.Z unsafeRunReader
28
29
  * @tsplus location "@fncts/base/control/Z/runtime"
29
30
  */
30
- export declare function unsafeRunReader_<W, R, A>(ma: Z<W, unknown, never, R, never, A>, r: R): A;
31
+ export declare function unsafeRunReader_<W, R, A>(ma: Z<W, unknown, never, R, never, A>, r: Environment<R>): A;
31
32
  /**
32
33
  * Runs this computation with the specified initial state, returning the
33
34
  * updated state and discarding the result.
@@ -2,12 +2,12 @@ import { HKT } from "@fncts/typelevel/HKT";
2
2
  /**
3
3
  * @tsplus type fncts.ConstF
4
4
  */
5
- export interface ConstF extends Const<any, any> {
6
- }
7
- /**
8
- * @tsplus type fncts.ConstF
9
- */
10
- export interface Const1F<E> extends Const1<E, any> {
5
+ export interface ConstF extends HKT {
6
+ type: Const<this["E"], this["A"]>;
7
+ variance: {
8
+ E: "_";
9
+ A: "+";
10
+ };
11
11
  }
12
12
  /**
13
13
  * @tsplus type fncts.Const
@@ -15,15 +15,7 @@ export interface Const1F<E> extends Const1<E, any> {
15
15
  */
16
16
  export declare class Const<E, A> {
17
17
  readonly getConst: E;
18
- readonly [HKT.F]: ConstF;
19
- readonly [HKT.E]: () => E;
20
- readonly [HKT.A]: () => A;
21
- readonly [HKT.T]: Const<HKT._E<this>, HKT._A<this>>;
18
+ readonly _E: () => E;
19
+ readonly _A: () => A;
22
20
  constructor(getConst: E);
23
21
  }
24
- export interface Const1<E, A> {
25
- readonly [HKT.F]: ConstF;
26
- readonly [HKT.E]: () => E;
27
- readonly [HKT.A]: () => A;
28
- readonly [HKT.T]: Const<E, HKT._A<this>>;
29
- }
@@ -1,12 +1,13 @@
1
+ import { HKT } from "@fncts/typelevel/HKT";
1
2
  import type * as P from "../../typeclass.js";
2
- import type { Const1F } from "@fncts/base/data/Const/definition";
3
+ import type { ConstF } from "@fncts/base/data/Const/definition";
3
4
  /**
4
5
  * @tsplus static fncts.ConstOps getApply
5
6
  * @tsplus location "@fncts/base/data/Const/instances"
6
7
  */
7
- export declare function getApply<E>(S: P.Semigroup<E>): P.Apply<Const1F<E>>;
8
+ export declare function getApply<E>(S: P.Semigroup<E>): P.Apply<ConstF, import("@fncts/typelevel/HKT.js").HKT.Fix<"E", E>>;
8
9
  /**
9
10
  * @tsplus static fncts.ConstOps getApplicative
10
11
  * @tsplus location "@fncts/base/data/Const/instances"
11
12
  */
12
- export declare function getApplicative<E>(M: P.Monoid<E>): P.Applicative<Const1F<E>>;
13
+ export declare function getApplicative<E>(M: P.Monoid<E>): P.Applicative<ConstF, HKT.Fix<"E", E>>;
@@ -0,0 +1,188 @@
1
+ import { Datum } from "@fncts/base/data/Datum/definition";
2
+ import { Refinement } from "@fncts/base/data/Refinement/definition";
3
+ import { Predicate } from "@fncts/base/data/Predicate/definition";
4
+ import { Maybe } from "@fncts/base/data/Maybe/definition";
5
+ import { Lazy } from "@fncts/base/data/function/definition";
6
+ import { Either } from "@fncts/base/data/Either/definition";
7
+ import type { DatumF } from "@fncts/base/data/Datum/definition";
8
+ import type * as P from "@fncts/base/typeclass";
9
+ import type { Eq } from "@fncts/base/typeclass/Eq";
10
+ import { Initial, Pending, Refresh, Replete } from "@fncts/base/data/Datum/definition";
11
+ import { Zipped } from "@fncts/base/data/Zipped";
12
+ /**
13
+ * @tsplus static fncts.DatumOps initial
14
+ * @tsplus static fncts.Datum.InitialOps __call
15
+ * @tsplus location "@fncts/base/data/Datum/api"
16
+ */
17
+ export declare function initial<A = never>(): Datum<A>;
18
+ /**
19
+ * @tsplus static fncts.DatumOps pending
20
+ * @tsplus static fncts.Datum.PendingOps __call
21
+ * @tsplus location "@fncts/base/data/Datum/api"
22
+ */
23
+ export declare function pending<A = never>(): Datum<A>;
24
+ /**
25
+ * @tsplus static fncts.DatumOps refresh
26
+ * @tsplus static fncts.Datum.RefreshOps __call
27
+ * @tsplus location "@fncts/base/data/Datum/api"
28
+ */
29
+ export declare function refresh<A>(value: A): Datum<A>;
30
+ /**
31
+ * @tsplus static fncts.DatumOps replete
32
+ * @tsplus static fncts.Datum.RepleteOps __call
33
+ * @tsplus location "@fncts/base/data/Datum/api"
34
+ */
35
+ export declare function replete<A>(value: A): Datum<A>;
36
+ /**
37
+ * @tsplus getter fncts.Datum value
38
+ * @tsplus location "@fncts/base/data/Datum/api"
39
+ */
40
+ export declare function left<E, A>(self: Datum<A>): A | undefined;
41
+ /**
42
+ * @tsplus fluent fncts.Datum isInitial
43
+ * @tsplus location "@fncts/base/data/Datum/api"
44
+ */
45
+ export declare function isInitial<A>(self: Datum<A>): self is Initial;
46
+ /**
47
+ * @tsplus fluent fncts.Datum isPending
48
+ * @tsplus location "@fncts/base/data/Datum/api"
49
+ */
50
+ export declare function isPending<A>(self: Datum<A>): self is Pending;
51
+ /**
52
+ * @tsplus fluent fncts.Datum isRefresh
53
+ * @tsplus location "@fncts/base/data/Datum/api"
54
+ */
55
+ export declare function isRefresh<A>(self: Datum<A>): self is Refresh<A>;
56
+ /**
57
+ * @tsplus fluent fncts.Datum isReplete
58
+ * @tsplus location "@fncts/base/data/Datum/api"
59
+ */
60
+ export declare function isReplete<A>(self: Datum<A>): self is Replete<A>;
61
+ /**
62
+ * @tsplus fluent fncts.Datum isEmpty
63
+ * @tsplus location "@fncts/base/data/Datum/api"
64
+ */
65
+ export declare function isEmpty<A>(self: Datum<A>): self is Initial | Pending;
66
+ /**
67
+ * @tsplus fluent fncts.Datum isNonEmpty
68
+ * @tsplus location "@fncts/base/data/Datum/api"
69
+ */
70
+ export declare function isNonEmpty<A>(self: Datum<A>): self is Refresh<A> | Replete<A>;
71
+ /**
72
+ * @tsplus fluent fncts.Datum isLoading
73
+ * @tsplus location "@fncts/base/data/Datum/api"
74
+ */
75
+ export declare function isLoading<A>(self: Datum<A>): self is Pending | Refresh<A>;
76
+ /**
77
+ * @tsplus fluent fncts.Datum elem
78
+ * @tsplus location "@fncts/base/data/Datum/api"
79
+ */
80
+ export declare function elem<A>(self: Datum<A>, a: A, /** @tsplus auto */ E: Eq<A>): boolean;
81
+ /**
82
+ * @tsplus fluent fncts.Datum exists
83
+ * @tsplus location "@fncts/base/data/Datum/api"
84
+ */
85
+ export declare function exists<A, B extends A>(self: Datum<A>, p: Refinement<A, B>): self is Datum<B>;
86
+ export declare function exists<A>(self: Datum<A>, p: Predicate<A>): boolean;
87
+ /**
88
+ * @tsplus fluent fncts.Datum extend
89
+ * @tsplus location "@fncts/base/data/Datum/api"
90
+ */
91
+ export declare function extend<A, B>(self: Datum<A>, f: (wa: Datum<A>) => B): Datum<B>;
92
+ /**
93
+ * @tsplus fluent fncts.Datum filter
94
+ * @tsplus location "@fncts/base/data/Datum/api"
95
+ */
96
+ export declare function filter<A, B extends A>(self: Datum<A>, p: Refinement<A, B>): Datum<B>;
97
+ export declare function filter<A>(self: Datum<A>, p: Predicate<A>): Datum<A>;
98
+ /**
99
+ * @tsplus fluent fncts.Datum filterMap
100
+ * @tsplus location "@fncts/base/data/Datum/api"
101
+ */
102
+ export declare function filterMap<A, B>(self: Datum<A>, f: (a: A) => Maybe<B>): Datum<B>;
103
+ /**
104
+ * @tsplus fluent fncts.Datum flatMap
105
+ * @tsplus location "@fncts/base/data/Datum/api"
106
+ */
107
+ export declare function flatMap<A, B>(self: Datum<A>, f: (a: A) => Datum<B>): Datum<B>;
108
+ /**
109
+ * @tsplus fluent fncts.Datum foldLeft
110
+ * @tsplus location "@fncts/base/data/Datum/api"
111
+ */
112
+ export declare function foldLeft<A, B>(self: Datum<A>, b: B, f: (b: B, a: A) => B): B;
113
+ /**
114
+ * @tsplus fluent fncts.Datum foldMap
115
+ * @tsplus location "@fncts/base/data/Datum/api"
116
+ */
117
+ export declare function foldMap<A, M>(self: Datum<A>, f: (a: A) => M, /** @tsplus auto */ M: P.Monoid<M>): M;
118
+ /**
119
+ * @tsplus fluent fncts.Datum foldRight
120
+ * @tsplus location "@fncts/base/data/Datum/api"
121
+ */
122
+ export declare function foldRight<A, B>(self: Datum<A>, b: B, f: (a: A, b: B) => B): B;
123
+ /**
124
+ * @tsplus fluent fncts.Datum getOrElse
125
+ * @tsplus location "@fncts/base/data/Datum/api"
126
+ */
127
+ export declare function getOrElse<A, B>(self: Datum<A>, b: Lazy<B>): A | B;
128
+ /**
129
+ * @tsplus fluent fncts.Datum match
130
+ * @tsplus location "@fncts/base/data/Datum/api"
131
+ */
132
+ export declare function match<A, B, C, D, E>(self: Datum<A>, cases: {
133
+ Initial: () => B;
134
+ Pending: () => C;
135
+ Refresh: (a: A) => D;
136
+ Replete: (a: A) => E;
137
+ }): B | C | D | E;
138
+ /**
139
+ * @tsplus fluent fncts.Datum match2
140
+ * @tsplus location "@fncts/base/data/Datum/api"
141
+ */
142
+ export declare function match2<A, B, C>(self: Datum<A>, onEmpty: (isLoading: boolean) => B, onValue: (a: A, isLoading: boolean) => C): B | C;
143
+ /**
144
+ * @tsplus fluent fncts.Datum map
145
+ * @tsplus location "@fncts/base/data/Datum/api"
146
+ */
147
+ export declare function map<A, B>(self: Datum<A>, f: (a: A) => B): Datum<B>;
148
+ /**
149
+ * @tsplus fluent fncts.Datum orElse
150
+ * @tsplus location "@fncts/base/data/Datum/api"
151
+ */
152
+ export declare function orElse<A, B>(self: Datum<A>, that: Lazy<Datum<B>>): Datum<A | B>;
153
+ /**
154
+ * @tsplus fluent fncts.Datum partition
155
+ * @tsplus location "@fncts/base/data/Datum/api"
156
+ */
157
+ export declare function partition<A, B extends A>(self: Datum<A>, p: Refinement<A, B>): [Datum<A>, Datum<B>];
158
+ export declare function partition<A>(self: Datum<A>, p: Predicate<A>): [Datum<A>, Datum<A>];
159
+ /**
160
+ * @tsplus fluent fncts.Datum partitionMap
161
+ * @tsplus location "@fncts/base/data/Datum/api"
162
+ */
163
+ export declare function partitionMap<A, B, C>(self: Datum<A>, f: (a: A) => Either<B, C>): [Datum<B>, Datum<C>];
164
+ /**
165
+ * @tsplus getter fncts.Datum toPending
166
+ * @tsplus location "@fncts/base/data/Datum/api"
167
+ */
168
+ export declare function toPending<A>(self: Datum<A>): Datum<A>;
169
+ /**
170
+ * @tsplus getter fncts.Datum toReplete
171
+ * @tsplus location "@fncts/base/data/Datum/api"
172
+ */
173
+ export declare function toReplete<A>(self: Datum<A>): Datum<A>;
174
+ /**
175
+ * @tsplus fluent fncts.Datum traverse
176
+ * @tsplus location "@fncts/base/data/Datum/api"
177
+ */
178
+ export declare const traverse: P.Traversable<DatumF>["traverse"];
179
+ /**
180
+ * @tsplus fluent fncts.Datum zip
181
+ * @tsplus location "@fncts/base/data/Datum/api"
182
+ */
183
+ export declare function zip<A, B>(self: Datum<A>, that: Datum<B>): Datum<Zipped.Make<A, B>>;
184
+ /**
185
+ * @tsplus fluent fncts.Datum zipWith
186
+ * @tsplus location "@fncts/base/data/Datum/api"
187
+ */
188
+ export declare function zipWith<A, B, C>(self: Datum<A>, that: Datum<B>, f: (a: A, b: B) => C): Datum<C>;
@@ -0,0 +1,75 @@
1
+ import { HKT } from "@fncts/typelevel/HKT";
2
+ import { Hashable } from "@fncts/base/typeclass/Hashable";
3
+ import { Equatable } from "@fncts/base/typeclass/Equatable";
4
+ export declare const enum DatumTag {
5
+ Initial = "Initial",
6
+ Pending = "Pending",
7
+ Refresh = "Refresh",
8
+ Replete = "Replete"
9
+ }
10
+ export declare const DatumTypeId: unique symbol;
11
+ export declare type DatumTypeId = typeof DatumTypeId;
12
+ export interface DatumF extends HKT {
13
+ type: Datum<this["A"]>;
14
+ variance: {
15
+ A: "+";
16
+ };
17
+ }
18
+ /**
19
+ * @tsplus type fncts.Datum
20
+ */
21
+ export declare type Datum<A> = Initial | Pending | Refresh<A> | Replete<A>;
22
+ /**
23
+ * @tsplus type fncts.DatumOps
24
+ */
25
+ export interface DatumOps {
26
+ }
27
+ export declare const Datum: DatumOps;
28
+ /**
29
+ * @tsplus type fncts.Datum.Initial
30
+ * @tsplus companion fncts.Datum.InitialOps
31
+ */
32
+ export declare class Initial implements Hashable, Equatable {
33
+ readonly _tag = DatumTag.Initial;
34
+ get [Symbol.hash](): number;
35
+ [Symbol.equals](that: unknown): boolean;
36
+ }
37
+ /**
38
+ * @tsplus type fncts.Datum.Pending
39
+ * @tsplus companion fncts.Datum.PendingOps
40
+ */
41
+ export declare class Pending implements Hashable, Equatable {
42
+ readonly _typeId: DatumTypeId;
43
+ readonly _tag = DatumTag.Pending;
44
+ get [Symbol.hash](): number;
45
+ [Symbol.equals](that: unknown): boolean;
46
+ }
47
+ /**
48
+ * @tsplus type fncts.Datum.Refresh
49
+ * @tsplus companion fncts.Datum.RefreshOps
50
+ */
51
+ export declare class Refresh<A> implements Hashable, Equatable {
52
+ readonly value: A;
53
+ readonly _typeId: DatumTypeId;
54
+ readonly _tag = DatumTag.Refresh;
55
+ constructor(value: A);
56
+ get [Symbol.hash](): number;
57
+ [Symbol.equals](that: unknown): boolean;
58
+ }
59
+ /**
60
+ * @tsplus type fncts.Datum.Replete
61
+ * @tsplus companion fncts.Datum.RepleteOps
62
+ */
63
+ export declare class Replete<A> implements Hashable, Equatable {
64
+ readonly value: A;
65
+ readonly _typeId: DatumTypeId;
66
+ readonly _tag = DatumTag.Replete;
67
+ constructor(value: A);
68
+ get [Symbol.hash](): number;
69
+ [Symbol.equals](that: unknown): boolean;
70
+ }
71
+ /**
72
+ * @tsplus static fncts.DatumOps is
73
+ * @tsplus location "@fncts/base/data/Datum/definition"
74
+ */
75
+ export declare function isDatum(u: unknown): u is Datum<unknown>;
@@ -0,0 +1,32 @@
1
+ import type { DatumF } from "./definition.js";
2
+ import type * as P from "@fncts/base/typeclass";
3
+ /**
4
+ * @tsplus static fncts.DatumOps Functor
5
+ * @tsplus implicit
6
+ * @tsplus location "@fncts/base/data/Datum/instances"
7
+ */
8
+ export declare const Functor: P.Functor<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
9
+ /**
10
+ * @tsplus static fncts.DatumOps Semimonoidal
11
+ * @tsplus implicit
12
+ * @tsplus location "@fncts/base/data/Datum/instances"
13
+ */
14
+ export declare const Semimonoidal: P.Semimonoidal<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
15
+ /**
16
+ * @tsplus static fncts.DatumOps Apply
17
+ * @tsplus implicit
18
+ * @tsplus location "@fncts/base/data/Datum/instances"
19
+ */
20
+ export declare const Apply: P.Apply<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
21
+ /**
22
+ * @tsplus static fncts.DatumOps Applicative
23
+ * @tsplus implicit
24
+ * @tsplus location "@fncts/base/data/Datum/instances"
25
+ */
26
+ export declare const Applicative: P.Applicative<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
27
+ /**
28
+ * @tsplus static fncts.DatumOps Monad
29
+ * @tsplus implicit
30
+ * @tsplus location "@fncts/base/data/Datum/instances"
31
+ */
32
+ export declare const Monad: P.Monad<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
@@ -0,0 +1,169 @@
1
+ import { DatumEither } from "@fncts/base/data/DatumEither/definition";
2
+ import { Refinement } from "@fncts/base/data/Refinement/definition";
3
+ import { Predicate } from "@fncts/base/data/Predicate/definition";
4
+ import { Maybe } from "@fncts/base/data/Maybe/definition";
5
+ import { Either } from "@fncts/base/data/Either/definition";
6
+ import { Lazy } from "@fncts/base/data/function/definition";
7
+ import { Zipped } from "@fncts/base/data/Zipped";
8
+ import type { DatumEitherF } from "@fncts/base/data/DatumEither/definition";
9
+ import type * as P from "@fncts/base/typeclass";
10
+ /**
11
+ * @tsplus static fncts.DatumEitherOps initial
12
+ * @tsplus location "@fncts/base/data/DatumEither/api"
13
+ */
14
+ export declare function initial<E = never, A = never>(): DatumEither<E, A>;
15
+ /**
16
+ * @tsplus static fncts.DatumEitherOps pending
17
+ * @tsplus location "@fncts/base/data/DatumEither/api"
18
+ */
19
+ export declare function pending<E = never, A = never>(): DatumEither<E, A>;
20
+ /**
21
+ * @tsplus static fncts.DatumEitherOps refreshLeft
22
+ * @tsplus location "@fncts/base/data/DatumEither/api"
23
+ */
24
+ export declare function refreshLeft<E, A = never>(e: E): DatumEither<E, A>;
25
+ /**
26
+ * @tsplus static fncts.DatumEitherOps refreshRight
27
+ * @tsplus location "@fncts/base/data/DatumEither/api"
28
+ */
29
+ export declare function refreshRight<E = never, A = never>(a: A): DatumEither<E, A>;
30
+ /**
31
+ * @tsplus static fncts.DatumEitherOps repleteLeft
32
+ * @tsplus location "@fncts/base/data/DatumEither/api"
33
+ */
34
+ export declare function repleteLeft<E, A = never>(e: E): DatumEither<E, A>;
35
+ /**
36
+ * @tsplus static fncts.DatumEitherOps repleteRight
37
+ * @tsplus location "@fncts/base/data/DatumEither/api"
38
+ */
39
+ export declare function repleteRight<E = never, A = never>(a: A): DatumEither<E, A>;
40
+ /**
41
+ * @tsplus fluent fncts.DatumEither bimap
42
+ * @tsplus location "@fncts/base/data/DatumEither/api"
43
+ */
44
+ export declare const bimap: <E, A, E1, B>(self: DatumEither<E, A>, f: (e: E) => E1, g: (a: A) => B) => DatumEither<E1, B>;
45
+ /**
46
+ * @tsplus fluent fncts.DatumEither exists
47
+ * @tsplus location "@fncts/base/data/DatumEither/api"
48
+ */
49
+ export declare function exists<E, A, B extends A>(self: DatumEither<E, A>, p: Refinement<A, B>): self is DatumEither<E, B>;
50
+ export declare function exists<E, A>(self: DatumEither<E, A>, p: Predicate<A>): boolean;
51
+ /**
52
+ * @tsplus fluent fncts.DatumEither filter
53
+ * @tsplus location "@fncts/base/data/DatumEither/api"
54
+ */
55
+ export declare function filter<E, A, B extends A>(self: DatumEither<E, A>, p: Refinement<A, B>): DatumEither<E, B>;
56
+ export declare function filter<E, A>(self: DatumEither<E, A>, p: Predicate<A>): DatumEither<E, A>;
57
+ /**
58
+ * @tsplus fluent fncts.DatumEither filterMap
59
+ * @tsplus location "@fncts/base/data/DatumEither/api"
60
+ */
61
+ export declare function filterMap<E, A, B>(self: DatumEither<E, A>, f: (a: A) => Maybe<B>): DatumEither<E, B>;
62
+ /**
63
+ * @tsplus fluent fncts.DatumEither flatMap
64
+ * @tsplus location "@fncts/base/data/DatumEither/api"
65
+ */
66
+ export declare const flatMap: <E, A, E1, B>(self: DatumEither<E, A>, f: (a: A) => DatumEither<E1, B>) => DatumEither<E | E1, B>;
67
+ /**
68
+ * @tsplus fluent fncts.DatumEither foldLeft
69
+ * @tsplus location "@fncts/base/data/DatumEither/api"
70
+ */
71
+ export declare function foldLeft<E, A, B>(self: DatumEither<E, A>, b: B, f: (b: B, a: A) => B): B;
72
+ /**
73
+ * @tsplus fluent fncts.DatumEither foldMap
74
+ * @tsplus location "@fncts/base/data/DatumEither/api"
75
+ */
76
+ export declare function foldMap<E, A, M>(self: DatumEither<E, A>, f: (a: A) => M, /** @tsplus auto */ M: P.Monoid<M>): M;
77
+ /**
78
+ * @tsplus fluent fncts.DatumEither foldRight
79
+ * @tsplus location "@fncts/base/data/DatumEither/api"
80
+ */
81
+ export declare function foldRight<E, A, B>(self: DatumEither<E, A>, b: B, f: (a: A, b: B) => B): B;
82
+ /**
83
+ * @tsplus fluent fncts.DatumEither getOrElse
84
+ * @tsplus location "@fncts/base/data/DatumEither/api"
85
+ */
86
+ export declare function getOrElse<E, A, B, C>(self: DatumEither<E, A>, onEmpty: () => B, onLeft: (e: E) => C): A | B | C;
87
+ /**
88
+ * @tsplus fluent fncts.DatumEither map
89
+ * @tsplus location "@fncts/base/data/DatumEither/api"
90
+ */
91
+ export declare const map: <E, A, B>(self: DatumEither<E, A>, f: (a: A) => B) => DatumEither<E, B>;
92
+ /**
93
+ * @tsplus fluent fncts.DatumEither mapLeft
94
+ * @tsplus location "@fncts/base/data/DatumEither/api"
95
+ */
96
+ export declare const mapLeft: <E, A, E1>(self: DatumEither<E, A>, f: (e: E) => E1) => DatumEither<E1, A>;
97
+ /**
98
+ * @tsplus fluent fncts.DatumEither match
99
+ * @tsplus location "@fncts/base/data/DatumEither/api"
100
+ */
101
+ export declare function match<E, A, B, C, D, F>(self: DatumEither<E, A>, onInitial: () => B, onPending: () => C, onLeft: (e: E, isLoading: boolean) => D, onRight: (a: A, isLoading: boolean) => F): B | C | D | F;
102
+ /**
103
+ * @tsplus fluent fncts.DatumEither match3
104
+ * @tsplus location "@fncts/base/data/DatumEither/api"
105
+ */
106
+ export declare function match3<E, A, B, C, D>(self: DatumEither<E, A>, onEmpty: (loading: boolean) => B, onLeft: (e: E, loading: boolean) => C, onRight: (a: A, loading: boolean) => D): B | C | D;
107
+ /**
108
+ * @tsplus fluent fncts.DatumEither matchAll
109
+ * @tsplus location "@fncts/base/data/DatumEither/api"
110
+ */
111
+ export declare function matchAll<E, A, B, C, D, F, G, H>(self: DatumEither<E, A>, cases: {
112
+ Initial: () => B;
113
+ Pending: () => C;
114
+ RefreshLeft: (e: E) => D;
115
+ RefreshRight: (a: A) => F;
116
+ RepleteLeft: (e: E) => G;
117
+ RepleteRight: (a: A) => H;
118
+ }): B | C | D | F | G | H;
119
+ /**
120
+ * @tsplus fluent fncts.DatumEither matchEither
121
+ * @tsplus location "@fncts/base/data/DatumEither/api"
122
+ */
123
+ export declare const matchEither: <E, A, B, C, D, F>(self: DatumEither<E, A>, cases: {
124
+ Initial: () => B;
125
+ Pending: () => C;
126
+ Refresh: (value: Either<E, A>) => D;
127
+ Replete: (value: Either<E, A>) => F;
128
+ }) => B | C | D | F;
129
+ /**
130
+ * @tsplus fluent fncts.DatumEither orElse
131
+ * @tsplus location "@fncts/base/data/DatumEither/api"
132
+ */
133
+ export declare const orElse: <E, A, E1, B>(self: DatumEither<E, A>, that: Lazy<DatumEither<E1, B>>) => DatumEither<E | E1, A | B>;
134
+ /**
135
+ * @tsplus fluent fncts.DatumEither partition
136
+ * @tsplus location "@fncts/base/data/DatumEither/api"
137
+ */
138
+ export declare function partition<E, A, B extends A>(self: DatumEither<E, A>, p: Refinement<A, B>): [DatumEither<E, A>, DatumEither<E, B>];
139
+ export declare function partition<E, A>(self: DatumEither<E, A>, p: Predicate<A>): [DatumEither<E, A>, DatumEither<E, A>];
140
+ /**
141
+ * @tsplus fluent fncts.DatumEither partitionMap
142
+ * @tsplus location "@fncts/base/data/DatumEither/api"
143
+ */
144
+ export declare function partitionMap<E, A, B, C>(self: DatumEither<E, A>, f: (a: A) => Either<B, C>): [DatumEither<E, B>, DatumEither<E, C>];
145
+ /**
146
+ * @tsplus getter fncts.DatumEither toPending
147
+ * @tsplus location "@fncts/base/data/DatumEither/api"
148
+ */
149
+ export declare const toPending: <E, A>(self: DatumEither<E, A>) => DatumEither<E, A>;
150
+ /**
151
+ * @tsplus getter fncts.DatumEither toReplete
152
+ * @tsplus location "@fncts/base/data/DatumEither/api"
153
+ */
154
+ export declare const toReplete: <E, A>(self: DatumEither<E, A>) => DatumEither<E, A>;
155
+ /**
156
+ * @tsplus fluent fncts.DatumEither traverse
157
+ * @tsplus location "@fncts/base/data/DatumEither/api"
158
+ */
159
+ export declare const traverse: P.Traversable<DatumEitherF>["traverse"];
160
+ /**
161
+ * @tsplus fluent fncts.DatumEither zipWith
162
+ * @tsplus location "@fncts/base/data/DatumEither/api"
163
+ */
164
+ export declare const zipWith: <E, A, E1, B, C>(self: DatumEither<E, A>, that: DatumEither<E1, B>, f: (a: A, b: B) => C) => DatumEither<E | E1, C>;
165
+ /**
166
+ * @tsplus fluent fncts.DatumEither zip
167
+ * @tsplus location "@fncts/base/data/DatumEither/api"
168
+ */
169
+ export declare function zip<E, A, E1, B>(self: DatumEither<E, A>, that: DatumEither<E1, B>): DatumEither<E | E1, Zipped.Make<A, B>>;
@@ -0,0 +1,21 @@
1
+ import { HKT } from "@fncts/typelevel/HKT";
2
+ import { Datum } from "@fncts/base/data/Datum/definition";
3
+ import { Either } from "@fncts/base/data/Either/definition";
4
+ export interface DatumEitherF extends HKT {
5
+ type: DatumEither<this["E"], this["A"]>;
6
+ variance: {
7
+ E: "+";
8
+ A: "+";
9
+ };
10
+ }
11
+ /**
12
+ * @tsplus type fncts.DatumEither
13
+ * @tsplus no-inherit fncts.Datum
14
+ */
15
+ export declare type DatumEither<E, A> = Datum<Either<E, A>>;
16
+ /**
17
+ * @tsplus type fncts.DatumEitherOps
18
+ */
19
+ export interface DatumEitherOps {
20
+ }
21
+ export declare const DatumEither: DatumEitherOps;
@@ -3,7 +3,11 @@ import { These } from "@fncts/base/data/These";
3
3
  import type { DecodeError } from "@fncts/base/data/DecodeError";
4
4
  export declare const DecoderTypeId: unique symbol;
5
5
  export declare type DecoderTypeId = typeof DecoderTypeId;
6
- export interface DecoderF extends Decoder<any> {
6
+ export interface DecoderF extends HKT {
7
+ type: Decoder<this["A"]>;
8
+ variance: {
9
+ A: "+";
10
+ };
7
11
  }
8
12
  /**
9
13
  * @tsplus type fncts.Decoder
@@ -13,9 +17,7 @@ export declare class Decoder<A> {
13
17
  readonly decode: (input: unknown) => These<DecodeError, A>;
14
18
  readonly label: string;
15
19
  readonly _typeId: DecoderTypeId;
16
- readonly [HKT.F]: DecoderF;
17
- readonly [HKT.A]: () => A;
18
- readonly [HKT.T]: Decoder<HKT._A<this>>;
20
+ readonly _A: () => A;
19
21
  constructor(decode: (input: unknown) => These<DecodeError, A>, label: string);
20
22
  }
21
23
  /**
@@ -1,6 +1,7 @@
1
1
  import { Either } from "@fncts/base/data/Either/definition";
2
2
  import { Maybe } from "@fncts/base/data/Maybe/definition";
3
3
  import { Lazy } from "@fncts/base/data/function/definition";
4
+ import { Zipped } from "@fncts/base/data/Zipped";
4
5
  import { Predicate } from "@fncts/base/data/Predicate/definition";
5
6
  import type * as P from "../../typeclass.js";
6
7
  import type { EitherF } from "./definition.js";
@@ -118,7 +119,16 @@ export declare function swap<E, A>(self: Either<E, A>): Either<A, E>;
118
119
  * @tsplus location "@fncts/base/data/Either/api"
119
120
  */
120
121
  export declare const traverse_: P.Traversable<EitherF>["traverse"];
122
+ /**
123
+ * @tsplus fluent fncts.Either zipWith
124
+ * @tsplus location "@fncts/base/data/Either/api"
125
+ */
121
126
  export declare function zipWith_<E1, A, E2, B, C>(self: Either<E1, A>, fb: Either<E2, B>, f: (a: A, b: B) => C): Either<E1 | E2, C>;
127
+ /**
128
+ * @tsplus fluent fncts.Either zip
129
+ * @tsplus location "@fncts/base/data/Either/api"
130
+ */
131
+ export declare function zip<E, A, E1, B>(self: Either<E, A>, that: Either<E1, B>): Either<E | E1, Zipped.Make<A, B>>;
122
132
  /**
123
133
  * @tsplus fluent fncts.Either filterMap
124
134
  * @tsplus location "@fncts/base/data/Either/api"
@@ -5,9 +5,12 @@ export declare const enum EitherTag {
5
5
  }
6
6
  export declare const EitherTypeId: unique symbol;
7
7
  export declare type EitherTypeId = typeof EitherTypeId;
8
- export interface EitherF extends Either<any, any> {
9
- }
10
- export interface Either1F<E> extends Either1<E, any> {
8
+ export interface EitherF extends HKT {
9
+ type: Either<this["E"], this["A"]>;
10
+ variance: {
11
+ E: "+";
12
+ A: "+";
13
+ };
11
14
  }
12
15
  /**
13
16
  * @tsplus type fncts.Either
@@ -15,17 +18,8 @@ export interface Either1F<E> extends Either1<E, any> {
15
18
  */
16
19
  export declare class Either<E, A> {
17
20
  readonly _typeId: EitherTypeId;
18
- readonly [HKT.F]: EitherF;
19
- readonly [HKT.E]: () => E;
20
- readonly [HKT.A]: () => A;
21
- readonly [HKT.T]: Either<HKT._E<this>, HKT._A<this>>;
22
- }
23
- export interface Either1<E, A> {
24
- readonly _typeId: EitherTypeId;
25
- readonly [HKT.F]: EitherF;
26
- readonly [HKT.E]: () => E;
27
- readonly [HKT.A]: () => A;
28
- readonly [HKT.T]: Either<E, HKT._A<this>>;
21
+ readonly _E: () => E;
22
+ readonly _A: () => A;
29
23
  }
30
24
  /**
31
25
  * @tsplus type fncts.Either.Left