@fncts/base 0.0.19 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (995) hide show
  1. package/_cjs/collection/Iterable/api/traverseConc.cjs +8 -8
  2. package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
  3. package/_cjs/collection/Iterable/api.cjs +497 -444
  4. package/_cjs/collection/Iterable/api.cjs.map +1 -1
  5. package/_cjs/collection/Iterable/constructors.cjs +7 -7
  6. package/_cjs/collection/Iterable/constructors.cjs.map +1 -1
  7. package/_cjs/collection/compat/Array/api.cjs +16 -12
  8. package/_cjs/collection/compat/Array/api.cjs.map +1 -1
  9. package/_cjs/collection/compat/Array/derivations.cjs +41 -19
  10. package/_cjs/collection/compat/Array/derivations.cjs.map +1 -1
  11. package/_cjs/collection/compat/ArrayLike/api.cjs +1 -1
  12. package/_cjs/collection/compat/ArrayLike/api.cjs.map +1 -1
  13. package/_cjs/collection/compat/Record/instances.cjs +39 -3
  14. package/_cjs/collection/compat/Record/instances.cjs.map +1 -1
  15. package/_cjs/collection/immutable/Conc/api/makeBy.cjs +1 -1
  16. package/_cjs/collection/immutable/Conc/api/makeBy.cjs.map +1 -1
  17. package/_cjs/collection/immutable/Conc/api.cjs +866 -765
  18. package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
  19. package/_cjs/collection/immutable/Conc/definition.cjs +55 -53
  20. package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
  21. package/_cjs/collection/immutable/Conc/derivations.cjs +13 -2
  22. package/_cjs/collection/immutable/Conc/derivations.cjs.map +1 -1
  23. package/_cjs/collection/immutable/Conc.cjs.map +1 -1
  24. package/_cjs/collection/immutable/Dictionary/api.cjs +57 -44
  25. package/_cjs/collection/immutable/Dictionary/api.cjs.map +1 -1
  26. package/_cjs/collection/immutable/HashMap/api.cjs +351 -258
  27. package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
  28. package/_cjs/collection/immutable/HashMap/definition.cjs +1 -1
  29. package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
  30. package/_cjs/collection/immutable/HashMap/internal.cjs.map +1 -1
  31. package/_cjs/collection/immutable/HashSet/api.cjs +230 -192
  32. package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
  33. package/_cjs/collection/immutable/HashSet/definition.cjs +1 -1
  34. package/_cjs/collection/immutable/HashSet/definition.cjs.map +1 -1
  35. package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs +6 -4
  36. package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs.map +1 -1
  37. package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs +6 -4
  38. package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs.map +1 -1
  39. package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs +6 -4
  40. package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs.map +1 -1
  41. package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs +15 -13
  42. package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs.map +1 -1
  43. package/_cjs/collection/immutable/ImmutableArray/api.cjs +943 -749
  44. package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
  45. package/_cjs/collection/immutable/ImmutableArray/derivations.cjs +12 -1
  46. package/_cjs/collection/immutable/ImmutableArray/derivations.cjs.map +1 -1
  47. package/_cjs/collection/immutable/ImmutableArray/instances.cjs +33 -33
  48. package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
  49. package/_cjs/collection/immutable/ImmutableArray.cjs.map +1 -1
  50. package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +338 -273
  51. package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -1
  52. package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs.map +1 -1
  53. package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
  54. package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs +15 -4
  55. package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs.map +1 -1
  56. package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs +2 -2
  57. package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs.map +1 -1
  58. package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +12 -12
  59. package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
  60. package/_cjs/collection/immutable/List/api/foldLeft.cjs +12 -10
  61. package/_cjs/collection/immutable/List/api/foldLeft.cjs.map +1 -1
  62. package/_cjs/collection/immutable/List/api.cjs +164 -141
  63. package/_cjs/collection/immutable/List/api.cjs.map +1 -1
  64. package/_cjs/collection/immutable/List.cjs.map +1 -1
  65. package/_cjs/collection/immutable/Queue/api.cjs +64 -48
  66. package/_cjs/collection/immutable/Queue/api.cjs.map +1 -1
  67. package/_cjs/collection/immutable/Queue/definition.cjs +1 -1
  68. package/_cjs/collection/immutable/Queue/definition.cjs.map +1 -1
  69. package/_cjs/collection/immutable/RoseTree/api.cjs +50 -36
  70. package/_cjs/collection/immutable/RoseTree/api.cjs.map +1 -1
  71. package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -1
  72. package/_cjs/collection/immutable/SortedMap/api.cjs +408 -368
  73. package/_cjs/collection/immutable/SortedMap/api.cjs.map +1 -1
  74. package/_cjs/collection/immutable/Vector/api.cjs +723 -608
  75. package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
  76. package/_cjs/collection/immutable/Vector/definition.cjs +18 -16
  77. package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
  78. package/_cjs/collection/immutable/Vector/internal.cjs +40 -39
  79. package/_cjs/collection/immutable/Vector/internal.cjs.map +1 -1
  80. package/_cjs/collection/mutable/HashMap.cjs +3 -5
  81. package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
  82. package/_cjs/collection/mutable/HashSet.cjs.map +1 -1
  83. package/_cjs/collection/mutable/ListBuffer.cjs +2 -2
  84. package/_cjs/collection/mutable/ListBuffer.cjs.map +1 -1
  85. package/_cjs/collection/mutable/internal.cjs +0 -2
  86. package/_cjs/collection/mutable/internal.cjs.map +1 -1
  87. package/_cjs/collection/weak/IterableWeakMap.cjs +7 -7
  88. package/_cjs/collection/weak/IterableWeakMap.cjs.map +1 -1
  89. package/_cjs/collection/weak/IterableWeakSet.cjs +7 -7
  90. package/_cjs/collection/weak/IterableWeakSet.cjs.map +1 -1
  91. package/_cjs/control/Eval/api.cjs +55 -43
  92. package/_cjs/control/Eval/api.cjs.map +1 -1
  93. package/_cjs/control/Eval/instance.cjs +4 -4
  94. package/_cjs/control/Eval/instance.cjs.map +1 -1
  95. package/_cjs/control/Eval/run.cjs +1 -1
  96. package/_cjs/control/Eval/run.cjs.map +1 -1
  97. package/_cjs/control/Z/api.cjs +241 -172
  98. package/_cjs/control/Z/api.cjs.map +1 -1
  99. package/_cjs/control/Z/instances.cjs +3 -3
  100. package/_cjs/control/Z/instances.cjs.map +1 -1
  101. package/_cjs/control/Z/runtime.cjs +250 -241
  102. package/_cjs/control/Z/runtime.cjs.map +1 -1
  103. package/_cjs/data/Branded/definition.cjs.map +1 -1
  104. package/_cjs/data/Branded/derivations.cjs +3 -3
  105. package/_cjs/data/Branded/derivations.cjs.map +1 -1
  106. package/_cjs/data/CaseClass.cjs.map +1 -1
  107. package/_cjs/data/Cause/api/fold.cjs +20 -18
  108. package/_cjs/data/Cause/api/fold.cjs.map +1 -1
  109. package/_cjs/data/Cause/api/isEmpty.cjs +1 -1
  110. package/_cjs/data/Cause/api/isEmpty.cjs.map +1 -1
  111. package/_cjs/data/Cause/api/linearize.cjs +8 -8
  112. package/_cjs/data/Cause/api/linearize.cjs.map +1 -1
  113. package/_cjs/data/Cause/api/prettyPrint.cjs +1 -1
  114. package/_cjs/data/Cause/api/prettyPrint.cjs.map +1 -1
  115. package/_cjs/data/Cause/api.cjs +160 -140
  116. package/_cjs/data/Cause/api.cjs.map +1 -1
  117. package/_cjs/data/Cause/definition.cjs +18 -18
  118. package/_cjs/data/Cause/definition.cjs.map +1 -1
  119. package/_cjs/data/Cause.cjs.map +1 -1
  120. package/_cjs/data/Const/api.cjs +8 -6
  121. package/_cjs/data/Const/api.cjs.map +1 -1
  122. package/_cjs/data/Const/instances.cjs +4 -4
  123. package/_cjs/data/Const/instances.cjs.map +1 -1
  124. package/_cjs/data/Datum/api.cjs +219 -176
  125. package/_cjs/data/Datum/api.cjs.map +1 -1
  126. package/_cjs/data/Datum/definition.cjs.map +1 -1
  127. package/_cjs/data/DatumEither/api.cjs +165 -133
  128. package/_cjs/data/DatumEither/api.cjs.map +1 -1
  129. package/_cjs/data/DecodeError/definition.cjs +14 -14
  130. package/_cjs/data/DecodeError/definition.cjs.map +1 -1
  131. package/_cjs/data/Decoder/api.cjs +9 -7
  132. package/_cjs/data/Decoder/api.cjs.map +1 -1
  133. package/_cjs/data/Duration/api.cjs +18 -12
  134. package/_cjs/data/Duration/api.cjs.map +1 -1
  135. package/_cjs/data/Either/api/align.cjs +8 -3
  136. package/_cjs/data/Either/api/align.cjs.map +1 -1
  137. package/_cjs/data/Either/api/alignWith.cjs +14 -12
  138. package/_cjs/data/Either/api/alignWith.cjs.map +1 -1
  139. package/_cjs/data/Either/api.cjs +206 -169
  140. package/_cjs/data/Either/api.cjs.map +1 -1
  141. package/_cjs/data/Either/constructors.cjs +11 -9
  142. package/_cjs/data/Either/constructors.cjs.map +1 -1
  143. package/_cjs/data/Either/destructors.cjs +16 -14
  144. package/_cjs/data/Either/destructors.cjs.map +1 -1
  145. package/_cjs/data/Either/instances.cjs +8 -8
  146. package/_cjs/data/Either/instances.cjs.map +1 -1
  147. package/_cjs/data/EitherT/api.cjs +8 -8
  148. package/_cjs/data/EitherT/api.cjs.map +1 -1
  149. package/_cjs/data/Encoder/api.cjs +134 -0
  150. package/_cjs/data/Encoder/api.cjs.map +1 -0
  151. package/_cjs/data/Encoder/definition.cjs +25 -0
  152. package/_cjs/data/Encoder/definition.cjs.map +1 -0
  153. package/_cjs/data/{Patch.cjs → Encoder.cjs} +3 -3
  154. package/_cjs/data/Encoder.cjs.map +1 -0
  155. package/_cjs/data/Environment/api.cjs +45 -33
  156. package/_cjs/data/Environment/api.cjs.map +1 -1
  157. package/_cjs/data/Environment/definition.cjs.map +1 -1
  158. package/_cjs/data/{Patch/api.cjs → EnvironmentPatch.cjs} +134 -38
  159. package/_cjs/data/EnvironmentPatch.cjs.map +1 -0
  160. package/_cjs/data/ExecutionStrategy.cjs +21 -29
  161. package/_cjs/data/ExecutionStrategy.cjs.map +1 -1
  162. package/_cjs/data/Exit/api.cjs +159 -127
  163. package/_cjs/data/Exit/api.cjs.map +1 -1
  164. package/_cjs/data/Exit/constructors.cjs +4 -4
  165. package/_cjs/data/Exit/constructors.cjs.map +1 -1
  166. package/_cjs/data/FiberId/api.cjs +23 -21
  167. package/_cjs/data/FiberId/api.cjs.map +1 -1
  168. package/_cjs/data/FiberId/constructors.cjs.map +1 -1
  169. package/_cjs/data/Identity/api.cjs +26 -18
  170. package/_cjs/data/Identity/api.cjs.map +1 -1
  171. package/_cjs/data/Identity/instances.cjs +3 -3
  172. package/_cjs/data/Identity/instances.cjs.map +1 -1
  173. package/_cjs/data/Interval.cjs +43 -33
  174. package/_cjs/data/Interval.cjs.map +1 -1
  175. package/_cjs/data/Intervals.cjs +35 -27
  176. package/_cjs/data/Intervals.cjs.map +1 -1
  177. package/_cjs/data/Maybe/api.cjs +160 -125
  178. package/_cjs/data/Maybe/api.cjs.map +1 -1
  179. package/_cjs/data/Maybe/constructors.cjs +2 -2
  180. package/_cjs/data/Maybe/constructors.cjs.map +1 -1
  181. package/_cjs/data/Maybe/definition.cjs.map +1 -1
  182. package/_cjs/data/Maybe/destructors.cjs +9 -7
  183. package/_cjs/data/Maybe/destructors.cjs.map +1 -1
  184. package/_cjs/data/Maybe/instances.cjs +11 -11
  185. package/_cjs/data/Maybe/instances.cjs.map +1 -1
  186. package/_cjs/data/Predicate/api.cjs +10 -8
  187. package/_cjs/data/Predicate/api.cjs.map +1 -1
  188. package/_cjs/data/Refinement/api.cjs +15 -9
  189. package/_cjs/data/Refinement/api.cjs.map +1 -1
  190. package/_cjs/data/Struct/api.cjs +62 -50
  191. package/_cjs/data/Struct/api.cjs.map +1 -1
  192. package/_cjs/data/Tag/constructors.cjs +3 -2
  193. package/_cjs/data/Tag/constructors.cjs.map +1 -1
  194. package/_cjs/data/Tag/definition.cjs +0 -3
  195. package/_cjs/data/Tag/definition.cjs.map +1 -1
  196. package/_cjs/data/These/api.cjs +188 -170
  197. package/_cjs/data/These/api.cjs.map +1 -1
  198. package/_cjs/data/These/constructors.cjs +1 -1
  199. package/_cjs/data/These/constructors.cjs.map +1 -1
  200. package/_cjs/data/These/destructors.cjs +39 -35
  201. package/_cjs/data/These/destructors.cjs.map +1 -1
  202. package/_cjs/data/These/instances.cjs +1 -1
  203. package/_cjs/data/These/instances.cjs.map +1 -1
  204. package/_cjs/data/Trace/api.cjs +7 -5
  205. package/_cjs/data/Trace/api.cjs.map +1 -1
  206. package/_cjs/data/Zipped.cjs.map +1 -1
  207. package/_cjs/data/function/api.cjs +6 -4
  208. package/_cjs/data/function/api.cjs.map +1 -1
  209. package/_cjs/data/function/pipe.cjs +9 -0
  210. package/_cjs/data/function/pipe.cjs.map +1 -1
  211. package/_cjs/data/string/api.cjs +53 -96
  212. package/_cjs/data/string/api.cjs.map +1 -1
  213. package/_cjs/global/api.cjs +4 -2
  214. package/_cjs/global/api.cjs.map +1 -1
  215. package/_cjs/internal/AtomicBoolean.cjs.map +1 -1
  216. package/_cjs/internal/AtomicNumber.cjs.map +1 -1
  217. package/_cjs/internal/AtomicReference.cjs.map +1 -1
  218. package/_cjs/internal/Stack.cjs +2 -2
  219. package/_cjs/internal/Stack.cjs.map +1 -1
  220. package/_cjs/optics/At/api.cjs +1 -1
  221. package/_cjs/optics/At/api.cjs.map +1 -1
  222. package/_cjs/optics/At/definition.cjs +2 -2
  223. package/_cjs/optics/At/definition.cjs.map +1 -1
  224. package/_cjs/optics/Fold/definition.cjs +3 -4
  225. package/_cjs/optics/Fold/definition.cjs.map +1 -1
  226. package/_cjs/optics/Getter/definition.cjs +2 -3
  227. package/_cjs/optics/Getter/definition.cjs.map +1 -1
  228. package/_cjs/optics/Index/api.cjs +4 -4
  229. package/_cjs/optics/Index/api.cjs.map +1 -1
  230. package/_cjs/optics/Index/definition.cjs +2 -2
  231. package/_cjs/optics/Index/definition.cjs.map +1 -1
  232. package/_cjs/optics/Iso/api.cjs +9 -7
  233. package/_cjs/optics/Iso/api.cjs.map +1 -1
  234. package/_cjs/optics/Iso/definition.cjs +12 -12
  235. package/_cjs/optics/Iso/definition.cjs.map +1 -1
  236. package/_cjs/optics/Lens/api.cjs +54 -44
  237. package/_cjs/optics/Lens/api.cjs.map +1 -1
  238. package/_cjs/optics/Lens/definition.cjs +10 -10
  239. package/_cjs/optics/Lens/definition.cjs.map +1 -1
  240. package/_cjs/optics/Optional/api/compose.cjs +9 -7
  241. package/_cjs/optics/Optional/api/compose.cjs.map +1 -1
  242. package/_cjs/optics/Optional/definition.cjs +12 -13
  243. package/_cjs/optics/Optional/definition.cjs.map +1 -1
  244. package/_cjs/optics/Optional.cjs.map +1 -1
  245. package/_cjs/optics/Prism/api/compose.cjs +9 -7
  246. package/_cjs/optics/Prism/api/compose.cjs.map +1 -1
  247. package/_cjs/optics/Prism/api/fromNullable.cjs +2 -2
  248. package/_cjs/optics/Prism/api/fromNullable.cjs.map +1 -1
  249. package/_cjs/optics/Prism/api/just.cjs +2 -2
  250. package/_cjs/optics/Prism/api/just.cjs.map +1 -1
  251. package/_cjs/optics/Prism/definition.cjs +9 -9
  252. package/_cjs/optics/Prism/definition.cjs.map +1 -1
  253. package/_cjs/optics/Prism.cjs.map +1 -1
  254. package/_cjs/optics/Setter/definition.cjs +8 -13
  255. package/_cjs/optics/Setter/definition.cjs.map +1 -1
  256. package/_cjs/optics/Traversal/api/compose.cjs +8 -6
  257. package/_cjs/optics/Traversal/api/compose.cjs.map +1 -1
  258. package/_cjs/optics/Traversal/api/fromTraversable.cjs +2 -2
  259. package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
  260. package/_cjs/optics/Traversal/definition.cjs +12 -12
  261. package/_cjs/optics/Traversal/definition.cjs.map +1 -1
  262. package/_cjs/optics/Traversal.cjs.map +1 -1
  263. package/_cjs/typeclass/Align.cjs.map +1 -1
  264. package/_cjs/typeclass/Alt.cjs.map +1 -1
  265. package/_cjs/typeclass/Applicative.cjs.map +1 -1
  266. package/_cjs/typeclass/ApplicativeExcept.cjs +5 -10
  267. package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
  268. package/_cjs/typeclass/Apply.cjs +8 -8
  269. package/_cjs/typeclass/Apply.cjs.map +1 -1
  270. package/_cjs/typeclass/Chain.cjs +4 -4
  271. package/_cjs/typeclass/Chain.cjs.map +1 -1
  272. package/_cjs/typeclass/Eq/definition.cjs.map +1 -1
  273. package/_cjs/typeclass/Eq/derivations.cjs.map +1 -1
  274. package/_cjs/typeclass/Equatable/api.cjs.map +1 -1
  275. package/_cjs/typeclass/Equatable/definition.cjs.map +1 -1
  276. package/_cjs/typeclass/Equatable/fast-equals.cjs.map +1 -1
  277. package/_cjs/typeclass/Filterable.cjs.map +1 -1
  278. package/_cjs/typeclass/FilterableWithIndex.cjs.map +1 -1
  279. package/_cjs/typeclass/Foldable.cjs +1 -1
  280. package/_cjs/typeclass/Foldable.cjs.map +1 -1
  281. package/_cjs/typeclass/FoldableWithIndex.cjs +1 -1
  282. package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -1
  283. package/_cjs/typeclass/Functor.cjs.map +1 -1
  284. package/_cjs/typeclass/FunctorWithIndex.cjs.map +1 -1
  285. package/_cjs/typeclass/Guard/api.cjs +18 -10
  286. package/_cjs/typeclass/Guard/api.cjs.map +1 -1
  287. package/_cjs/typeclass/Guard/definition.cjs.map +1 -1
  288. package/_cjs/typeclass/Guard/derivations.cjs.map +1 -1
  289. package/_cjs/typeclass/Has.cjs +7 -5
  290. package/_cjs/typeclass/Has.cjs.map +1 -1
  291. package/_cjs/typeclass/HashEq.cjs.map +1 -1
  292. package/_cjs/typeclass/Hashable/definition.cjs.map +1 -1
  293. package/_cjs/typeclass/Hashable/hash.cjs.map +1 -1
  294. package/_cjs/typeclass/MonadExcept.cjs +1 -1
  295. package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
  296. package/_cjs/typeclass/Ord/api/contramap.cjs +7 -5
  297. package/_cjs/typeclass/Ord/api/contramap.cjs.map +1 -1
  298. package/_cjs/typeclass/Ord/api/max.cjs.map +1 -1
  299. package/_cjs/typeclass/Ord/api/min.cjs.map +1 -1
  300. package/_cjs/typeclass/Ord/definition.cjs.map +1 -1
  301. package/_cjs/typeclass/Ord/instances.cjs.map +1 -1
  302. package/_cjs/typeclass/Ordering.cjs.map +1 -1
  303. package/_cjs/typeclass/Semialign.cjs +7 -7
  304. package/_cjs/typeclass/Semialign.cjs.map +1 -1
  305. package/_cjs/typeclass/Semigroup/api.cjs.map +1 -1
  306. package/_cjs/typeclass/Semigroup/definition.cjs.map +1 -1
  307. package/_cjs/typeclass/Semigroup/derivations.cjs.map +1 -1
  308. package/_cjs/typeclass/Semimonoidal.cjs.map +1 -1
  309. package/_cjs/typeclass/Showable/definition.cjs.map +1 -1
  310. package/_cjs/typeclass/Showable/show.cjs +107 -107
  311. package/_cjs/typeclass/Showable/show.cjs.map +1 -1
  312. package/_cjs/typeclass/Showable/styles.cjs.map +1 -1
  313. package/_cjs/typeclass/Showable/util.cjs +1 -1
  314. package/_cjs/typeclass/Showable/util.cjs.map +1 -1
  315. package/_cjs/typeclass/Traversable.cjs +1 -2
  316. package/_cjs/typeclass/Traversable.cjs.map +1 -1
  317. package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -1
  318. package/_cjs/typeclass/Witherable.cjs +3 -1
  319. package/_cjs/typeclass/Witherable.cjs.map +1 -1
  320. package/_cjs/typeclass/WitherableWithIndex.cjs +3 -1
  321. package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
  322. package/_cjs/util/AnsiFormat.cjs +11 -11
  323. package/_cjs/util/AnsiFormat.cjs.map +1 -1
  324. package/_cjs/util/PCGRandom.cjs.map +1 -1
  325. package/_cjs/util/assert.cjs.map +1 -1
  326. package/_cjs/util/pattern.cjs.map +1 -1
  327. package/_cjs/util/predicates.cjs.map +1 -1
  328. package/_cjs/util/rand/Random.cjs.map +1 -1
  329. package/_cjs/util/rand/distribution/UniformArrayIntDistribution.cjs.map +1 -1
  330. package/_cjs/util/rand/distribution/UniformBigIntDistribution.cjs.map +1 -1
  331. package/_cjs/util/rand/distribution/UniformIntDistribution.cjs.map +1 -1
  332. package/_cjs/util/rand/distribution/internals/ArrayInt.cjs.map +1 -1
  333. package/_cjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.cjs.map +1 -1
  334. package/_cjs/util/rand/distribution/internals/UniformIntDistributionInternal.cjs.map +1 -1
  335. package/_cjs/util/rand/generator/MersenneTwister.cjs.map +1 -1
  336. package/_cjs/util/rand/generator/RandomGenerator.cjs.map +1 -1
  337. package/_cjs/util/rand.cjs.map +1 -1
  338. package/_mjs/collection/Iterable/api/traverseConc.mjs +5 -5
  339. package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -1
  340. package/_mjs/collection/Iterable/api.mjs +465 -411
  341. package/_mjs/collection/Iterable/api.mjs.map +1 -1
  342. package/_mjs/collection/Iterable/constructors.mjs +5 -5
  343. package/_mjs/collection/Iterable/constructors.mjs.map +1 -1
  344. package/_mjs/collection/compat/Array/api.mjs +16 -12
  345. package/_mjs/collection/compat/Array/api.mjs.map +1 -1
  346. package/_mjs/collection/compat/Array/derivations.mjs +35 -19
  347. package/_mjs/collection/compat/Array/derivations.mjs.map +1 -1
  348. package/_mjs/collection/compat/ArrayLike/api.mjs +1 -1
  349. package/_mjs/collection/compat/ArrayLike/api.mjs.map +1 -1
  350. package/_mjs/collection/compat/Record/instances.mjs +34 -3
  351. package/_mjs/collection/compat/Record/instances.mjs.map +1 -1
  352. package/_mjs/collection/immutable/Conc/api/makeBy.mjs +1 -1
  353. package/_mjs/collection/immutable/Conc/api/makeBy.mjs.map +1 -1
  354. package/_mjs/collection/immutable/Conc/api.mjs +795 -697
  355. package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
  356. package/_mjs/collection/immutable/Conc/definition.mjs +53 -51
  357. package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
  358. package/_mjs/collection/immutable/Conc/derivations.mjs +10 -2
  359. package/_mjs/collection/immutable/Conc/derivations.mjs.map +1 -1
  360. package/_mjs/collection/immutable/Conc.mjs.map +1 -1
  361. package/_mjs/collection/immutable/Dictionary/api.mjs +47 -35
  362. package/_mjs/collection/immutable/Dictionary/api.mjs.map +1 -1
  363. package/_mjs/collection/immutable/HashMap/api.mjs +295 -217
  364. package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
  365. package/_mjs/collection/immutable/HashMap/definition.mjs +1 -1
  366. package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
  367. package/_mjs/collection/immutable/HashMap/internal.mjs.map +1 -1
  368. package/_mjs/collection/immutable/HashSet/api.mjs +206 -168
  369. package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
  370. package/_mjs/collection/immutable/HashSet/definition.mjs +1 -1
  371. package/_mjs/collection/immutable/HashSet/definition.mjs.map +1 -1
  372. package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs +5 -3
  373. package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs.map +1 -1
  374. package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs +5 -3
  375. package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs.map +1 -1
  376. package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs +5 -3
  377. package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs.map +1 -1
  378. package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs +13 -11
  379. package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs.map +1 -1
  380. package/_mjs/collection/immutable/ImmutableArray/api.mjs +816 -629
  381. package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
  382. package/_mjs/collection/immutable/ImmutableArray/derivations.mjs +9 -1
  383. package/_mjs/collection/immutable/ImmutableArray/derivations.mjs.map +1 -1
  384. package/_mjs/collection/immutable/ImmutableArray/instances.mjs +34 -34
  385. package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
  386. package/_mjs/collection/immutable/ImmutableArray.mjs.map +1 -1
  387. package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +301 -239
  388. package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
  389. package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs.map +1 -1
  390. package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
  391. package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs +12 -4
  392. package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs.map +1 -1
  393. package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs +2 -2
  394. package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs.map +1 -1
  395. package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +13 -13
  396. package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
  397. package/_mjs/collection/immutable/List/api/foldLeft.mjs +11 -9
  398. package/_mjs/collection/immutable/List/api/foldLeft.mjs.map +1 -1
  399. package/_mjs/collection/immutable/List/api.mjs +157 -133
  400. package/_mjs/collection/immutable/List/api.mjs.map +1 -1
  401. package/_mjs/collection/immutable/List.mjs.map +1 -1
  402. package/_mjs/collection/immutable/Queue/api.mjs +55 -39
  403. package/_mjs/collection/immutable/Queue/api.mjs.map +1 -1
  404. package/_mjs/collection/immutable/Queue/definition.mjs +1 -1
  405. package/_mjs/collection/immutable/Queue/definition.mjs.map +1 -1
  406. package/_mjs/collection/immutable/RoseTree/api.mjs +50 -36
  407. package/_mjs/collection/immutable/RoseTree/api.mjs.map +1 -1
  408. package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -1
  409. package/_mjs/collection/immutable/SortedMap/api.mjs +398 -358
  410. package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -1
  411. package/_mjs/collection/immutable/Vector/api.mjs +650 -538
  412. package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
  413. package/_mjs/collection/immutable/Vector/definition.mjs +16 -14
  414. package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
  415. package/_mjs/collection/immutable/Vector/internal.mjs +40 -39
  416. package/_mjs/collection/immutable/Vector/internal.mjs.map +1 -1
  417. package/_mjs/collection/mutable/HashMap.mjs +3 -5
  418. package/_mjs/collection/mutable/HashMap.mjs.map +1 -1
  419. package/_mjs/collection/mutable/HashSet.mjs.map +1 -1
  420. package/_mjs/collection/mutable/ListBuffer.mjs +2 -2
  421. package/_mjs/collection/mutable/ListBuffer.mjs.map +1 -1
  422. package/_mjs/collection/mutable/internal.mjs +0 -2
  423. package/_mjs/collection/mutable/internal.mjs.map +1 -1
  424. package/_mjs/collection/weak/IterableWeakMap.mjs +7 -7
  425. package/_mjs/collection/weak/IterableWeakMap.mjs.map +1 -1
  426. package/_mjs/collection/weak/IterableWeakSet.mjs +7 -7
  427. package/_mjs/collection/weak/IterableWeakSet.mjs.map +1 -1
  428. package/_mjs/control/Eval/api.mjs +40 -28
  429. package/_mjs/control/Eval/api.mjs.map +1 -1
  430. package/_mjs/control/Eval/instance.mjs +5 -5
  431. package/_mjs/control/Eval/instance.mjs.map +1 -1
  432. package/_mjs/control/Eval/run.mjs +1 -1
  433. package/_mjs/control/Eval/run.mjs.map +1 -1
  434. package/_mjs/control/Z/api.mjs +196 -128
  435. package/_mjs/control/Z/api.mjs.map +1 -1
  436. package/_mjs/control/Z/instances.mjs +4 -4
  437. package/_mjs/control/Z/instances.mjs.map +1 -1
  438. package/_mjs/control/Z/runtime.mjs +244 -234
  439. package/_mjs/control/Z/runtime.mjs.map +1 -1
  440. package/_mjs/data/Branded/definition.mjs.map +1 -1
  441. package/_mjs/data/Branded/derivations.mjs +3 -3
  442. package/_mjs/data/Branded/derivations.mjs.map +1 -1
  443. package/_mjs/data/CaseClass.mjs.map +1 -1
  444. package/_mjs/data/Cause/api/fold.mjs +19 -17
  445. package/_mjs/data/Cause/api/fold.mjs.map +1 -1
  446. package/_mjs/data/Cause/api/isEmpty.mjs +1 -1
  447. package/_mjs/data/Cause/api/isEmpty.mjs.map +1 -1
  448. package/_mjs/data/Cause/api/linearize.mjs +8 -8
  449. package/_mjs/data/Cause/api/linearize.mjs.map +1 -1
  450. package/_mjs/data/Cause/api/prettyPrint.mjs +1 -1
  451. package/_mjs/data/Cause/api/prettyPrint.mjs.map +1 -1
  452. package/_mjs/data/Cause/api.mjs +149 -129
  453. package/_mjs/data/Cause/api.mjs.map +1 -1
  454. package/_mjs/data/Cause/definition.mjs +18 -18
  455. package/_mjs/data/Cause/definition.mjs.map +1 -1
  456. package/_mjs/data/Cause.mjs.map +1 -1
  457. package/_mjs/data/Const/api.mjs +6 -4
  458. package/_mjs/data/Const/api.mjs.map +1 -1
  459. package/_mjs/data/Const/instances.mjs +4 -4
  460. package/_mjs/data/Const/instances.mjs.map +1 -1
  461. package/_mjs/data/Datum/api.mjs +220 -179
  462. package/_mjs/data/Datum/api.mjs.map +1 -1
  463. package/_mjs/data/Datum/definition.mjs.map +1 -1
  464. package/_mjs/data/DatumEither/api.mjs +163 -132
  465. package/_mjs/data/DatumEither/api.mjs.map +1 -1
  466. package/_mjs/data/DecodeError/definition.mjs +14 -14
  467. package/_mjs/data/DecodeError/definition.mjs.map +1 -1
  468. package/_mjs/data/Decoder/api.mjs +9 -7
  469. package/_mjs/data/Decoder/api.mjs.map +1 -1
  470. package/_mjs/data/Duration/api.mjs +16 -10
  471. package/_mjs/data/Duration/api.mjs.map +1 -1
  472. package/_mjs/data/Either/api/align.mjs +8 -2
  473. package/_mjs/data/Either/api/align.mjs.map +1 -1
  474. package/_mjs/data/Either/api/alignWith.mjs +13 -11
  475. package/_mjs/data/Either/api/alignWith.mjs.map +1 -1
  476. package/_mjs/data/Either/api.mjs +175 -136
  477. package/_mjs/data/Either/api.mjs.map +1 -1
  478. package/_mjs/data/Either/constructors.mjs +7 -5
  479. package/_mjs/data/Either/constructors.mjs.map +1 -1
  480. package/_mjs/data/Either/destructors.mjs +15 -13
  481. package/_mjs/data/Either/destructors.mjs.map +1 -1
  482. package/_mjs/data/Either/instances.mjs +9 -9
  483. package/_mjs/data/Either/instances.mjs.map +1 -1
  484. package/_mjs/data/EitherT/api.mjs +8 -8
  485. package/_mjs/data/EitherT/api.mjs.map +1 -1
  486. package/_mjs/data/Encoder/api.mjs +102 -0
  487. package/_mjs/data/Encoder/api.mjs.map +1 -0
  488. package/_mjs/data/Encoder/definition.mjs +15 -0
  489. package/_mjs/data/Encoder/definition.mjs.map +1 -0
  490. package/_mjs/data/Encoder.mjs +4 -0
  491. package/_mjs/data/Encoder.mjs.map +1 -0
  492. package/_mjs/data/Environment/api.mjs +45 -33
  493. package/_mjs/data/Environment/api.mjs.map +1 -1
  494. package/_mjs/data/Environment/definition.mjs.map +1 -1
  495. package/_mjs/data/EnvironmentPatch.mjs +188 -0
  496. package/_mjs/data/EnvironmentPatch.mjs.map +1 -0
  497. package/_mjs/data/ExecutionStrategy.mjs +19 -27
  498. package/_mjs/data/ExecutionStrategy.mjs.map +1 -1
  499. package/_mjs/data/Exit/api.mjs +140 -108
  500. package/_mjs/data/Exit/api.mjs.map +1 -1
  501. package/_mjs/data/Exit/constructors.mjs +3 -3
  502. package/_mjs/data/Exit/constructors.mjs.map +1 -1
  503. package/_mjs/data/FiberId/api.mjs +22 -20
  504. package/_mjs/data/FiberId/api.mjs.map +1 -1
  505. package/_mjs/data/FiberId/constructors.mjs.map +1 -1
  506. package/_mjs/data/Identity/api.mjs +21 -13
  507. package/_mjs/data/Identity/api.mjs.map +1 -1
  508. package/_mjs/data/Identity/instances.mjs +4 -4
  509. package/_mjs/data/Identity/instances.mjs.map +1 -1
  510. package/_mjs/data/Interval.mjs +38 -28
  511. package/_mjs/data/Interval.mjs.map +1 -1
  512. package/_mjs/data/Intervals.mjs +35 -27
  513. package/_mjs/data/Intervals.mjs.map +1 -1
  514. package/_mjs/data/Maybe/api.mjs +141 -106
  515. package/_mjs/data/Maybe/api.mjs.map +1 -1
  516. package/_mjs/data/Maybe/constructors.mjs +1 -1
  517. package/_mjs/data/Maybe/constructors.mjs.map +1 -1
  518. package/_mjs/data/Maybe/definition.mjs.map +1 -1
  519. package/_mjs/data/Maybe/destructors.mjs +8 -6
  520. package/_mjs/data/Maybe/destructors.mjs.map +1 -1
  521. package/_mjs/data/Maybe/instances.mjs +12 -12
  522. package/_mjs/data/Maybe/instances.mjs.map +1 -1
  523. package/_mjs/data/Predicate/api.mjs +10 -8
  524. package/_mjs/data/Predicate/api.mjs.map +1 -1
  525. package/_mjs/data/Refinement/api.mjs +15 -9
  526. package/_mjs/data/Refinement/api.mjs.map +1 -1
  527. package/_mjs/data/Struct/api.mjs +56 -44
  528. package/_mjs/data/Struct/api.mjs.map +1 -1
  529. package/_mjs/data/Tag/constructors.mjs +3 -2
  530. package/_mjs/data/Tag/constructors.mjs.map +1 -1
  531. package/_mjs/data/Tag/definition.mjs +0 -2
  532. package/_mjs/data/Tag/definition.mjs.map +1 -1
  533. package/_mjs/data/These/api.mjs +187 -169
  534. package/_mjs/data/These/api.mjs.map +1 -1
  535. package/_mjs/data/These/constructors.mjs +1 -1
  536. package/_mjs/data/These/constructors.mjs.map +1 -1
  537. package/_mjs/data/These/destructors.mjs +35 -31
  538. package/_mjs/data/These/destructors.mjs.map +1 -1
  539. package/_mjs/data/These/instances.mjs +1 -1
  540. package/_mjs/data/These/instances.mjs.map +1 -1
  541. package/_mjs/data/Trace/api.mjs +6 -4
  542. package/_mjs/data/Trace/api.mjs.map +1 -1
  543. package/_mjs/data/Zipped.mjs.map +1 -1
  544. package/_mjs/data/function/api.mjs +5 -3
  545. package/_mjs/data/function/api.mjs.map +1 -1
  546. package/_mjs/data/function/pipe.mjs +7 -0
  547. package/_mjs/data/function/pipe.mjs.map +1 -1
  548. package/_mjs/data/string/api.mjs +46 -66
  549. package/_mjs/data/string/api.mjs.map +1 -1
  550. package/_mjs/global/api.mjs +4 -2
  551. package/_mjs/global/api.mjs.map +1 -1
  552. package/_mjs/internal/AtomicBoolean.mjs.map +1 -1
  553. package/_mjs/internal/AtomicNumber.mjs.map +1 -1
  554. package/_mjs/internal/AtomicReference.mjs.map +1 -1
  555. package/_mjs/internal/Stack.mjs +1 -1
  556. package/_mjs/internal/Stack.mjs.map +1 -1
  557. package/_mjs/optics/At/api.mjs +1 -1
  558. package/_mjs/optics/At/api.mjs.map +1 -1
  559. package/_mjs/optics/At/definition.mjs +2 -2
  560. package/_mjs/optics/At/definition.mjs.map +1 -1
  561. package/_mjs/optics/Fold/definition.mjs +2 -3
  562. package/_mjs/optics/Fold/definition.mjs.map +1 -1
  563. package/_mjs/optics/Getter/definition.mjs +1 -2
  564. package/_mjs/optics/Getter/definition.mjs.map +1 -1
  565. package/_mjs/optics/Index/api.mjs +4 -4
  566. package/_mjs/optics/Index/api.mjs.map +1 -1
  567. package/_mjs/optics/Index/definition.mjs +1 -1
  568. package/_mjs/optics/Index/definition.mjs.map +1 -1
  569. package/_mjs/optics/Iso/api.mjs +8 -6
  570. package/_mjs/optics/Iso/api.mjs.map +1 -1
  571. package/_mjs/optics/Iso/definition.mjs +9 -9
  572. package/_mjs/optics/Iso/definition.mjs.map +1 -1
  573. package/_mjs/optics/Lens/api.mjs +49 -39
  574. package/_mjs/optics/Lens/api.mjs.map +1 -1
  575. package/_mjs/optics/Lens/definition.mjs +7 -7
  576. package/_mjs/optics/Lens/definition.mjs.map +1 -1
  577. package/_mjs/optics/Optional/api/compose.mjs +8 -6
  578. package/_mjs/optics/Optional/api/compose.mjs.map +1 -1
  579. package/_mjs/optics/Optional/definition.mjs +8 -10
  580. package/_mjs/optics/Optional/definition.mjs.map +1 -1
  581. package/_mjs/optics/Optional.mjs.map +1 -1
  582. package/_mjs/optics/Prism/api/compose.mjs +8 -6
  583. package/_mjs/optics/Prism/api/compose.mjs.map +1 -1
  584. package/_mjs/optics/Prism/api/fromNullable.mjs +2 -2
  585. package/_mjs/optics/Prism/api/fromNullable.mjs.map +1 -1
  586. package/_mjs/optics/Prism/api/just.mjs +2 -2
  587. package/_mjs/optics/Prism/api/just.mjs.map +1 -1
  588. package/_mjs/optics/Prism/definition.mjs +6 -6
  589. package/_mjs/optics/Prism/definition.mjs.map +1 -1
  590. package/_mjs/optics/Prism.mjs.map +1 -1
  591. package/_mjs/optics/Setter/definition.mjs +5 -10
  592. package/_mjs/optics/Setter/definition.mjs.map +1 -1
  593. package/_mjs/optics/Traversal/api/compose.mjs +7 -5
  594. package/_mjs/optics/Traversal/api/compose.mjs.map +1 -1
  595. package/_mjs/optics/Traversal/api/fromTraversable.mjs +2 -2
  596. package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
  597. package/_mjs/optics/Traversal/definition.mjs +9 -9
  598. package/_mjs/optics/Traversal/definition.mjs.map +1 -1
  599. package/_mjs/optics/Traversal.mjs.map +1 -1
  600. package/_mjs/typeclass/Align.mjs.map +1 -1
  601. package/_mjs/typeclass/Alt.mjs.map +1 -1
  602. package/_mjs/typeclass/Applicative.mjs.map +1 -1
  603. package/_mjs/typeclass/ApplicativeExcept.mjs +6 -10
  604. package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
  605. package/_mjs/typeclass/Apply.mjs +9 -9
  606. package/_mjs/typeclass/Apply.mjs.map +1 -1
  607. package/_mjs/typeclass/Chain.mjs +5 -5
  608. package/_mjs/typeclass/Chain.mjs.map +1 -1
  609. package/_mjs/typeclass/Eq/definition.mjs.map +1 -1
  610. package/_mjs/typeclass/Eq/derivations.mjs.map +1 -1
  611. package/_mjs/typeclass/Equatable/api.mjs.map +1 -1
  612. package/_mjs/typeclass/Equatable/definition.mjs.map +1 -1
  613. package/_mjs/typeclass/Equatable/fast-equals.mjs.map +1 -1
  614. package/_mjs/typeclass/Filterable.mjs.map +1 -1
  615. package/_mjs/typeclass/FilterableWithIndex.mjs.map +1 -1
  616. package/_mjs/typeclass/Foldable.mjs +1 -1
  617. package/_mjs/typeclass/Foldable.mjs.map +1 -1
  618. package/_mjs/typeclass/FoldableWithIndex.mjs +1 -1
  619. package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -1
  620. package/_mjs/typeclass/Functor.mjs.map +1 -1
  621. package/_mjs/typeclass/FunctorWithIndex.mjs.map +1 -1
  622. package/_mjs/typeclass/Guard/api.mjs +18 -10
  623. package/_mjs/typeclass/Guard/api.mjs.map +1 -1
  624. package/_mjs/typeclass/Guard/definition.mjs.map +1 -1
  625. package/_mjs/typeclass/Guard/derivations.mjs.map +1 -1
  626. package/_mjs/typeclass/Has.mjs +7 -5
  627. package/_mjs/typeclass/Has.mjs.map +1 -1
  628. package/_mjs/typeclass/HashEq.mjs.map +1 -1
  629. package/_mjs/typeclass/Hashable/definition.mjs.map +1 -1
  630. package/_mjs/typeclass/Hashable/hash.mjs.map +1 -1
  631. package/_mjs/typeclass/MonadExcept.mjs +1 -1
  632. package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
  633. package/_mjs/typeclass/Ord/api/contramap.mjs +7 -5
  634. package/_mjs/typeclass/Ord/api/contramap.mjs.map +1 -1
  635. package/_mjs/typeclass/Ord/api/max.mjs.map +1 -1
  636. package/_mjs/typeclass/Ord/api/min.mjs.map +1 -1
  637. package/_mjs/typeclass/Ord/definition.mjs.map +1 -1
  638. package/_mjs/typeclass/Ord/instances.mjs.map +1 -1
  639. package/_mjs/typeclass/Ordering.mjs.map +1 -1
  640. package/_mjs/typeclass/Semialign.mjs +7 -7
  641. package/_mjs/typeclass/Semialign.mjs.map +1 -1
  642. package/_mjs/typeclass/Semigroup/api.mjs.map +1 -1
  643. package/_mjs/typeclass/Semigroup/definition.mjs.map +1 -1
  644. package/_mjs/typeclass/Semigroup/derivations.mjs.map +1 -1
  645. package/_mjs/typeclass/Semimonoidal.mjs.map +1 -1
  646. package/_mjs/typeclass/Showable/definition.mjs.map +1 -1
  647. package/_mjs/typeclass/Showable/show.mjs +107 -107
  648. package/_mjs/typeclass/Showable/show.mjs.map +1 -1
  649. package/_mjs/typeclass/Showable/styles.mjs.map +1 -1
  650. package/_mjs/typeclass/Showable/util.mjs +1 -1
  651. package/_mjs/typeclass/Showable/util.mjs.map +1 -1
  652. package/_mjs/typeclass/Traversable.mjs +1 -2
  653. package/_mjs/typeclass/Traversable.mjs.map +1 -1
  654. package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -1
  655. package/_mjs/typeclass/Witherable.mjs +2 -1
  656. package/_mjs/typeclass/Witherable.mjs.map +1 -1
  657. package/_mjs/typeclass/WitherableWithIndex.mjs +2 -1
  658. package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
  659. package/_mjs/util/AnsiFormat.mjs +11 -11
  660. package/_mjs/util/AnsiFormat.mjs.map +1 -1
  661. package/_mjs/util/PCGRandom.mjs.map +1 -1
  662. package/_mjs/util/assert.mjs.map +1 -1
  663. package/_mjs/util/pattern.mjs.map +1 -1
  664. package/_mjs/util/predicates.mjs.map +1 -1
  665. package/_mjs/util/rand/Random.mjs.map +1 -1
  666. package/_mjs/util/rand/distribution/UniformArrayIntDistribution.mjs.map +1 -1
  667. package/_mjs/util/rand/distribution/UniformBigIntDistribution.mjs.map +1 -1
  668. package/_mjs/util/rand/distribution/UniformIntDistribution.mjs.map +1 -1
  669. package/_mjs/util/rand/distribution/internals/ArrayInt.mjs.map +1 -1
  670. package/_mjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.mjs.map +1 -1
  671. package/_mjs/util/rand/distribution/internals/UniformIntDistributionInternal.mjs.map +1 -1
  672. package/_mjs/util/rand/generator/MersenneTwister.mjs.map +1 -1
  673. package/_mjs/util/rand/generator/RandomGenerator.mjs.map +1 -1
  674. package/_mjs/util/rand.mjs.map +1 -1
  675. package/_src/collection/Iterable/api/traverseConc.ts +3 -3
  676. package/_src/collection/Iterable/api.ts +445 -408
  677. package/_src/collection/Iterable/constructors.ts +1 -1
  678. package/_src/collection/compat/Array/api.ts +16 -13
  679. package/_src/collection/compat/Array/derivations.ts +27 -1
  680. package/_src/collection/compat/Record/instances.ts +51 -2
  681. package/_src/collection/immutable/Conc/api.ts +716 -607
  682. package/_src/collection/immutable/Conc/definition.ts +60 -68
  683. package/_src/collection/immutable/Conc/derivations.ts +13 -0
  684. package/_src/collection/immutable/Conc.ts +0 -1
  685. package/_src/collection/immutable/Dictionary/api.ts +44 -32
  686. package/_src/collection/immutable/HashMap/api.ts +338 -224
  687. package/_src/collection/immutable/HashMap/internal.ts +3 -7
  688. package/_src/collection/immutable/HashSet/api.ts +193 -158
  689. package/_src/collection/immutable/ImmutableArray/api/chunksOf.ts +5 -3
  690. package/_src/collection/immutable/ImmutableArray/api/slice.ts +5 -3
  691. package/_src/collection/immutable/ImmutableArray/api/splitAt.ts +5 -3
  692. package/_src/collection/immutable/ImmutableArray/api/splitWhere.ts +13 -14
  693. package/_src/collection/immutable/ImmutableArray/api.ts +870 -722
  694. package/_src/collection/immutable/ImmutableArray/derivations.ts +13 -0
  695. package/_src/collection/immutable/ImmutableArray/instances.ts +54 -73
  696. package/_src/collection/immutable/ImmutableArray.ts +0 -1
  697. package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +311 -273
  698. package/_src/collection/immutable/ImmutableNonEmptyArray/constructors.ts +19 -4
  699. package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +0 -1
  700. package/_src/collection/immutable/ImmutableNonEmptyArray/derivations.ts +13 -0
  701. package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +22 -23
  702. package/_src/collection/immutable/List/api/foldLeft.ts +11 -9
  703. package/_src/collection/immutable/List/api.ts +147 -133
  704. package/_src/collection/immutable/List.ts +0 -1
  705. package/_src/collection/immutable/Queue/api.ts +53 -37
  706. package/_src/collection/immutable/Queue/definition.ts +0 -1
  707. package/_src/collection/immutable/RoseTree/api.ts +38 -32
  708. package/_src/collection/immutable/RoseTree/definition.ts +2 -0
  709. package/_src/collection/immutable/SortedMap/api.ts +364 -332
  710. package/_src/collection/immutable/Vector/api.ts +608 -482
  711. package/_src/collection/immutable/Vector/definition.ts +11 -12
  712. package/_src/collection/immutable/Vector/internal.ts +37 -38
  713. package/_src/collection/mutable/HashMap.ts +1 -4
  714. package/_src/collection/mutable/HashSet.ts +1 -2
  715. package/_src/collection/mutable/ListBuffer.ts +1 -1
  716. package/_src/collection/mutable/internal.ts +0 -2
  717. package/_src/collection/weak/IterableWeakMap.ts +11 -7
  718. package/_src/collection/weak/IterableWeakSet.ts +10 -5
  719. package/_src/control/Eval/api.ts +35 -19
  720. package/_src/control/Eval/instance.ts +5 -5
  721. package/_src/control/Z/api.ts +191 -208
  722. package/_src/control/Z/instances.ts +4 -5
  723. package/_src/control/Z/runtime.ts +190 -189
  724. package/_src/data/Branded/definition.ts +11 -12
  725. package/_src/data/Branded/derivations.ts +2 -2
  726. package/_src/data/CaseClass.ts +4 -1
  727. package/_src/data/Cause/api/fold.ts +13 -14
  728. package/_src/data/Cause/api.ts +125 -105
  729. package/_src/data/Cause.ts +0 -1
  730. package/_src/data/Const/api.ts +6 -4
  731. package/_src/data/Const/instances.ts +3 -3
  732. package/_src/data/Datum/api.ts +229 -197
  733. package/_src/data/Datum/definition.ts +2 -5
  734. package/_src/data/DatumEither/api.ts +208 -193
  735. package/_src/data/Decoder/api.ts +5 -3
  736. package/_src/data/Duration/api.ts +19 -15
  737. package/_src/data/Either/api/align.ts +7 -2
  738. package/_src/data/Either/api/alignWith.ts +13 -15
  739. package/_src/data/Either/api.ts +141 -119
  740. package/_src/data/Either/constructors.ts +12 -10
  741. package/_src/data/Either/destructors.ts +11 -9
  742. package/_src/data/Either/instances.ts +24 -20
  743. package/_src/data/EitherT/api.ts +43 -49
  744. package/_src/data/Encoder/api.ts +123 -0
  745. package/_src/data/Encoder/definition.ts +12 -0
  746. package/_src/data/Encoder.ts +4 -0
  747. package/_src/data/Environment/api.ts +52 -44
  748. package/_src/data/Environment/definition.ts +6 -0
  749. package/_src/data/EnvironmentPatch.ts +137 -0
  750. package/_src/data/ExecutionStrategy.ts +14 -24
  751. package/_src/data/Exit/api.ts +104 -73
  752. package/_src/data/Exit/constructors.ts +2 -2
  753. package/_src/data/FiberId/api.ts +19 -17
  754. package/_src/data/FiberId/constructors.ts +1 -2
  755. package/_src/data/Identity/api.ts +20 -12
  756. package/_src/data/Identity/instances.ts +4 -7
  757. package/_src/data/Interval.ts +39 -29
  758. package/_src/data/Intervals.ts +31 -23
  759. package/_src/data/Maybe/api.ts +112 -79
  760. package/_src/data/Maybe/constructors.ts +3 -3
  761. package/_src/data/Maybe/definition.ts +11 -1
  762. package/_src/data/Maybe/destructors.ts +6 -4
  763. package/_src/data/Maybe/instances.ts +10 -21
  764. package/_src/data/Predicate/api.ts +14 -8
  765. package/_src/data/Refinement/api.ts +19 -13
  766. package/_src/data/Struct/api.ts +75 -55
  767. package/_src/data/Tag/constructors.ts +1 -2
  768. package/_src/data/Tag/definition.ts +0 -1
  769. package/_src/data/These/api.ts +114 -114
  770. package/_src/data/These/destructors.ts +23 -24
  771. package/_src/data/Trace/api.ts +5 -3
  772. package/_src/data/Zipped.ts +3 -4
  773. package/_src/data/function/api.ts +6 -7
  774. package/_src/data/function/pipe.ts +9 -1
  775. package/_src/data/string/api.ts +40 -60
  776. package/_src/data.ts +2 -1
  777. package/_src/global/api.ts +7 -12
  778. package/_src/global.ts +8 -0
  779. package/_src/internal/AtomicBoolean.ts +0 -1
  780. package/_src/internal/AtomicNumber.ts +0 -7
  781. package/_src/internal/AtomicReference.ts +0 -4
  782. package/_src/internal/Stack.ts +1 -7
  783. package/_src/optics/At/definition.ts +5 -3
  784. package/_src/optics/Fold/definition.ts +3 -10
  785. package/_src/optics/Getter/definition.ts +1 -2
  786. package/_src/optics/Index/definition.ts +1 -1
  787. package/_src/optics/Iso/api.ts +8 -6
  788. package/_src/optics/Iso/definition.ts +3 -3
  789. package/_src/optics/Lens/api.ts +44 -42
  790. package/_src/optics/Lens/definition.ts +5 -5
  791. package/_src/optics/Optional/api/compose.ts +9 -9
  792. package/_src/optics/Optional/definition.ts +9 -16
  793. package/_src/optics/Optional.ts +0 -1
  794. package/_src/optics/Prism/api/compose.ts +9 -6
  795. package/_src/optics/Prism/definition.ts +3 -3
  796. package/_src/optics/Prism.ts +0 -1
  797. package/_src/optics/Setter/definition.ts +3 -23
  798. package/_src/optics/Traversal/api/compose.ts +7 -8
  799. package/_src/optics/Traversal/api/fromTraversable.ts +1 -1
  800. package/_src/optics/Traversal/definition.ts +10 -15
  801. package/_src/optics/Traversal.ts +0 -1
  802. package/_src/typeclass/Align.ts +0 -3
  803. package/_src/typeclass/Alt.ts +2 -1
  804. package/_src/typeclass/Applicative.ts +0 -1
  805. package/_src/typeclass/ApplicativeExcept.ts +15 -10
  806. package/_src/typeclass/Apply.ts +30 -33
  807. package/_src/typeclass/Chain.ts +9 -12
  808. package/_src/typeclass/Eq/definition.ts +0 -3
  809. package/_src/typeclass/Eq/derivations.ts +0 -2
  810. package/_src/typeclass/Equatable/api.ts +0 -2
  811. package/_src/typeclass/Equatable/definition.ts +0 -4
  812. package/_src/typeclass/Equatable/fast-equals.ts +11 -93
  813. package/_src/typeclass/Filterable.ts +19 -13
  814. package/_src/typeclass/FilterableWithIndex.ts +19 -13
  815. package/_src/typeclass/Foldable.ts +7 -10
  816. package/_src/typeclass/FoldableWithIndex.ts +7 -10
  817. package/_src/typeclass/Functor.ts +6 -4
  818. package/_src/typeclass/FunctorWithIndex.ts +3 -2
  819. package/_src/typeclass/Guard/api.ts +21 -16
  820. package/_src/typeclass/Guard/definition.ts +0 -3
  821. package/_src/typeclass/Guard/derivations.ts +5 -6
  822. package/_src/typeclass/Has.ts +6 -4
  823. package/_src/typeclass/HashEq.ts +0 -7
  824. package/_src/typeclass/Hashable/definition.ts +0 -4
  825. package/_src/typeclass/Hashable/hash.ts +0 -26
  826. package/_src/typeclass/MonadExcept.ts +1 -1
  827. package/_src/typeclass/Ord/api/contramap.ts +7 -6
  828. package/_src/typeclass/Ord/api/max.ts +0 -1
  829. package/_src/typeclass/Ord/api/min.ts +0 -1
  830. package/_src/typeclass/Ord/definition.ts +0 -4
  831. package/_src/typeclass/Ord/instances.ts +0 -2
  832. package/_src/typeclass/Ordering.ts +2 -0
  833. package/_src/typeclass/Semialign.ts +43 -32
  834. package/_src/typeclass/Semigroup/api.ts +0 -2
  835. package/_src/typeclass/Semigroup/definition.ts +0 -4
  836. package/_src/typeclass/Semigroup/derivations.ts +0 -2
  837. package/_src/typeclass/Semimonoidal.ts +3 -2
  838. package/_src/typeclass/Showable/definition.ts +0 -6
  839. package/_src/typeclass/Showable/show.ts +1 -57
  840. package/_src/typeclass/Showable/styles.ts +0 -8
  841. package/_src/typeclass/Showable/util.ts +22 -57
  842. package/_src/typeclass/Traversable.ts +13 -18
  843. package/_src/typeclass/TraversableWithIndex.ts +5 -7
  844. package/_src/typeclass/Witherable.ts +21 -13
  845. package/_src/typeclass/WitherableWithIndex.ts +26 -17
  846. package/_src/typeclass/builtin/Symbol.ts +0 -1
  847. package/_src/types/extractions.ts +12 -3
  848. package/_src/types/utility.ts +3 -5
  849. package/_src/util/AnsiFormat.ts +0 -25
  850. package/_src/util/PCGRandom.ts +4 -9
  851. package/_src/util/assert.ts +1 -2
  852. package/_src/util/pattern.ts +91 -12
  853. package/_src/util/predicates.ts +3 -1
  854. package/_src/util/rand/Random.ts +12 -16
  855. package/_src/util/rand/distribution/Distribution.ts +0 -1
  856. package/_src/util/rand/distribution/UniformArrayIntDistribution.ts +0 -3
  857. package/_src/util/rand/distribution/UniformBigIntDistribution.ts +0 -5
  858. package/_src/util/rand/distribution/UniformIntDistribution.ts +0 -7
  859. package/_src/util/rand/distribution/internals/ArrayInt.ts +3 -13
  860. package/_src/util/rand/distribution/internals/UniformArrayIntDistributionInternal.ts +0 -3
  861. package/_src/util/rand/distribution/internals/UniformIntDistributionInternal.ts +0 -4
  862. package/_src/util/rand/generator/MersenneTwister.ts +6 -29
  863. package/_src/util/rand/generator/RandomGenerator.ts +0 -3
  864. package/_src/util/rand.ts +0 -2
  865. package/collection/Iterable/api/traverseConc.d.ts +2 -2
  866. package/collection/Iterable/api.d.ts +64 -64
  867. package/collection/Iterable/constructors.d.ts +1 -1
  868. package/collection/compat/Array/api.d.ts +6 -6
  869. package/collection/compat/Array/derivations.d.ts +11 -0
  870. package/collection/compat/Record/instances.d.ts +30 -6
  871. package/collection/immutable/Conc/api.d.ts +108 -105
  872. package/collection/immutable/Conc/definition.d.ts +2 -2
  873. package/collection/immutable/Conc/derivations.d.ts +6 -0
  874. package/collection/immutable/Dictionary/api.d.ts +12 -12
  875. package/collection/immutable/HashMap/api.d.ts +76 -70
  876. package/collection/immutable/HashSet/api.d.ts +45 -41
  877. package/collection/immutable/ImmutableArray/api/chunksOf.d.ts +2 -2
  878. package/collection/immutable/ImmutableArray/api/slice.d.ts +2 -2
  879. package/collection/immutable/ImmutableArray/api/splitAt.d.ts +2 -2
  880. package/collection/immutable/ImmutableArray/api/splitWhere.d.ts +3 -3
  881. package/collection/immutable/ImmutableArray/api.d.ts +206 -206
  882. package/collection/immutable/ImmutableArray/derivations.d.ts +6 -0
  883. package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +64 -63
  884. package/collection/immutable/ImmutableNonEmptyArray/derivations.d.ts +6 -0
  885. package/collection/immutable/List/api/foldLeft.d.ts +2 -2
  886. package/collection/immutable/List/api.d.ts +24 -24
  887. package/collection/immutable/Queue/api.d.ts +16 -16
  888. package/collection/immutable/RoseTree/api.d.ts +14 -14
  889. package/collection/immutable/SortedMap/api.d.ts +41 -41
  890. package/collection/immutable/Vector/api.d.ts +121 -117
  891. package/collection/immutable/Vector/definition.d.ts +2 -2
  892. package/collection/immutable/Vector/internal.d.ts +2 -2
  893. package/collection/mutable/ListBuffer.d.ts +1 -1
  894. package/control/Eval/api.d.ts +12 -12
  895. package/control/Z/api.d.ts +68 -68
  896. package/control/Z/runtime.d.ts +10 -10
  897. package/data/Branded/derivations.d.ts +2 -2
  898. package/data/Cause/api/fold.d.ts +3 -3
  899. package/data/Cause/api.d.ts +20 -20
  900. package/data/Const/api.d.ts +3 -3
  901. package/data/Datum/api.d.ts +43 -41
  902. package/data/DatumEither/api.d.ts +48 -46
  903. package/data/Decoder/api.d.ts +2 -2
  904. package/data/Duration/api.d.ts +7 -7
  905. package/data/Either/api/align.d.ts +5 -1
  906. package/data/Either/api/alignWith.d.ts +2 -2
  907. package/data/Either/api.d.ts +40 -46
  908. package/data/Either/constructors.d.ts +6 -6
  909. package/data/Either/destructors.d.ts +2 -2
  910. package/data/EitherT/api.d.ts +6 -6
  911. package/data/Encoder/api.d.ts +73 -0
  912. package/data/Encoder/definition.d.ts +12 -0
  913. package/data/Encoder.d.ts +2 -0
  914. package/data/Environment/api.d.ts +14 -14
  915. package/data/Environment/definition.d.ts +4 -0
  916. package/data/EnvironmentPatch.d.ts +73 -0
  917. package/data/ExecutionStrategy.d.ts +1 -6
  918. package/data/Exit/api.d.ts +32 -32
  919. package/data/Exit/constructors.d.ts +2 -2
  920. package/data/FiberId/api.d.ts +2 -2
  921. package/data/Identity/api.d.ts +8 -8
  922. package/data/Interval.d.ts +11 -11
  923. package/data/Intervals.d.ts +11 -11
  924. package/data/Maybe/api.d.ts +36 -37
  925. package/data/Maybe/constructors.d.ts +2 -2
  926. package/data/Maybe/definition.d.ts +7 -3
  927. package/data/Maybe/destructors.d.ts +2 -2
  928. package/data/Predicate/api.d.ts +5 -5
  929. package/data/Refinement/api.d.ts +9 -9
  930. package/data/Struct/api.d.ts +13 -23
  931. package/data/Tag/constructors.d.ts +1 -2
  932. package/data/Tag/definition.d.ts +0 -1
  933. package/data/These/api.d.ts +18 -22
  934. package/data/These/destructors.d.ts +4 -4
  935. package/data/Trace/api.d.ts +2 -2
  936. package/data/function/api.d.ts +3 -3
  937. package/data/function/pipe.d.ts +7 -1
  938. package/data/string/api.d.ts +9 -49
  939. package/data.d.ts +2 -1
  940. package/global/api.d.ts +3 -3
  941. package/global.d.ts +8 -0
  942. package/internal/Stack.d.ts +1 -1
  943. package/optics/At/definition.d.ts +1 -1
  944. package/optics/Fold/definition.d.ts +2 -6
  945. package/optics/Getter/definition.d.ts +1 -1
  946. package/optics/Index/definition.d.ts +1 -1
  947. package/optics/Iso/api.d.ts +2 -2
  948. package/optics/Iso/definition.d.ts +2 -2
  949. package/optics/Lens/api.d.ts +10 -10
  950. package/optics/Lens/definition.d.ts +4 -4
  951. package/optics/Optional/api/compose.d.ts +2 -2
  952. package/optics/Optional/definition.d.ts +4 -8
  953. package/optics/Prism/api/compose.d.ts +2 -2
  954. package/optics/Prism/definition.d.ts +2 -2
  955. package/optics/Setter/definition.d.ts +2 -14
  956. package/optics/Traversal/api/compose.d.ts +2 -2
  957. package/optics/Traversal/definition.d.ts +4 -4
  958. package/package.json +1 -1
  959. package/typeclass/Alt.d.ts +1 -1
  960. package/typeclass/ApplicativeExcept.d.ts +2 -6
  961. package/typeclass/Apply.d.ts +5 -5
  962. package/typeclass/Chain.d.ts +4 -4
  963. package/typeclass/Filterable.d.ts +6 -6
  964. package/typeclass/FilterableWithIndex.d.ts +6 -6
  965. package/typeclass/Foldable.d.ts +4 -4
  966. package/typeclass/FoldableWithIndex.d.ts +4 -4
  967. package/typeclass/Functor.d.ts +2 -2
  968. package/typeclass/FunctorWithIndex.d.ts +1 -1
  969. package/typeclass/Guard/api.d.ts +7 -7
  970. package/typeclass/Has.d.ts +3 -3
  971. package/typeclass/Ord/api/contramap.d.ts +2 -2
  972. package/typeclass/Semialign.d.ts +14 -14
  973. package/typeclass/Semimonoidal.d.ts +1 -1
  974. package/typeclass/Traversable.d.ts +4 -6
  975. package/typeclass/TraversableWithIndex.d.ts +2 -2
  976. package/typeclass/Witherable.d.ts +3 -3
  977. package/typeclass/WitherableWithIndex.d.ts +5 -5
  978. package/types/extractions.d.ts +10 -6
  979. package/util/assert.d.ts +1 -1
  980. package/_cjs/data/Patch/api.cjs.map +0 -1
  981. package/_cjs/data/Patch/definition.cjs +0 -88
  982. package/_cjs/data/Patch/definition.cjs.map +0 -1
  983. package/_cjs/data/Patch.cjs.map +0 -1
  984. package/_mjs/data/Patch/api.mjs +0 -112
  985. package/_mjs/data/Patch/api.mjs.map +0 -1
  986. package/_mjs/data/Patch/definition.mjs +0 -61
  987. package/_mjs/data/Patch/definition.mjs.map +0 -1
  988. package/_mjs/data/Patch.mjs +0 -4
  989. package/_mjs/data/Patch.mjs.map +0 -1
  990. package/_src/data/Patch/api.ts +0 -75
  991. package/_src/data/Patch/definition.ts +0 -58
  992. package/_src/data/Patch.ts +0 -4
  993. package/data/Patch/api.d.ts +0 -24
  994. package/data/Patch/definition.d.ts +0 -44
  995. package/data/Patch.d.ts +0 -2
@@ -4,44 +4,48 @@ import { Iterable } from "@fncts/base/collection/Iterable/definition";
4
4
  import { tuple } from "@fncts/base/data/function";
5
5
 
6
6
  /**
7
- * @tsplus fluent fncts.Iterable ap
7
+ * @tsplus pipeable fncts.Iterable ap
8
8
  */
9
- export function ap_<A, B>(self: Iterable<(a: A) => B>, fa: Iterable<A>): Iterable<B> {
10
- return self.flatMap((f) => fa.map(f));
9
+ export function ap<A>(fa: Iterable<A>) {
10
+ return <B>(self: Iterable<(a: A) => B>): Iterable<B> => {
11
+ return self.flatMap((f) => fa.map(f));
12
+ };
11
13
  }
12
14
 
13
15
  /**
14
- * @tsplus fluent fncts.Iterable append
16
+ * @tsplus pipeable fncts.Iterable append
15
17
  */
16
- export function append_<A, B>(self: Iterable<A>, b: B): Iterable<A | B> {
17
- return Iterable.make<A | B>(() => {
18
- let done = false;
19
- const ia = self[Symbol.iterator]();
20
- let va: IteratorResult<A>;
21
- return {
22
- next() {
23
- if (done) {
24
- return this.return!();
25
- }
26
- va = ia.next();
27
- if (va.done) {
28
- done = true;
29
- return { done: false, value: b };
30
- }
31
- return { done, value: va.value };
32
- },
33
- return(value?: unknown) {
34
- done = true;
35
- if (!done) {
18
+ export function append<B>(b: B) {
19
+ return <A>(self: Iterable<A>): Iterable<A | B> => {
20
+ return Iterable.make<A | B>(() => {
21
+ let done = false;
22
+ const ia = self[Symbol.iterator]();
23
+ let va: IteratorResult<A>;
24
+ return {
25
+ next() {
26
+ if (done) {
27
+ return this.return!();
28
+ }
29
+ va = ia.next();
30
+ if (va.done) {
31
+ done = true;
32
+ return { done: false, value: b };
33
+ }
34
+ return { done, value: va.value };
35
+ },
36
+ return(value?: unknown) {
36
37
  done = true;
37
- }
38
- if (typeof ia.return === "function") {
39
- ia.return();
40
- }
41
- return { done, value };
42
- },
43
- };
44
- });
38
+ if (!done) {
39
+ done = true;
40
+ }
41
+ if (typeof ia.return === "function") {
42
+ ia.return();
43
+ }
44
+ return { done, value };
45
+ },
46
+ };
47
+ });
48
+ };
45
49
  }
46
50
 
47
51
  /**
@@ -52,375 +56,413 @@ export function asIterable<A>(self: Iterable<A>): Iterable<A> {
52
56
  }
53
57
 
54
58
  /**
55
- * @tsplus fluent fncts.Iterable flatMap
59
+ * @tsplus pipeable fncts.Iterable flatMap
56
60
  */
57
- export function flatMap_<A, B>(self: Iterable<A>, f: (a: A) => Iterable<B>): Iterable<B> {
58
- return Iterable.make<B>(() => {
59
- const ia = self[Symbol.iterator]();
60
- let ib: Iterator<B>;
61
- let va: IteratorResult<A>;
62
- let vb: IteratorResult<B>;
63
- let done = false;
64
-
65
- const pullA = (onDone: () => IteratorResult<B>): IteratorResult<B> => {
66
- va = ia.next();
67
- if (va.done) {
68
- return onDone();
69
- }
70
- ib = f(va.value)[Symbol.iterator]();
71
- return pullB(onDone);
72
- };
73
- const pullB = (onDone: () => IteratorResult<B>): IteratorResult<B> => {
74
- if (!ib) {
75
- return pullA(onDone);
76
- }
77
- vb = ib!.next();
78
- if (!vb.done) {
79
- return { done, value: vb.value };
80
- }
81
- return pullA(onDone);
82
- };
83
-
84
- return {
85
- next() {
86
- if (done) {
87
- return this.return!();
61
+ export function flatMap<A, B>(f: (a: A) => Iterable<B>) {
62
+ return (self: Iterable<A>): Iterable<B> => {
63
+ return Iterable.make<B>(() => {
64
+ const ia = self[Symbol.iterator]();
65
+ let ib: Iterator<B>;
66
+ let va: IteratorResult<A>;
67
+ let vb: IteratorResult<B>;
68
+ let done = false;
69
+ const pullA = (onDone: () => IteratorResult<B>): IteratorResult<B> => {
70
+ va = ia.next();
71
+ if (va.done) {
72
+ return onDone();
88
73
  }
89
- return pullB(() => this.return!());
90
- },
91
- return(value?: unknown) {
92
- if (!done) {
93
- done = true;
94
- if (typeof ia.return === "function") {
95
- ia.return();
74
+ ib = f(va.value)[Symbol.iterator]();
75
+ return pullB(onDone);
76
+ };
77
+ const pullB = (onDone: () => IteratorResult<B>): IteratorResult<B> => {
78
+ if (!ib) {
79
+ return pullA(onDone);
80
+ }
81
+ vb = ib!.next();
82
+ if (!vb.done) {
83
+ return { done, value: vb.value };
84
+ }
85
+ return pullA(onDone);
86
+ };
87
+ return {
88
+ next() {
89
+ if (done) {
90
+ return this.return!();
96
91
  }
97
- if (ib && typeof ib.return === "function") {
98
- ib.return();
92
+ return pullB(() => this.return!());
93
+ },
94
+ return(value?: unknown) {
95
+ if (!done) {
96
+ done = true;
97
+ if (typeof ia.return === "function") {
98
+ ia.return();
99
+ }
100
+ if (ib && typeof ib.return === "function") {
101
+ ib.return();
102
+ }
99
103
  }
100
- }
101
- return { done, value };
102
- },
103
- };
104
- });
104
+ return { done, value };
105
+ },
106
+ };
107
+ });
108
+ };
105
109
  }
106
110
 
107
111
  /**
108
- * @tsplus fluent fncts.Iterable concat
109
- */
110
- export function concat_<A>(self: Iterable<A>, ib: Iterable<A>): Iterable<A> {
111
- return Iterable.make(() => {
112
- const iterA = self[Symbol.iterator]();
113
- let doneA = false;
114
- let iterB: Iterator<A>;
115
- return {
116
- next() {
117
- if (!doneA) {
118
- const r = iterA.next();
119
- if (r.done) {
120
- doneA = true;
121
- iterB = ib[Symbol.iterator]();
122
- return iterB.next();
112
+ * @tsplus pipeable fncts.Iterable concat
113
+ */
114
+ export function concat<A>(ib: Iterable<A>) {
115
+ return (self: Iterable<A>): Iterable<A> => {
116
+ return Iterable.make(() => {
117
+ const iterA = self[Symbol.iterator]();
118
+ let doneA = false;
119
+ let iterB: Iterator<A>;
120
+ return {
121
+ next() {
122
+ if (!doneA) {
123
+ const r = iterA.next();
124
+ if (r.done) {
125
+ doneA = true;
126
+ iterB = ib[Symbol.iterator]();
127
+ return iterB.next();
128
+ }
129
+ return r;
123
130
  }
124
- return r;
125
- }
126
- return iterB.next();
127
- },
128
- };
129
- });
131
+ return iterB.next();
132
+ },
133
+ };
134
+ });
135
+ };
130
136
  }
131
137
 
132
138
  /**
133
- * @tsplus fluent fncts.Iterable corresponds
139
+ * @tsplus pipeable fncts.Iterable corresponds
134
140
  */
135
- export function corresponds_<A, B>(left: Iterable<A>, right: Iterable<B>, f: (a: A, b: B) => boolean): boolean {
136
- const leftIterator = left[Symbol.iterator]();
137
- const rightIterator = right[Symbol.iterator]();
138
- // eslint-disable-next-line no-constant-condition
139
- while (true) {
140
- const lnext = leftIterator.next();
141
- const rnext = rightIterator.next();
142
- if (lnext.done !== rnext.done) {
143
- return false;
144
- }
145
- if (lnext.done) {
146
- return true;
147
- }
148
- if (!f(lnext.value, rnext.value)) {
149
- return false;
141
+ export function corresponds<A, B>(right: Iterable<B>, f: (a: A, b: B) => boolean) {
142
+ return (left: Iterable<A>): boolean => {
143
+ const leftIterator = left[Symbol.iterator]();
144
+ const rightIterator = right[Symbol.iterator]();
145
+ // eslint-disable-next-line no-constant-condition
146
+ while (true) {
147
+ const lnext = leftIterator.next();
148
+ const rnext = rightIterator.next();
149
+ if (lnext.done !== rnext.done) {
150
+ return false;
151
+ }
152
+ if (lnext.done) {
153
+ return true;
154
+ }
155
+ if (!f(lnext.value, rnext.value)) {
156
+ return false;
157
+ }
150
158
  }
151
- }
159
+ };
152
160
  }
153
161
 
154
162
  /**
155
- * @tsplus fluent fncts.Iterable crossWith
163
+ * @tsplus pipeable fncts.Iterable crossWith
156
164
  */
157
- export function crossWith_<A, B, C>(self: Iterable<A>, fb: Iterable<B>, f: (a: A, b: B) => C): Iterable<C> {
158
- return self.flatMap((a) => fb.map((b) => f(a, b)));
165
+ export function crossWith<A, B, C>(fb: Iterable<B>, f: (a: A, b: B) => C) {
166
+ return (self: Iterable<A>): Iterable<C> => {
167
+ return self.flatMap((a) => fb.map((b) => f(a, b)));
168
+ };
159
169
  }
160
170
 
161
171
  /**
162
- * @tsplus fluent fncts.Iterable every
172
+ * @tsplus pipeable fncts.Iterable every
163
173
  */
164
- export function every_<A, B extends A>(self: Iterable<A>, p: Refinement<A, B>): boolean;
165
- export function every_<A>(self: Iterable<A>, p: Predicate<A>): boolean;
166
- export function every_<A>(self: Iterable<A>, p: Predicate<A>): boolean {
167
- return self.everyWithIndex((_, a) => p(a));
174
+ export function every<A, B extends A>(p: Refinement<A, B>): (self: Iterable<A>) => boolean;
175
+ export function every<A>(p: Predicate<A>): (self: Iterable<A>) => boolean;
176
+ export function every<A>(p: Predicate<A>) {
177
+ return (self: Iterable<A>): boolean => {
178
+ return self.everyWithIndex((_, a) => p(a));
179
+ };
168
180
  }
169
181
 
170
182
  /**
171
- * @tsplus fluent fncts.Iterable everyWithIndex
183
+ * @tsplus pipeable fncts.Iterable everyWithIndex
172
184
  */
173
- export function everyWithIndex_<A, B extends A>(self: Iterable<A>, p: RefinementWithIndex<number, A, B>): boolean;
174
- export function everyWithIndex_<A>(self: Iterable<A>, p: PredicateWithIndex<number, A>): boolean;
175
- export function everyWithIndex_<A>(self: Iterable<A>, p: PredicateWithIndex<number, A>): boolean {
176
- const iterator = self[Symbol.iterator]();
177
- let i = 0;
178
- let next: IteratorResult<A>;
179
- while (!(next = iterator.next()).done) {
180
- if (!p(i, next.value)) {
181
- if (typeof iterator.return === "function") {
182
- iterator.return();
185
+ export function everyWithIndex<A, B extends A>(p: RefinementWithIndex<number, A, B>): (self: Iterable<A>) => boolean;
186
+ export function everyWithIndex<A>(p: PredicateWithIndex<number, A>): (self: Iterable<A>) => boolean;
187
+ export function everyWithIndex<A>(p: PredicateWithIndex<number, A>) {
188
+ return (self: Iterable<A>): boolean => {
189
+ const iterator = self[Symbol.iterator]();
190
+ let i = 0;
191
+ let next: IteratorResult<A>;
192
+ while (!(next = iterator.next()).done) {
193
+ if (!p(i, next.value)) {
194
+ if (typeof iterator.return === "function") {
195
+ iterator.return();
196
+ }
197
+ return false;
183
198
  }
184
- return false;
199
+ i++;
185
200
  }
186
- i++;
187
- }
188
- return true;
201
+ return true;
202
+ };
189
203
  }
190
204
 
191
205
  /**
192
- * @tsplus fluent fncts.Iterable filter
206
+ * @tsplus pipeable fncts.Iterable filter
193
207
  */
194
- export function filter_<A, B extends A>(self: Iterable<A>, p: Refinement<A, B>): Iterable<B>;
195
- export function filter_<A>(self: Iterable<A>, p: Predicate<A>): Iterable<A>;
196
- export function filter_<A>(self: Iterable<A>, p: Predicate<A>): Iterable<A> {
197
- return self.filterWithIndex((_, a) => p(a));
208
+ export function filter<A, B extends A>(p: Refinement<A, B>): (self: Iterable<A>) => Iterable<B>;
209
+ export function filter<A>(p: Predicate<A>): (self: Iterable<A>) => Iterable<A>;
210
+ export function filter<A>(p: Predicate<A>) {
211
+ return (self: Iterable<A>): Iterable<A> => {
212
+ return self.filterWithIndex((_, a) => p(a));
213
+ };
198
214
  }
199
215
 
200
216
  /**
201
- * @tsplus fluent fncts.Iterable filterMap
217
+ * @tsplus pipeable fncts.Iterable filterMap
202
218
  */
203
- export function filterMap_<A, B>(self: Iterable<A>, f: (a: A) => Maybe<B>): Iterable<B> {
204
- return self.filterMapWithIndex((_, a) => f(a));
219
+ export function filterMap<A, B>(f: (a: A) => Maybe<B>) {
220
+ return (self: Iterable<A>): Iterable<B> => {
221
+ return self.filterMapWithIndex((_, a) => f(a));
222
+ };
205
223
  }
206
224
 
207
225
  /**
208
- * @tsplus fluent fncts.Iterable filterMapWithIndex
226
+ * @tsplus pipeable fncts.Iterable filterMapWithIndex
209
227
  */
210
- export function filterMapWithIndex_<A, B>(self: Iterable<A>, f: (i: number, a: A) => Maybe<B>): Iterable<B> {
211
- return Iterable.make<B>(() => {
212
- let i = 0;
213
- const ia = self[Symbol.iterator]();
214
- let va: IteratorResult<A>;
215
- let done = false;
216
- return {
217
- next() {
218
- if (done) {
219
- this.return!();
220
- }
221
- // eslint-disable-next-line no-constant-condition
222
- while (true) {
223
- va = ia.next();
224
- if (va.done) {
225
- return this.return!();
228
+ export function filterMapWithIndex<A, B>(f: (i: number, a: A) => Maybe<B>) {
229
+ return (self: Iterable<A>): Iterable<B> => {
230
+ return Iterable.make<B>(() => {
231
+ let i = 0;
232
+ const ia = self[Symbol.iterator]();
233
+ let va: IteratorResult<A>;
234
+ let done = false;
235
+ return {
236
+ next() {
237
+ if (done) {
238
+ this.return!();
226
239
  }
227
- const mb = f(i++, va.value);
228
- if (mb.isJust()) {
229
- return { done, value: mb.value };
240
+ // eslint-disable-next-line no-constant-condition
241
+ while (true) {
242
+ va = ia.next();
243
+ if (va.done) {
244
+ return this.return!();
245
+ }
246
+ const mb = f(i++, va.value);
247
+ if (mb.isJust()) {
248
+ return { done, value: mb.value };
249
+ }
230
250
  }
231
- }
232
- },
233
- return(value?: unknown) {
234
- if (!done) {
235
- done = true;
236
- if (typeof ia.return === "function") {
237
- ia.return();
251
+ },
252
+ return(value?: unknown) {
253
+ if (!done) {
254
+ done = true;
255
+ if (typeof ia.return === "function") {
256
+ ia.return();
257
+ }
238
258
  }
239
- }
240
- return { done, value };
241
- },
242
- };
243
- });
259
+ return { done, value };
260
+ },
261
+ };
262
+ });
263
+ };
244
264
  }
245
265
 
246
266
  /**
247
- * @tsplus fluent fncts.Iterable filterWithIndex
267
+ * @tsplus pipeable fncts.Iterable filterWithIndex
248
268
  */
249
- export function filterWithIndex_<A, B extends A>(self: Iterable<A>, p: RefinementWithIndex<number, A, B>): Iterable<B>;
250
- export function filterWithIndex_<A>(self: Iterable<A>, p: PredicateWithIndex<number, A>): Iterable<A>;
251
- export function filterWithIndex_<A>(self: Iterable<A>, p: PredicateWithIndex<number, A>): Iterable<A> {
252
- return Iterable.make<A>(() => {
253
- let done = false;
254
- let i = 0;
255
- const ia = self[Symbol.iterator]();
256
- let va: IteratorResult<A>;
257
- return {
258
- next() {
259
- if (done) {
260
- return this.return!();
261
- }
262
- // eslint-disable-next-line no-constant-condition
263
- while (true) {
264
- va = ia.next();
265
- if (va.done) return this.return!();
266
- if (p(i++, va.value)) return { done, value: va.value };
267
- }
268
- },
269
- return(value?: unknown) {
270
- if (!done) {
271
- done = true;
272
- if (typeof ia.return === "function") {
273
- ia.return();
269
+ export function filterWithIndex<A, B extends A>(
270
+ p: RefinementWithIndex<number, A, B>,
271
+ ): (self: Iterable<A>) => Iterable<B>;
272
+ export function filterWithIndex<A>(p: PredicateWithIndex<number, A>): (self: Iterable<A>) => Iterable<A>;
273
+ export function filterWithIndex<A>(p: PredicateWithIndex<number, A>) {
274
+ return (self: Iterable<A>): Iterable<A> => {
275
+ return Iterable.make<A>(() => {
276
+ let done = false;
277
+ let i = 0;
278
+ const ia = self[Symbol.iterator]();
279
+ let va: IteratorResult<A>;
280
+ return {
281
+ next() {
282
+ if (done) {
283
+ return this.return!();
274
284
  }
275
- }
276
- return { done, value };
277
- },
278
- };
279
- });
285
+ // eslint-disable-next-line no-constant-condition
286
+ while (true) {
287
+ va = ia.next();
288
+ if (va.done) return this.return!();
289
+ if (p(i++, va.value)) return { done, value: va.value };
290
+ }
291
+ },
292
+ return(value?: unknown) {
293
+ if (!done) {
294
+ done = true;
295
+ if (typeof ia.return === "function") {
296
+ ia.return();
297
+ }
298
+ }
299
+ return { done, value };
300
+ },
301
+ };
302
+ });
303
+ };
280
304
  }
281
305
 
282
306
  /**
283
- * @tsplus fluent fncts.Iterable find
307
+ * @tsplus pipeable fncts.Iterable find
284
308
  */
285
- export function find_<A, B extends A>(ia: Iterable<A>, refinement: Refinement<A, B>): Maybe<B>;
286
- export function find_<A>(ia: Iterable<A>, predicate: Predicate<A>): Maybe<A>;
287
- export function find_<A>(ia: Iterable<A>, predicate: Predicate<A>): Maybe<A> {
288
- for (const value of ia) {
289
- if (predicate(value)) {
290
- return Just(value);
309
+ export function find<A, B extends A>(refinement: Refinement<A, B>): (ia: Iterable<A>) => Maybe<B>;
310
+ export function find<A>(predicate: Predicate<A>): (ia: Iterable<A>) => Maybe<A>;
311
+ export function find<A>(predicate: Predicate<A>) {
312
+ return (ia: Iterable<A>): Maybe<A> => {
313
+ for (const value of ia) {
314
+ if (predicate(value)) {
315
+ return Just(value);
316
+ }
291
317
  }
292
- }
293
- return Nothing();
318
+ return Nothing();
319
+ };
294
320
  }
295
321
 
296
322
  /**
297
- * @tsplus fluent fncts.Iterable findIndex
323
+ * @tsplus pipeable fncts.Iterable findIndex
298
324
  */
299
- export function findIndex<A>(self: Iterable<A>, p: Predicate<A>): number {
300
- let i = 0;
301
- for (const value of self) {
302
- if (p(value)) {
303
- return i;
325
+ export function findIndex<A>(p: Predicate<A>) {
326
+ return (self: Iterable<A>): number => {
327
+ let i = 0;
328
+ for (const value of self) {
329
+ if (p(value)) {
330
+ return i;
331
+ }
332
+ i++;
304
333
  }
305
- i++;
306
- }
307
- return -1;
334
+ return -1;
335
+ };
308
336
  }
309
337
 
310
338
  /**
311
- * @tsplus fluent fncts.Iterable foldLeftWithIndex
339
+ * @tsplus pipeable fncts.Iterable foldLeftWithIndex
312
340
  */
313
- export function foldLeftWithIndex_<A, B>(fa: Iterable<A>, b: B, f: (i: number, b: B, a: A) => B): B {
314
- let res = b;
315
- let i = -1;
316
- for (const value of fa) {
317
- i += 1;
318
- res = f(i, res, value);
319
- }
320
- return res;
341
+ export function foldLeftWithIndex<A, B>(b: B, f: (i: number, b: B, a: A) => B) {
342
+ return (fa: Iterable<A>): B => {
343
+ let res = b;
344
+ let i = -1;
345
+ for (const value of fa) {
346
+ i += 1;
347
+ res = f(i, res, value);
348
+ }
349
+ return res;
350
+ };
321
351
  }
322
352
 
323
353
  /**
324
- * @tsplus fluent fncts.Iterable foldLeft
354
+ * @tsplus pipeable fncts.Iterable foldLeft
325
355
  */
326
- export function foldLeft_<A, B>(self: Iterable<A>, b: B, f: (b: B, a: A) => B): B {
327
- return self.foldLeftWithIndex(b, (_, b, a) => f(b, a));
356
+ export function foldLeft<A, B>(b: B, f: (b: B, a: A) => B) {
357
+ return (self: Iterable<A>): B => {
358
+ return self.foldLeftWithIndex(b, (_, b, a) => f(b, a));
359
+ };
328
360
  }
329
361
 
330
362
  /**
331
- * @tsplus fluent fncts.Iterable foldMap
363
+ * @tsplus pipeable fncts.Iterable foldMap
332
364
  */
333
- export function foldMap_<A, M>(self: Iterable<A>, f: (a: A) => M, /** @tsplus auto */ M: P.Monoid<M>): M {
334
- return self.foldMapWithIndex((_, a) => f(a), M);
365
+ export function foldMap<A, M>(f: (a: A) => M, /** @tsplus auto */ M: P.Monoid<M>) {
366
+ return (self: Iterable<A>): M => {
367
+ return self.foldMapWithIndex((_, a) => f(a), M);
368
+ };
335
369
  }
336
370
 
337
371
  /**
338
- * @tsplus fluent fncts.Iterable foldMapWithIndex
372
+ * @tsplus pipeable fncts.Iterable foldMapWithIndex
339
373
  */
340
- export function foldMapWithIndex_<A, M>(
341
- self: Iterable<A>,
342
- f: (i: number, a: A) => M,
343
- /** @tsplus auto */ M: P.Monoid<M>,
344
- ): M {
345
- let res = M.nat;
346
- let n = -1;
347
- for (const value of self) {
348
- n += 1;
349
- res = M.combine(res, f(n, value));
350
- }
351
- return res;
374
+ export function foldMapWithIndex<A, M>(f: (i: number, a: A) => M, /** @tsplus auto */ M: P.Monoid<M>) {
375
+ return (self: Iterable<A>): M => {
376
+ let res = M.nat;
377
+ let n = -1;
378
+ for (const value of self) {
379
+ n += 1;
380
+ res = M.combine(res, f(n, value));
381
+ }
382
+ return res;
383
+ };
352
384
  }
353
385
 
354
386
  /**
355
- * @tsplus fluent fncts.Iterable foldRightWithIndex
387
+ * @tsplus pipeable fncts.Iterable foldRightWithIndex
356
388
  */
357
- export function foldRightWithIndex_<A, B>(
358
- self: Iterable<A>,
359
- b: Eval<B>,
360
- f: (i: number, a: A, b: Eval<B>) => Eval<B>,
361
- ): Eval<B> {
362
- let i = 0;
363
- const iterator = self[Symbol.iterator]();
364
- const go: Eval<B> = Eval.defer(() => {
365
- const { value: current, done } = iterator.next();
366
- if (done) {
367
- return b;
368
- } else {
369
- return f(i++, current, go);
370
- }
371
- });
372
- return go;
389
+ export function foldRightWithIndex<A, B>(b: Eval<B>, f: (i: number, a: A, b: Eval<B>) => Eval<B>) {
390
+ return (self: Iterable<A>): Eval<B> => {
391
+ let i = 0;
392
+ const iterator = self[Symbol.iterator]();
393
+ const go: Eval<B> = Eval.defer(() => {
394
+ const { value: current, done } = iterator.next();
395
+ if (done) {
396
+ return b;
397
+ } else {
398
+ return f(i++, current, go);
399
+ }
400
+ });
401
+ return go;
402
+ };
373
403
  }
374
404
 
375
405
  /**
376
- * @tsplus fluent fncts.Iterable foldRight
406
+ * @tsplus pipeable fncts.Iterable foldRight
377
407
  */
378
- export function foldRight_<A, B>(self: Iterable<A>, b: Eval<B>, f: (a: A, b: Eval<B>) => Eval<B>): Eval<B> {
379
- return self.foldRightWithIndex(b, (_, a, b) => f(a, b));
408
+ export function foldRight<A, B>(b: Eval<B>, f: (a: A, b: Eval<B>) => Eval<B>) {
409
+ return (self: Iterable<A>): Eval<B> => {
410
+ return self.foldRightWithIndex(b, (_, a, b) => f(a, b));
411
+ };
380
412
  }
381
413
 
382
414
  /**
383
- * @tsplus fluent fncts.Iterable map
415
+ * @tsplus pipeable fncts.Iterable map
384
416
  */
385
- export function map_<A, B>(self: Iterable<A>, f: (a: A) => B): Iterable<B> {
386
- return self.mapWithIndex((_, a) => f(a));
417
+ export function map<A, B>(f: (a: A) => B) {
418
+ return (self: Iterable<A>): Iterable<B> => {
419
+ return self.mapWithIndex((_, a) => f(a));
420
+ };
387
421
  }
388
422
 
389
423
  /**
390
- * @tsplus fluent fncts.Iterable mapWithIndex
424
+ * @tsplus pipeable fncts.Iterable mapWithIndex
391
425
  */
392
- export function mapWithIndex_<A, B>(self: Iterable<A>, f: (i: number, a: A) => B): Iterable<B> {
393
- return Iterable.make<B>(() => {
394
- const ia = self[Symbol.iterator]();
395
- let i = 0;
396
- let done = false;
397
- let va: IteratorResult<A>;
398
- return {
399
- next() {
400
- if (done) {
401
- return this.return!();
402
- }
403
- va = ia.next();
404
- if (va.done) {
405
- return this.return!();
406
- }
407
- return { done, value: f(i++, va.value) };
408
- },
409
- return(value?: unknown) {
410
- if (!done) {
411
- done = true;
412
- if (typeof ia.return === "function") {
413
- ia.return();
426
+ export function mapWithIndex<A, B>(f: (i: number, a: A) => B) {
427
+ return (self: Iterable<A>): Iterable<B> => {
428
+ return Iterable.make<B>(() => {
429
+ const ia = self[Symbol.iterator]();
430
+ let i = 0;
431
+ let done = false;
432
+ let va: IteratorResult<A>;
433
+ return {
434
+ next() {
435
+ if (done) {
436
+ return this.return!();
414
437
  }
415
- }
416
- return { done, value };
417
- },
418
- };
419
- });
438
+ va = ia.next();
439
+ if (va.done) {
440
+ return this.return!();
441
+ }
442
+ return { done, value: f(i++, va.value) };
443
+ },
444
+ return(value?: unknown) {
445
+ if (!done) {
446
+ done = true;
447
+ if (typeof ia.return === "function") {
448
+ ia.return();
449
+ }
450
+ }
451
+ return { done, value };
452
+ },
453
+ };
454
+ });
455
+ };
420
456
  }
421
457
 
422
- type PartitionHandleResult<A> = { emit: true; value: A } | { emit: false };
423
-
458
+ type PartitionHandleResult<A> =
459
+ | {
460
+ emit: true;
461
+ value: A;
462
+ }
463
+ | {
464
+ emit: false;
465
+ };
424
466
  function handlePartitionMap<A, B, C>(
425
467
  f: (i: number, a: A) => Either<B, C>,
426
468
  i: number,
@@ -475,26 +517,24 @@ function partitionMapWithIndexIterator<A, B, C>(
475
517
  }
476
518
 
477
519
  /**
478
- * @tsplus fluent fncts.Iterable partitionMap
520
+ * @tsplus pipeable fncts.Iterable partitionMap
479
521
  */
480
- export function partitionMap_<A, B, C>(
481
- self: Iterable<A>,
482
- f: (a: A) => Either<B, C>,
483
- ): readonly [Iterable<B>, Iterable<C>] {
484
- return self.partitionMapWithIndex((_, a) => f(a));
522
+ export function partitionMap<A, B, C>(f: (a: A) => Either<B, C>) {
523
+ return (self: Iterable<A>): readonly [Iterable<B>, Iterable<C>] => {
524
+ return self.partitionMapWithIndex((_, a) => f(a));
525
+ };
485
526
  }
486
527
 
487
528
  /**
488
- * @tsplus fluent fncts.Iterable partitionMapWithIndex
529
+ * @tsplus pipeable fncts.Iterable partitionMapWithIndex
489
530
  */
490
- export function partitionMapWithIndex_<A, B, C>(
491
- fa: Iterable<A>,
492
- f: (i: number, a: A) => Either<B, C>,
493
- ): readonly [Iterable<B>, Iterable<C>] {
494
- return tuple(
495
- Iterable.make(() => partitionMapWithIndexIterator(fa, f, "Left")) as Iterable<B>,
496
- Iterable.make(() => partitionMapWithIndexIterator(fa, f, "Right")) as Iterable<C>,
497
- );
531
+ export function partitionMapWithIndex<A, B, C>(f: (i: number, a: A) => Either<B, C>) {
532
+ return (fa: Iterable<A>): readonly [Iterable<B>, Iterable<C>] => {
533
+ return tuple(
534
+ Iterable.make(() => partitionMapWithIndexIterator(fa, f, "Left")) as Iterable<B>,
535
+ Iterable.make(() => partitionMapWithIndexIterator(fa, f, "Right")) as Iterable<C>,
536
+ );
537
+ };
498
538
  }
499
539
 
500
540
  function handlePartition<A>(
@@ -545,33 +585,34 @@ function partitionWithIndexIterator<A>(
545
585
  }
546
586
 
547
587
  /**
548
- * @tsplus fluent fncts.Iterable partition
588
+ * @tsplus pipeable fncts.Iterable partition
549
589
  */
550
- export function partition_<A, B extends A>(self: Iterable<A>, p: Refinement<A, B>): readonly [Iterable<A>, Iterable<B>];
551
- export function partition_<A>(self: Iterable<A>, p: Predicate<A>): readonly [Iterable<A>, Iterable<A>];
552
- export function partition_<A>(self: Iterable<A>, p: Predicate<A>): readonly [Iterable<A>, Iterable<A>] {
553
- return self.partitionWithIndex((_, a) => p(a));
590
+ export function partition<A, B extends A>(
591
+ p: Refinement<A, B>,
592
+ ): (self: Iterable<A>) => readonly [Iterable<A>, Iterable<B>];
593
+ export function partition<A>(p: Predicate<A>): (self: Iterable<A>) => readonly [Iterable<A>, Iterable<A>];
594
+ export function partition<A>(p: Predicate<A>) {
595
+ return (self: Iterable<A>): readonly [Iterable<A>, Iterable<A>] => {
596
+ return self.partitionWithIndex((_, a) => p(a));
597
+ };
554
598
  }
555
599
 
556
600
  /**
557
- * @tsplus fluent fncts.Iterable partitionWithIndex
601
+ * @tsplus pipeable fncts.Iterable partitionWithIndex
558
602
  */
559
- export function partitionWithIndex_<A, B extends A>(
560
- self: Iterable<A>,
603
+ export function partitionWithIndex<A, B extends A>(
561
604
  p: RefinementWithIndex<number, A, B>,
562
- ): readonly [Iterable<A>, Iterable<B>];
563
- export function partitionWithIndex_<A>(
564
- self: Iterable<A>,
565
- p: PredicateWithIndex<number, A>,
566
- ): readonly [Iterable<A>, Iterable<A>];
567
- export function partitionWithIndex_<A>(
568
- self: Iterable<A>,
605
+ ): (self: Iterable<A>) => readonly [Iterable<A>, Iterable<B>];
606
+ export function partitionWithIndex<A>(
569
607
  p: PredicateWithIndex<number, A>,
570
- ): readonly [Iterable<A>, Iterable<A>] {
571
- return tuple(
572
- Iterable.make(() => partitionWithIndexIterator(self, p, false)),
573
- Iterable.make(() => partitionWithIndexIterator(self, p, true)),
574
- );
608
+ ): (self: Iterable<A>) => readonly [Iterable<A>, Iterable<A>];
609
+ export function partitionWithIndex<A>(p: PredicateWithIndex<number, A>) {
610
+ return (self: Iterable<A>): readonly [Iterable<A>, Iterable<A>] => {
611
+ return tuple(
612
+ Iterable.make(() => partitionWithIndexIterator(self, p, false)),
613
+ Iterable.make(() => partitionWithIndexIterator(self, p, true)),
614
+ );
615
+ };
575
616
  }
576
617
 
577
618
  /**
@@ -593,78 +634,74 @@ export function sum(self: Iterable<number>): number {
593
634
  }
594
635
 
595
636
  /**
596
- * @tsplus fluent fncts.Iterable take
637
+ * @tsplus pipeable fncts.Iterable take
597
638
  */
598
- export function take<A>(self: Iterable<A>, n: number): Iterable<A> {
599
- return Iterable.make<A>(() => {
600
- let done = false;
601
- let i = 0;
602
- let value: IteratorResult<A>;
603
- const iterator = self[Symbol.iterator]();
604
- return {
605
- next() {
606
- if (done || i >= n) {
607
- return this.return!();
608
- }
609
- value = iterator.next();
610
- i++;
611
- if (value.done) {
612
- this.return!();
613
- }
614
- return value;
615
- },
616
- return(value?: unknown) {
617
- if (!done) {
618
- done = true;
619
- if (typeof iterator.return === "function") {
620
- iterator.return();
639
+ export function take(n: number) {
640
+ return <A>(self: Iterable<A>): Iterable<A> => {
641
+ return Iterable.make<A>(() => {
642
+ let done = false;
643
+ let i = 0;
644
+ let value: IteratorResult<A>;
645
+ const iterator = self[Symbol.iterator]();
646
+ return {
647
+ next() {
648
+ if (done || i >= n) {
649
+ return this.return!();
621
650
  }
622
- }
623
- return { done: true, value };
624
- },
625
- };
626
- });
651
+ value = iterator.next();
652
+ i++;
653
+ if (value.done) {
654
+ this.return!();
655
+ }
656
+ return value;
657
+ },
658
+ return(value?: unknown) {
659
+ if (!done) {
660
+ done = true;
661
+ if (typeof iterator.return === "function") {
662
+ iterator.return();
663
+ }
664
+ }
665
+ return { done: true, value };
666
+ },
667
+ };
668
+ });
669
+ };
627
670
  }
628
671
 
629
672
  /**
630
- * @tsplus fluent fncts.Iterable zipWith
673
+ * @tsplus pipeable fncts.Iterable zipWith
631
674
  */
632
- export function zipWith_<A, B, C>(self: Iterable<A>, fb: Iterable<B>, f: (a: A, b: B) => C): Iterable<C> {
633
- return Iterable.make<C>(() => {
634
- let done = false;
635
- const ia = self[Symbol.iterator]();
636
- const ib = fb[Symbol.iterator]();
637
- return {
638
- next() {
639
- if (done) {
640
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
641
- return this.return!();
642
- }
643
-
644
- const va = ia.next();
645
- const vb = ib.next();
646
-
647
- return va.done || vb.done
648
- ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
649
- this.return!()
650
- : { done: false, value: f(va.value, vb.value) };
651
- },
652
- return(value?: unknown) {
653
- if (!done) {
654
- done = true;
655
-
656
- if (typeof ia.return === "function") {
657
- ia.return();
675
+ export function zipWith<A, B, C>(fb: Iterable<B>, f: (a: A, b: B) => C) {
676
+ return (self: Iterable<A>): Iterable<C> => {
677
+ return Iterable.make<C>(() => {
678
+ let done = false;
679
+ const ia = self[Symbol.iterator]();
680
+ const ib = fb[Symbol.iterator]();
681
+ return {
682
+ next() {
683
+ if (done) {
684
+ return this.return!();
658
685
  }
659
- if (typeof ib.return === "function") {
660
- ib.return();
686
+ const va = ia.next();
687
+ const vb = ib.next();
688
+ return va.done || vb.done ? this.return!() : { done: false, value: f(va.value, vb.value) };
689
+ },
690
+ return(value?: unknown) {
691
+ if (!done) {
692
+ done = true;
693
+ if (typeof ia.return === "function") {
694
+ ia.return();
695
+ }
696
+ if (typeof ib.return === "function") {
697
+ ib.return();
698
+ }
661
699
  }
662
- }
663
-
664
- return { done: true, value };
665
- },
666
- };
667
- });
700
+ return { done: true, value };
701
+ },
702
+ };
703
+ });
704
+ };
668
705
  }
669
706
 
670
707
  /**