@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,152 +4,160 @@ import * as tsplus_module_3 from "@fncts/base/typeclass/Equatable/api";
4
4
  import * as tsplus_module_4 from "@fncts/base/collection/immutable/Vector/definition";
5
5
  import * as tsplus_module_5 from "@fncts/base/data/Maybe/constructors";
6
6
  import * as tsplus_module_6 from "@fncts/base/collection/mutable/ListBuffer";
7
- import * as tsplus_module_7 from "@fncts/base/typeclass/TraversableWithIndex";
8
- import * as tsplus_module_8 from "@fncts/base/data/Maybe/definition";
9
- export const append_ = append_1;
10
- export const concat_ = concat_1;
11
- export const dropRepeatsWith_ = dropRepeatsWith_1;
7
+ import * as tsplus_module_7 from "@fncts/base/data/Maybe/definition";
8
+ export const append = append_1;
9
+ export const concat = concat_1;
10
+ export const dropRepeatsWith = dropRepeatsWith_1;
12
11
  export const empty = empty_1;
13
12
  export const emptyPushable = emptyPushable_1;
14
- export const exists_ = exists_1;
15
- export const findIndex_ = findIndex_1;
13
+ export const exists = exists_1;
14
+ export const findIndex = findIndex_1;
16
15
  export const flatten = flatten_1;
17
- export const foldLeft_ = foldLeft_1;
18
- export const foldLeftWithIndex_ = foldLeftWithIndex_1;
19
- export const foldMapWithIndex_ = foldMapWithIndex_1;
20
- export const foldRightWithIndex_ = foldRightWithIndex_1;
21
- export const forEach_ = forEach_1;
22
- export const map_ = map_1;
23
- export const mapWithIndex_ = mapWithIndex_1;
16
+ export const foldLeft = foldLeft_1;
17
+ export const foldLeftWithIndex = foldLeftWithIndex_1;
18
+ export const foldMapWithIndex = foldMapWithIndex_1;
19
+ export const foldRightWithIndex = foldRightWithIndex_1;
20
+ export const forEach = forEach_1;
21
+ export const map = map_1;
22
+ export const mapWithIndex = mapWithIndex_1;
24
23
  export const mutableClone = mutableClone_1;
25
24
  export const pop = pop_1;
26
- export const prepend_ = prepend_1;
27
- export const slice_ = slice_1;
28
- export const sortWith_ = sortWith_1;
29
- export const splitAt_ = splitAt_1;
30
- export const unsafeFind_ = unsafeFind_1;
31
- export const unsafeFindLast_ = unsafeFindLast_1;
32
- export const unsafeGet_ = unsafeGet_1;
25
+ export const prepend = prepend_1;
26
+ export const slice = slice_1;
27
+ export const sortWith = sortWith_1;
28
+ export const splitAt = splitAt_1;
29
+ export const _traverseWithIndex = _traverseWithIndex_1;
30
+ export const unsafeFind = unsafeFind_1;
31
+ export const unsafeFindLast = unsafeFindLast_1;
32
+ export const unsafeGet = unsafeGet_1;
33
33
  export const unsafeHead = unsafeHead_1;
34
34
  export const unsafeLast = unsafeLast_1;
35
- export const updateAt_ = updateAt_1;
35
+ export const updateAt = updateAt_1;
36
36
  export const vector = vector_1;
37
- import { affixPush, appendNodeToTree, arrayPush, branchBits, concatAffixes, concatBuffer, concatSubTree, copyArray, emptyAffix, foldLeftCb, foldLeftNode, foldLeftPrefix, foldLeftSuffix, foldRightCb, foldRightNode, foldRightPrefix, foldRightSuffix, getDepth, getHeight, getPrefixSize, getSuffixSize, handleOffset, incrementPrefix, incrementSuffix, mapAffix, mapNode, mapPrefix, mask, newAffix, newOffset, nodeNth, nodeNthDense, prependNodeToTree, push, reverseArray, setDepth, setPrefix, setSizes, setSuffix, sliceLeft, sliceRight, sliceTreeVector, updateNode, zeroOffset } from "@fncts/base/collection/immutable/Vector/internal";
37
+ import { affixPush, appendNodeToTree, arrayPush, branchBits, concatAffixes, concatBuffer, concatSubTree, copyArray, emptyAffix, foldLeftCb, foldLeftNode, foldLeftPrefix, foldLeftSuffix, foldRightCb, foldRightNode, foldRightPrefix, foldRightSuffix, getDepth, getHeight, getPrefixSize, getSuffixSize, handleOffset, incrementPrefix, incrementSuffix, mapAffix, mapNode, mapPrefix, mask, newAffix, newOffset, nodeNth, nodeNthDense, prependNodeToTree, reverseArray, setDepth, setPrefix, setSizes, setSuffix, sliceLeft, sliceRight, sliceTreeVector, updateNode, zeroOffset } from "@fncts/base/collection/immutable/Vector/internal";
38
38
  /**
39
39
  * Appends an element to the end of a Vector and returns the new Vector.
40
40
  *
41
41
  * @complexity O(n)
42
42
  *
43
- * @tsplus fluent fncts.Vector append
44
- * @tsplus operator fncts.Vector +
43
+ * @tsplus pipeable fncts.Vector append
44
+ * @tsplus pipeable-operator fncts.Vector +
45
45
  */
46
46
 
47
- function append_1(as, a) {
48
- const suffixSize = getSuffixSize(as);
47
+ function append_1(a) {
48
+ return as => {
49
+ const suffixSize = getSuffixSize(as);
49
50
 
50
- if (suffixSize < 32) {
51
- return new tsplus_module_1.Vector(incrementSuffix(as.bits), as.offset, as.length + 1, as.prefix, as.root, affixPush(a, as.suffix, suffixSize));
52
- }
51
+ if (suffixSize < 32) {
52
+ return new tsplus_module_1.Vector(incrementSuffix(as.bits), as.offset, as.length + 1, as.prefix, as.root, affixPush(a, as.suffix, suffixSize));
53
+ }
53
54
 
54
- const newSuffix = [a];
55
- const newVector = mutableClone_1(as);
56
- appendNodeToTree(newVector, as.suffix);
57
- newVector.suffix = newSuffix;
58
- newVector.length++;
59
- newVector.bits = setSuffix(1, newVector.bits);
60
- return newVector;
55
+ const newSuffix = [a];
56
+ const newVector = mutableClone_1(as);
57
+ appendNodeToTree(newVector, as.suffix);
58
+ newVector.suffix = newSuffix;
59
+ newVector.length++;
60
+ newVector.bits = setSuffix(1, newVector.bits);
61
+ return newVector;
62
+ };
61
63
  }
62
64
  /**
63
65
  * Maps a function over a Vector and concatenates all the resulting
64
66
  * Vectors together.
65
67
  *
66
- * @tsplus fluent fncts.Vector flatMap
68
+ * @tsplus pipeable fncts.Vector flatMap
67
69
  */
68
70
 
69
71
 
70
- export function flatMap_(ma, f) {
71
- return flatten_1(map_1(ma, f));
72
+ export function flatMap(f) {
73
+ return ma => {
74
+ return flatten_1(map_1(f)(ma));
75
+ };
72
76
  }
73
77
  /**
74
78
  * Splits the Vector into chunks of the given size.
75
79
  *
76
- * @tsplus fluent fncts.Vector chunksOf
77
- */
78
-
79
- export function chunksOf_(as, size) {
80
- const {
81
- buffer,
82
- l2
83
- } = foldLeft_1(as, {
84
- l2: emptyPushable_1(),
85
- buffer: emptyPushable_1()
86
- }, ({
87
- buffer,
88
- l2
89
- }, elem) => {
90
- tsplus_module_2.push(buffer, elem);
91
-
92
- if (buffer.length === size) {
93
- return {
94
- l2: tsplus_module_2.push(l2, buffer),
95
- buffer: emptyPushable_1()
96
- };
97
- } else {
98
- return {
99
- l2,
100
- buffer
101
- };
102
- }
103
- });
104
- return buffer.length === 0 ? l2 : tsplus_module_2.push(l2, buffer);
80
+ * @tsplus pipeable fncts.Vector chunksOf
81
+ */
82
+
83
+ export function chunksOf(size) {
84
+ return as => {
85
+ const {
86
+ buffer,
87
+ l2
88
+ } = foldLeft_1({
89
+ l2: emptyPushable_1(),
90
+ buffer: emptyPushable_1()
91
+ }, ({
92
+ buffer,
93
+ l2
94
+ }, elem) => {
95
+ tsplus_module_2.push(elem)(buffer);
96
+
97
+ if (buffer.length === size) {
98
+ return {
99
+ l2: tsplus_module_2.push(buffer)(l2),
100
+ buffer: emptyPushable_1()
101
+ };
102
+ } else {
103
+ return {
104
+ l2,
105
+ buffer
106
+ };
107
+ }
108
+ })(as);
109
+ return buffer.length === 0 ? l2 : tsplus_module_2.push(buffer)(l2);
110
+ };
105
111
  }
106
112
 
107
- function concat_1(self, that) {
108
- if (self.length === 0) {
109
- return that;
110
- } else if (that.length === 0) {
111
- return self;
112
- }
113
+ function concat_1(that) {
114
+ return self => {
115
+ if (self.length === 0) {
116
+ return that;
117
+ } else if (that.length === 0) {
118
+ return self;
119
+ }
113
120
 
114
- const newSize = self.length + that.length;
115
- const rightSuffixSize = getSuffixSize(that);
116
- let newVector = mutableClone_1(self);
121
+ const newSize = self.length + that.length;
122
+ const rightSuffixSize = getSuffixSize(that);
123
+ let newVector = mutableClone_1(self);
117
124
 
118
- if (that.root === undefined) {
119
- // right is nothing but a prefix and a suffix
120
- const nrOfAffixes = concatAffixes(self, that);
125
+ if (that.root === undefined) {
126
+ // right is nothing but a prefix and a suffix
127
+ const nrOfAffixes = concatAffixes(self, that);
121
128
 
122
- for (let i = 0; i < nrOfAffixes; ++i) {
123
- newVector = appendNodeToTree(newVector, concatBuffer[i]);
124
- newVector.length += concatBuffer[i].length; // wipe pointer, otherwise it might end up keeping the array alive
129
+ for (let i = 0; i < nrOfAffixes; ++i) {
130
+ newVector = appendNodeToTree(newVector, concatBuffer[i]);
131
+ newVector.length += concatBuffer[i].length; // wipe pointer, otherwise it might end up keeping the array alive
125
132
 
126
- concatBuffer[i] = undefined;
127
- }
133
+ concatBuffer[i] = undefined;
134
+ }
128
135
 
129
- newVector.length = newSize;
130
- newVector.suffix = concatBuffer[nrOfAffixes];
131
- newVector.bits = setSuffix(concatBuffer[nrOfAffixes].length, newVector.bits);
132
- concatBuffer[nrOfAffixes] = undefined;
133
- return newVector;
134
- } else {
135
- const leftSuffixSize = getSuffixSize(self);
136
+ newVector.length = newSize;
137
+ newVector.suffix = concatBuffer[nrOfAffixes];
138
+ newVector.bits = setSuffix(concatBuffer[nrOfAffixes].length, newVector.bits);
139
+ concatBuffer[nrOfAffixes] = undefined;
140
+ return newVector;
141
+ } else {
142
+ const leftSuffixSize = getSuffixSize(self);
136
143
 
137
- if (leftSuffixSize > 0) {
138
- newVector = appendNodeToTree(newVector, self.suffix.slice(0, leftSuffixSize));
139
- newVector.length += leftSuffixSize;
140
- }
144
+ if (leftSuffixSize > 0) {
145
+ newVector = appendNodeToTree(newVector, self.suffix.slice(0, leftSuffixSize));
146
+ newVector.length += leftSuffixSize;
147
+ }
141
148
 
142
- newVector = appendNodeToTree(newVector, that.prefix.slice(0, getPrefixSize(that)).reverse());
143
- const newNode = concatSubTree(newVector.root, getDepth(newVector), that.root, getDepth(that), true);
144
- const newDepth = getHeight(newNode);
145
- setSizes(newNode, newDepth);
146
- newVector.root = newNode;
147
- newVector.offset &= ~(mask << getDepth(self) * branchBits);
148
- newVector.length = newSize;
149
- newVector.bits = setSuffix(rightSuffixSize, setDepth(newDepth, newVector.bits));
150
- newVector.suffix = that.suffix;
151
- return newVector;
152
- }
149
+ newVector = appendNodeToTree(newVector, that.prefix.slice(0, getPrefixSize(that)).reverse());
150
+ const newNode = concatSubTree(newVector.root, getDepth(newVector), that.root, getDepth(that), true);
151
+ const newDepth = getHeight(newNode);
152
+ setSizes(newNode, newDepth);
153
+ newVector.root = newNode;
154
+ newVector.offset &= ~(mask << getDepth(self) * branchBits);
155
+ newVector.length = newSize;
156
+ newVector.bits = setSuffix(rightSuffixSize, setDepth(newDepth, newVector.bits));
157
+ newVector.suffix = that.suffix;
158
+ return newVector;
159
+ }
160
+ };
153
161
  }
154
162
 
155
163
  const containsState = {
@@ -165,34 +173,40 @@ function containsCb(value, state) {
165
173
  * Otherwise it returns `false`.
166
174
  *
167
175
  * @complexity O(n)
168
- * @tsplus fluent fncts.Vector contains
176
+ * @tsplus pipeable fncts.Vector contains
169
177
  */
170
178
 
171
179
 
172
- export function contains_(as, element) {
173
- containsState.element = element;
174
- containsState.result = false;
175
- return foldLeftCb(containsCb, containsState, as).result;
180
+ export function contains(element) {
181
+ return as => {
182
+ containsState.element = element;
183
+ containsState.result = false;
184
+ return foldLeftCb(containsCb, containsState, as).result;
185
+ };
176
186
  }
177
187
  /**
178
188
  * Returns a new Vector without the first `n` elements.
179
189
  *
180
190
  * @complexity `O(log(n))`
181
- * @tsplus fluent fncts.Vector drop
191
+ * @tsplus pipeable fncts.Vector drop
182
192
  */
183
193
 
184
- export function drop_(as, n) {
185
- return slice_1(as, n, as.length);
194
+ export function drop(n) {
195
+ return as => {
196
+ return slice_1(n, as.length)(as);
197
+ };
186
198
  }
187
199
  /**
188
200
  * Returns a new Vector without the last `n` elements.
189
201
  *
190
202
  * @complexity `O(log(n))`
191
- * @tsplus fluent fncts.Vector dropLast
203
+ * @tsplus pipeable fncts.Vector dropLast
192
204
  */
193
205
 
194
- export function dropLast_(as, n) {
195
- return slice_1(as, 0, as.length - n);
206
+ export function dropLast(n) {
207
+ return as => {
208
+ return slice_1(0, as.length - n)(as);
209
+ };
196
210
  }
197
211
  /**
198
212
  * Returns a new Vector without repeated elements.
@@ -202,18 +216,20 @@ export function dropLast_(as, n) {
202
216
  */
203
217
 
204
218
  export function dropRepeats(as) {
205
- return dropRepeatsWith_1(as, tsplus_module_3.strictEquals);
219
+ return dropRepeatsWith_1(tsplus_module_3.strictEquals)(as);
206
220
  }
207
221
  /**
208
222
  * Returns a new Vector without repeated elements by using the given
209
223
  * function to determine when elements are equal.
210
224
  *
211
225
  * @complexity `O(n)`
212
- * @tsplus fluent fncts.Vector dropRepeatsWith
226
+ * @tsplus pipeable fncts.Vector dropRepeatsWith
213
227
  */
214
228
 
215
- function dropRepeatsWith_1(as, predicate) {
216
- return foldLeft_1(as, emptyPushable_1(), (acc, a) => acc.length !== 0 && predicate(unsafeLast_1(acc), a) ? acc : tsplus_module_2.push(acc, a));
229
+ function dropRepeatsWith_1(predicate) {
230
+ return as => {
231
+ return foldLeft_1(emptyPushable_1(), (acc, a) => acc.length !== 0 && predicate(unsafeLast_1(acc), a) ? acc : tsplus_module_2.push(a)(acc))(as);
232
+ };
217
233
  }
218
234
 
219
235
  function findNotIndexCb(value, state) {
@@ -230,61 +246,67 @@ function findNotIndexCb(value, state) {
230
246
  *
231
247
  * @complexity `O(k + log(n))` where `k` is the number of elements
232
248
  * satisfying the predicate.
233
- * @tsplus fluent fncts.Vector dropWhile
249
+ * @tsplus pipeable fncts.Vector dropWhile
234
250
  */
235
251
 
236
252
 
237
- export function dropWhile_(as, predicate) {
238
- const {
239
- index
240
- } = foldLeftCb(findNotIndexCb, {
241
- predicate,
242
- index: 0
243
- }, as);
244
- return slice_1(as, index, as.length);
253
+ export function dropWhile(predicate) {
254
+ return as => {
255
+ const {
256
+ index
257
+ } = foldLeftCb(findNotIndexCb, {
258
+ predicate,
259
+ index: 0
260
+ }, as);
261
+ return slice_1(index, as.length)(as);
262
+ };
245
263
  }
246
264
 
247
265
  function elemCb(value, state) {
248
266
  return !(state.result = state.equals(value, state.element));
249
267
  }
250
268
  /**
251
- * @tsplus getter fncts.Vector elem
269
+ * @tsplus pipeable fncts.Vector elem
252
270
  */
253
271
 
254
272
 
255
- export function elem_(self) {
256
- return E => {
257
- const elemState = {
258
- equals: E.equals,
259
- element: undefined,
260
- result: false
261
- };
262
- return a => {
263
- elemState.element = a;
264
- return foldLeftCb(elemCb, elemState, self).result;
265
- };
273
+ export function elem(a,
274
+ /** @tsplus auto */
275
+ E) {
276
+ const elemState = {
277
+ equals: E.equals,
278
+ element: undefined,
279
+ result: false
280
+ };
281
+ return self => {
282
+ elemState.element = a;
283
+ return foldLeftCb(elemCb, elemState, self).result;
266
284
  };
267
285
  }
268
286
  /**
269
287
  * Returns true if the two Vectors are equivalent.
270
288
  *
271
289
  * @complexity O(n)
272
- * @tsplus fluent fncts.Vector equals
290
+ * @tsplus pipeable fncts.Vector equals
273
291
  */
274
292
 
275
- export function equals_(self, that) {
276
- return tsplus_module_4.corresponds_(self, that, tsplus_module_3.strictEquals);
293
+ export function equals(that) {
294
+ return self => {
295
+ return tsplus_module_4.corresponds(that, tsplus_module_3.strictEquals)(self);
296
+ };
277
297
  }
278
298
 
279
299
  function everyCb(value, state) {
280
300
  return state.result = state.predicate(value);
281
301
  }
282
302
 
283
- export function every_(as, predicate) {
284
- return foldLeftCb(everyCb, {
285
- predicate,
286
- result: true
287
- }, as).result;
303
+ export function every(predicate) {
304
+ return as => {
305
+ return foldLeftCb(everyCb, {
306
+ predicate,
307
+ result: true
308
+ }, as).result;
309
+ };
288
310
  }
289
311
  /**
290
312
  * Creates an empty Vector.
@@ -314,27 +336,31 @@ function existsCb(value, state) {
314
336
  *
315
337
  * @complexity O(n)
316
338
  *
317
- * @tsplus fluent fncts.Vector exists
339
+ * @tsplus pipeable fncts.Vector exists
318
340
  */
319
341
 
320
342
 
321
- function exists_1(as, predicate) {
322
- return foldLeftCb(existsCb, {
323
- predicate,
324
- result: false
325
- }, as).result;
343
+ function exists_1(predicate) {
344
+ return as => {
345
+ return foldLeftCb(existsCb, {
346
+ predicate,
347
+ result: false
348
+ }, as).result;
349
+ };
326
350
  }
327
351
  /**
328
352
  * Returns the _first_ element for which the predicate returns `true`.
329
353
  * If no such element is found the function returns `undefined`.
330
354
  *
331
355
  * @complexity O(n)
332
- * @tsplus fluent fncts.Vector find
356
+ * @tsplus pipeable fncts.Vector find
333
357
  */
334
358
 
335
359
 
336
- export function find_(as, predicate) {
337
- return tsplus_module_5.fromNullable(unsafeFind_1(as, predicate));
360
+ export function find(predicate) {
361
+ return as => {
362
+ return tsplus_module_5.fromNullable(unsafeFind_1(predicate)(as));
363
+ };
338
364
  }
339
365
 
340
366
  function findIndexCb(value, state) {
@@ -347,32 +373,36 @@ function findIndexCb(value, state) {
347
373
  * `-1`.
348
374
  *
349
375
  * @complexity O(n)
350
- * @tsplus fluent fncts.Vector findIndex
376
+ * @tsplus pipeable fncts.Vector findIndex
351
377
  */
352
378
 
353
379
 
354
- function findIndex_1(as, predicate) {
355
- const {
356
- found,
357
- index
358
- } = foldLeftCb(findIndexCb, {
359
- predicate,
360
- found: false,
361
- index: -1
362
- }, as);
363
- return found ? index : -1;
380
+ function findIndex_1(predicate) {
381
+ return as => {
382
+ const {
383
+ found,
384
+ index
385
+ } = foldLeftCb(findIndexCb, {
386
+ predicate,
387
+ found: false,
388
+ index: -1
389
+ }, as);
390
+ return found ? index : -1;
391
+ };
364
392
  }
365
393
  /**
366
394
  * Returns the _last_ element for which the predicate returns `true`.
367
395
  * If no such element is found the function returns `undefined`.
368
396
  *
369
397
  * @complexity O(n)
370
- * @tsplus fluent fncts.Vector findLast
398
+ * @tsplus pipeable fncts.Vector findLast
371
399
  */
372
400
 
373
401
 
374
- export function findLast_(as, predicate) {
375
- return tsplus_module_5.fromNullable(unsafeFindLast_1(as, predicate));
402
+ export function findLast(predicate) {
403
+ return as => {
404
+ return tsplus_module_5.fromNullable(unsafeFindLast_1(predicate)(as));
405
+ };
376
406
  }
377
407
  /**
378
408
  * Returns the index of the `last` element for which the predicate
@@ -380,19 +410,21 @@ export function findLast_(as, predicate) {
380
410
  * `-1`.
381
411
  *
382
412
  * @complexity O(n)
383
- * @tsplus fluent fncts.Vector findLastIndex
384
- */
385
-
386
- export function findLastIndex_(as, predicate) {
387
- const {
388
- found,
389
- index
390
- } = foldRightCb(findIndexCb, {
391
- predicate,
392
- found: false,
393
- index: -0
394
- }, as);
395
- return found ? index : -1;
413
+ * @tsplus pipeable fncts.Vector findLastIndex
414
+ */
415
+
416
+ export function findLastIndex(predicate) {
417
+ return as => {
418
+ const {
419
+ found,
420
+ index
421
+ } = foldRightCb(findIndexCb, {
422
+ predicate,
423
+ found: false,
424
+ index: -0
425
+ }, as);
426
+ return found ? index : -1;
427
+ };
396
428
  }
397
429
  /**
398
430
  * Flattens a Vector of Vectors into a Vector. Note that this function does
@@ -404,7 +436,7 @@ export function findLastIndex_(as, predicate) {
404
436
  */
405
437
 
406
438
  function flatten_1(mma) {
407
- return foldLeft_1(mma, empty_1(), (acc, a) => concat_1(acc, a));
439
+ return foldLeft_1(empty_1(), (acc, a) => concat_1(a)(acc))(mma);
408
440
  }
409
441
 
410
442
  export function from(sequence) {
@@ -412,14 +444,14 @@ export function from(sequence) {
412
444
 
413
445
  if (sequence.length > 0 && (sequence[0] !== undefined || 0 in sequence)) {
414
446
  for (let i = 0; i < sequence.length; ++i) {
415
- tsplus_module_2.push(l, sequence[i]);
447
+ tsplus_module_2.push(sequence[i])(l);
416
448
  }
417
449
  } else if (Symbol.iterator in sequence) {
418
450
  const iterator = sequence[Symbol.iterator]();
419
451
  let cur;
420
452
 
421
453
  while (!(cur = iterator.next()).done) {
422
- tsplus_module_2.push(l, cur.value);
454
+ tsplus_module_2.push(cur.value)(l);
423
455
  }
424
456
  }
425
457
 
@@ -428,27 +460,31 @@ export function from(sequence) {
428
460
  /**
429
461
  * Folds a function over a Vector. Left-associative.
430
462
  *
431
- * @tsplus fluent fncts.Vector foldLeft
463
+ * @tsplus pipeable fncts.Vector foldLeft
432
464
  */
433
465
 
434
- function foldLeft_1(fa, initial, f) {
435
- return foldLeftWithIndex_1(fa, initial, (_, b, a) => f(b, a));
466
+ function foldLeft_1(initial, f) {
467
+ return fa => {
468
+ return foldLeftWithIndex_1(initial, (_, b, a) => f(b, a))(fa);
469
+ };
436
470
  }
437
471
  /**
438
- * @tsplus fluent fncts.Vector foldLeftWithIndex
472
+ * @tsplus pipeable fncts.Vector foldLeftWithIndex
439
473
  */
440
474
 
441
475
 
442
- function foldLeftWithIndex_1(fa, b, f) {
443
- const suffixSize = getSuffixSize(fa);
444
- const prefixSize = getPrefixSize(fa);
445
- let [acc, index] = foldLeftPrefix(f, b, fa.prefix, prefixSize);
476
+ function foldLeftWithIndex_1(b, f) {
477
+ return fa => {
478
+ const suffixSize = getSuffixSize(fa);
479
+ const prefixSize = getPrefixSize(fa);
480
+ let [acc, index] = foldLeftPrefix(f, b, fa.prefix, prefixSize);
446
481
 
447
- if (fa.root !== undefined) {
448
- [acc, index] = foldLeftNode(f, acc, fa.root, getDepth(fa), index);
449
- }
482
+ if (fa.root !== undefined) {
483
+ [acc, index] = foldLeftNode(f, acc, fa.root, getDepth(fa), index);
484
+ }
450
485
 
451
- return foldLeftSuffix(f, acc, fa.suffix, suffixSize, index)[0];
486
+ return foldLeftSuffix(f, acc, fa.suffix, suffixSize, index)[0];
487
+ };
452
488
  }
453
489
  /**
454
490
  * Similar to `foldl`. But, for each element it calls the predicate function
@@ -475,78 +511,90 @@ function foldWhileCb(a, state, i) {
475
511
  return true;
476
512
  }
477
513
  /**
478
- * @tsplus fluent fncts.Vector foldLeftWhile
514
+ * @tsplus pipeable fncts.Vector foldLeftWhile
479
515
  */
480
516
 
481
517
 
482
- export function foldLeftWhile_(fa, b, cont, f) {
483
- if (!cont(b)) {
484
- return b;
485
- }
518
+ export function foldLeftWhile(b, cont, f) {
519
+ return fa => {
520
+ if (!cont(b)) {
521
+ return b;
522
+ }
486
523
 
487
- return foldLeftCb(foldWhileCb, {
488
- predicate: cont,
489
- f,
490
- result: b
491
- }, fa).result;
524
+ return foldLeftCb(foldWhileCb, {
525
+ predicate: cont,
526
+ f,
527
+ result: b
528
+ }, fa).result;
529
+ };
492
530
  }
493
531
  /**
494
- * @tsplus fluent fncts.Vector foldRightWhile
532
+ * @tsplus pipeable fncts.Vector foldRightWhile
495
533
  */
496
534
 
497
- export function foldRightWhile_(fa, b, cont, f) {
498
- return foldRightCb(foldWhileCb, {
499
- predicate: cont,
500
- result: b,
501
- f: (i, b, a) => f(i, a, b)
502
- }, fa).result;
535
+ export function foldRightWhile(b, cont, f) {
536
+ return fa => {
537
+ return foldRightCb(foldWhileCb, {
538
+ predicate: cont,
539
+ result: b,
540
+ f: (i, b, a) => f(i, a, b)
541
+ }, fa).result;
542
+ };
503
543
  }
504
544
  /**
505
- * @tsplus fluent fncts.Vector foldMap
545
+ * @tsplus pipeable fncts.Vector foldMap
506
546
  */
507
547
 
508
- export function foldMap_(self, f,
548
+ export function foldMap(f,
509
549
  /** @tsplus auto */
510
550
  M) {
511
- return foldMapWithIndex_1(self, (_, a) => f(a), M);
551
+ return self => {
552
+ return foldMapWithIndex_1((_, a) => f(a), M)(self);
553
+ };
512
554
  }
513
555
  /**
514
- * @tsplus fluent fncts.Vector foldMapWithIndex
556
+ * @tsplus pipeable fncts.Vector foldMapWithIndex
515
557
  */
516
558
 
517
- function foldMapWithIndex_1(self, f,
559
+ function foldMapWithIndex_1(f,
518
560
  /** @tsplus auto */
519
561
  M) {
520
- return foldLeftWithIndex_1(self, M.nat, (i, b, a) => M.combine(b, f(i, a)));
562
+ return self => {
563
+ return foldLeftWithIndex_1(M.nat, (i, b, a) => M.combine(b, f(i, a)))(self);
564
+ };
521
565
  }
522
566
  /**
523
567
  * Folds a function over a Vector. Right-associative.
524
568
  *
525
569
  * @complexity O(n)
526
- * @tsplus fluent fncts.Vector foldRight
570
+ * @tsplus pipeable fncts.Vector foldRight
527
571
  */
528
572
 
529
573
 
530
- export function foldRight_(fa, initial, f) {
531
- return foldRightWithIndex_1(fa, initial, (_, a, b) => f(a, b));
574
+ export function foldRight(initial, f) {
575
+ return fa => {
576
+ return foldRightWithIndex_1(initial, (_, a, b) => f(a, b))(fa);
577
+ };
532
578
  }
533
579
  /**
534
580
  * Folds a function over a Vector. Right-associative.
535
581
  *
536
582
  * @complexity O(n)
537
- * @tsplus fluent fncts.Vector foldRightWithIndex
583
+ * @tsplus pipeable fncts.Vector foldRightWithIndex
538
584
  */
539
585
 
540
- function foldRightWithIndex_1(fa, b, f) {
541
- const suffixSize = getSuffixSize(fa);
542
- const prefixSize = getPrefixSize(fa);
543
- let [acc, j] = foldRightSuffix(f, b, fa.suffix, suffixSize, fa.length - 1);
586
+ function foldRightWithIndex_1(b, f) {
587
+ return fa => {
588
+ const suffixSize = getSuffixSize(fa);
589
+ const prefixSize = getPrefixSize(fa);
590
+ let [acc, j] = foldRightSuffix(f, b, fa.suffix, suffixSize, fa.length - 1);
544
591
 
545
- if (fa.root !== undefined) {
546
- [acc, j] = foldRightNode(f, acc, fa.root, getDepth(fa), j);
547
- }
592
+ if (fa.root !== undefined) {
593
+ [acc, j] = foldRightNode(f, acc, fa.root, getDepth(fa), j);
594
+ }
548
595
 
549
- return foldRightPrefix(f, acc, fa.prefix, prefixSize, j)[0];
596
+ return foldRightPrefix(f, acc, fa.prefix, prefixSize, j)[0];
597
+ };
550
598
  }
551
599
  /**
552
600
  * Invokes a given callback for each element in the Vector from left to
@@ -558,31 +606,37 @@ function foldRightWithIndex_1(fa, b, f) {
558
606
  * makes `forEach` faster when the new Vector is unneeded.
559
607
  *
560
608
  * @complexity O(n)
561
- * @tsplus fluent fncts.Vector forEach
609
+ * @tsplus pipeable fncts.Vector forEach
562
610
  */
563
611
 
564
612
 
565
- function forEach_1(as, f) {
566
- foldLeft_1(as, undefined, (_, element) => f(element));
613
+ function forEach_1(f) {
614
+ return as => {
615
+ foldLeft_1(undefined, (_, element) => f(element))(as);
616
+ };
567
617
  }
568
618
  /**
569
- * @tsplus fluent fncts.Vector forEachWithIndex
619
+ * @tsplus pipeable fncts.Vector forEachWithIndex
570
620
  */
571
621
 
572
622
 
573
- export function forEachWithIndex_(as, f) {
574
- foldLeftWithIndex_1(as, undefined, (index, _, element) => f(index, element));
623
+ export function forEachWithIndex(f) {
624
+ return as => {
625
+ foldLeftWithIndex_1(undefined, (index, _, element) => f(index, element))(as);
626
+ };
575
627
  }
576
628
  /**
577
629
  * Gets the nth element of the Vector. If `n` is out of bounds
578
630
  * `undefined` is returned.
579
631
  *
580
632
  * @complexity O(log(n))
581
- * @tsplus fluent fncts.Vector get
633
+ * @tsplus pipeable fncts.Vector get
582
634
  */
583
635
 
584
- export function get_(self, index) {
585
- return tsplus_module_5.fromNullable(unsafeGet_1(self, index));
636
+ export function get(index) {
637
+ return self => {
638
+ return tsplus_module_5.fromNullable(unsafeGet_1(index)(self));
639
+ };
586
640
  }
587
641
  /**
588
642
  * Returns a Vector of Vectors where each subvector's elements are pairwise
@@ -592,21 +646,23 @@ export function get_(self, index) {
592
646
  * equal elements should be grouped together the Vector should be sorted
593
647
  * before grouping.
594
648
  *
595
- * @tsplus fluent fncts.Vector groupWith
649
+ * @tsplus pipeable fncts.Vector groupWith
596
650
  */
597
651
 
598
- export function groupWith_(as, f) {
599
- const result = emptyPushable_1();
600
- let buffer = emptyPushable_1();
601
- forEach_1(as, a => {
602
- if (buffer.length !== 0 && !f(unsafeLast_1(buffer), a)) {
603
- tsplus_module_2.push(result, buffer);
604
- buffer = emptyPushable_1();
605
- }
652
+ export function groupWith(f) {
653
+ return as => {
654
+ const result = emptyPushable_1();
655
+ let buffer = emptyPushable_1();
656
+ forEach_1(a => {
657
+ if (buffer.length !== 0 && !f(unsafeLast_1(buffer), a)) {
658
+ tsplus_module_2.push(buffer)(result);
659
+ buffer = emptyPushable_1();
660
+ }
606
661
 
607
- tsplus_module_2.push(buffer, a);
608
- });
609
- return buffer.length === 0 ? result : tsplus_module_2.push(result, buffer);
662
+ tsplus_module_2.push(a)(buffer);
663
+ })(as);
664
+ return buffer.length === 0 ? result : tsplus_module_2.push(buffer)(result);
665
+ };
610
666
  }
611
667
  /**
612
668
  * Returns the first element of the Vector.
@@ -628,47 +684,55 @@ function indexOfCb(value, state) {
628
684
  * to the given element. If no such element is found `-1` is returned.
629
685
  *
630
686
  * @complexity O(n)
631
- * @tsplus fluent fncts.Vector indexOf
687
+ * @tsplus pipeable fncts.Vector indexOf
632
688
  */
633
689
 
634
690
 
635
- export function indexOf_(as, element) {
636
- const state = {
637
- element,
638
- found: false,
639
- index: -1
691
+ export function indexOf(element) {
692
+ return as => {
693
+ const state = {
694
+ element,
695
+ found: false,
696
+ index: -1
697
+ };
698
+ foldLeftCb(indexOfCb, state, as);
699
+ return state.found ? state.index : -1;
640
700
  };
641
- foldLeftCb(indexOfCb, state, as);
642
- return state.found ? state.index : -1;
643
701
  }
644
702
  /**
645
703
  * Inserts the given element at the given index in the Vector.
646
704
  *
647
705
  * @complexity O(log(n))
648
- * @tsplus fluent fncts.Vector insertAt
706
+ * @tsplus pipeable fncts.Vector insertAt
649
707
  */
650
708
 
651
- export function insertAt_(as, index, element) {
652
- return concat_1(append_1(slice_1(as, 0, index), element), slice_1(as, index, as.length));
709
+ export function insertAt(index, element) {
710
+ return as => {
711
+ return concat_1(slice_1(index, as.length)(as))(append_1(element)(slice_1(0, index)(as)));
712
+ };
653
713
  }
654
714
  /**
655
715
  * Inserts the given Vector of elements at the given index in the Vector.
656
716
  *
657
717
  * @complexity `O(log(n))`
658
- * @tsplus fluent fncts.Vector insertAllAt
718
+ * @tsplus pipeable fncts.Vector insertAllAt
659
719
  */
660
720
 
661
- export function insertAllAt_(as, index, elements) {
662
- return concat_1(concat_1(slice_1(as, 0, index), elements), slice_1(as, index, as.length));
721
+ export function insertAllAt(index, elements) {
722
+ return as => {
723
+ return concat_1(slice_1(index, as.length)(as))(concat_1(elements)(slice_1(0, index)(as)));
724
+ };
663
725
  }
664
726
  /**
665
727
  * Inserts a separator between each element in a Vector.
666
728
  *
667
- * @tsplus fluent fncts.Vector intersperse
729
+ * @tsplus pipeable fncts.Vector intersperse
668
730
  */
669
731
 
670
- export function intersperse_(as, separator) {
671
- return pop_1(foldLeft_1(as, emptyPushable_1(), (l2, a) => tsplus_module_2.push(tsplus_module_2.push(l2, a), separator)));
732
+ export function intersperse(separator) {
733
+ return as => {
734
+ return pop_1(foldLeft_1(emptyPushable_1(), (l2, a) => tsplus_module_2.push(separator)(tsplus_module_2.push(a)(l2)))(as));
735
+ };
672
736
  }
673
737
  /**
674
738
  * @tsplus fluent fncts.Vector isEmpty
@@ -687,11 +751,13 @@ export function isNonEmpty(l) {
687
751
  /**
688
752
  * Concatenates the strings in the Vector separated by a specified separator.
689
753
  *
690
- * @tsplus fluent fncts.Vector join
754
+ * @tsplus pipeable fncts.Vector join
691
755
  */
692
756
 
693
- export function join_(as, separator) {
694
- return foldLeft_1(as, "", (a, b) => a.length === 0 ? b : a + separator + b);
757
+ export function join(separator) {
758
+ return as => {
759
+ return foldLeft_1("", (a, b) => a.length === 0 ? b : a + separator + b)(as);
760
+ };
695
761
  }
696
762
  /**
697
763
  * Returns the last element of the Vector.
@@ -708,17 +774,19 @@ export function last(l) {
708
774
  * to the given element. If no such element is found `-1` is returned.
709
775
  *
710
776
  * @complexity O(n)
711
- * @tsplus fluent fncts.Vector lastIndexOf
777
+ * @tsplus pipeable fncts.Vector lastIndexOf
712
778
  */
713
779
 
714
- export function lastIndexOf_(as, element) {
715
- const state = {
716
- element,
717
- found: false,
718
- index: 0
780
+ export function lastIndexOf(element) {
781
+ return as => {
782
+ const state = {
783
+ element,
784
+ found: false,
785
+ index: 0
786
+ };
787
+ foldRightCb(indexOfCb, state, as);
788
+ return state.found ? as.length - state.index : -1;
719
789
  };
720
- foldRightCb(indexOfCb, state, as);
721
- return state.found ? as.length - state.index : -1;
722
790
  }
723
791
  /**
724
792
  * Generates a new Vector by calling a function with the current index
@@ -732,44 +800,50 @@ export function makeBy(n, f) {
732
800
  const l = emptyPushable_1();
733
801
 
734
802
  for (let i = 0; i < n; i++) {
735
- tsplus_module_2.push(l, f(i));
803
+ tsplus_module_2.push(f(i))(l);
736
804
  }
737
805
 
738
806
  return l;
739
807
  }
740
808
  /**
741
- * @tsplus fluent fncts.Vector mapAccum
809
+ * @tsplus pipeable fncts.Vector mapAccum
742
810
  */
743
811
 
744
- export function mapAccum_(fa, s, f) {
745
- return foldLeft_1(fa, [emptyPushable_1(), s], ([acc, s], a) => {
746
- const r = f(s, a);
747
- tsplus_module_2.push(acc, r[0]);
748
- return [acc, r[1]];
749
- });
812
+ export function mapAccum(s, f) {
813
+ return fa => {
814
+ return foldLeft_1([emptyPushable_1(), s], ([acc, s], a) => {
815
+ const r = f(s, a);
816
+ tsplus_module_2.push(r[0])(acc);
817
+ return [acc, r[1]];
818
+ })(fa);
819
+ };
750
820
  }
751
821
  /**
752
822
  * Applies a function to each element in the given Vector and returns a
753
823
  * new Vector of the values that the function return.
754
824
  *
755
825
  * @complexity O(n)
756
- * @tsplus fluent fncts.Vector map
826
+ * @tsplus pipeable fncts.Vector map
757
827
  */
758
828
 
759
- function map_1(fa, f) {
760
- return mapWithIndex_1(fa, (_, a) => f(a));
829
+ function map_1(f) {
830
+ return fa => {
831
+ return mapWithIndex_1((_, a) => f(a))(fa);
832
+ };
761
833
  }
762
834
  /**
763
835
  * Applies a function to each element in the given Vector and returns a
764
836
  * new Vector of the values that the function return.
765
837
  *
766
838
  * @complexity O(n)
767
- * @tsplus fluent fncts.Vector mapWithIndex
839
+ * @tsplus pipeable fncts.Vector mapWithIndex
768
840
  */
769
841
 
770
842
 
771
- function mapWithIndex_1(fa, f) {
772
- return new tsplus_module_1.Vector(fa.bits, fa.offset, fa.length, mapPrefix(f, fa.prefix, getPrefixSize(fa)), fa.root === undefined ? undefined : mapNode(f, fa.root, getDepth(fa), getPrefixSize(fa), 1)[0], mapAffix(f, fa.suffix, getSuffixSize(fa), fa.length));
843
+ function mapWithIndex_1(f) {
844
+ return fa => {
845
+ return new tsplus_module_1.Vector(fa.bits, fa.offset, fa.length, mapPrefix(f, fa.prefix, getPrefixSize(fa)), fa.root === undefined ? undefined : mapNode(f, fa.root, getDepth(fa), getPrefixSize(fa), 1)[0], mapAffix(f, fa.suffix, getSuffixSize(fa), fa.length));
846
+ };
773
847
  }
774
848
  /**
775
849
  * @tsplus getter fncts.Vector mutableClone
@@ -788,16 +862,18 @@ function mutableClone_1(as) {
788
862
  *
789
863
  * @complexity `O(log(n))`
790
864
  *
791
- * @tsplus fluent fncts.Vector modifyAt
865
+ * @tsplus pipeable fncts.Vector modifyAt
792
866
  */
793
867
 
794
868
 
795
- export function modifyAt_(as, i, f) {
796
- if (i < 0 || as.length <= i) {
797
- return as;
798
- }
869
+ export function modifyAt(i, f) {
870
+ return as => {
871
+ if (i < 0 || as.length <= i) {
872
+ return as;
873
+ }
799
874
 
800
- return updateAt_1(as, i, f(unsafeGet_1(as, i)));
875
+ return updateAt_1(i, f(unsafeGet_1(i)(as)))(as);
876
+ };
801
877
  }
802
878
  /**
803
879
  * Returns `true` if and only if the predicate function returns
@@ -805,11 +881,13 @@ export function modifyAt_(as, i, f) {
805
881
  *
806
882
  * @complexity O(n)
807
883
  *
808
- * @tsplus fluent fncts.Vector none
884
+ * @tsplus pipeable fncts.Vector none
809
885
  */
810
886
 
811
- export function none_(as, predicate) {
812
- return !exists_1(as, predicate);
887
+ export function none(predicate) {
888
+ return as => {
889
+ return !exists_1(predicate)(as);
890
+ };
813
891
  }
814
892
  /**
815
893
  * Takes two arguments and returns a Vector that contains them.
@@ -830,31 +908,33 @@ export function pair(first, second) {
830
908
  */
831
909
 
832
910
  function pop_1(as) {
833
- return slice_1(as, 0, -1);
911
+ return slice_1(0, -1)(as);
834
912
  }
835
913
  /**
836
914
  * Prepends an element to the front of a Vector and returns the new Vector.
837
915
  *
838
916
  * @complexity O(1)
839
917
  *
840
- * @tsplus fluent fncts.Vector prepend
918
+ * @tsplus pipeable fncts.Vector prepend
841
919
  */
842
920
 
843
921
 
844
- function prepend_1(as, a) {
845
- const prefixSize = getPrefixSize(as);
922
+ function prepend_1(a) {
923
+ return as => {
924
+ const prefixSize = getPrefixSize(as);
846
925
 
847
- if (prefixSize < 32) {
848
- return new tsplus_module_1.Vector(incrementPrefix(as.bits), as.offset, as.length + 1, affixPush(a, as.prefix, prefixSize), as.root, as.suffix);
849
- } else {
850
- const newVector = mutableClone_1(as);
851
- prependNodeToTree(newVector, reverseArray(as.prefix));
852
- const newPrefix = [a];
853
- newVector.prefix = newPrefix;
854
- newVector.length++;
855
- newVector.bits = setPrefix(1, newVector.bits);
856
- return newVector;
857
- }
926
+ if (prefixSize < 32) {
927
+ return new tsplus_module_1.Vector(incrementPrefix(as.bits), as.offset, as.length + 1, affixPush(a, as.prefix, prefixSize), as.root, as.suffix);
928
+ } else {
929
+ const newVector = mutableClone_1(as);
930
+ prependNodeToTree(newVector, reverseArray(as.prefix));
931
+ const newPrefix = [a];
932
+ newVector.prefix = newPrefix;
933
+ newVector.length++;
934
+ newVector.bits = setPrefix(1, newVector.bits);
935
+ return newVector;
936
+ }
937
+ };
858
938
  }
859
939
  /**
860
940
  * @tsplus operator fncts.Vector +
@@ -862,7 +942,7 @@ function prepend_1(as, a) {
862
942
 
863
943
 
864
944
  export function prependOperator(a, as) {
865
- return prepend_1(as, a);
945
+ return prepend_1(a)(as);
866
946
  }
867
947
  /**
868
948
  * Returns a Vector of numbers between an inclusive lower bound and an exclusive upper bound.
@@ -875,7 +955,7 @@ export function range(start, end) {
875
955
  const vec = emptyPushable_1();
876
956
 
877
957
  for (let i = start; i < end; ++i) {
878
- tsplus_module_2.push(vec, i);
958
+ tsplus_module_2.push(i)(vec);
879
959
  }
880
960
 
881
961
  return vec;
@@ -887,11 +967,13 @@ export function range(start, end) {
887
967
  *
888
968
  * @complexity `O(log(n))`
889
969
  *
890
- * @tsplus fluent fncts.Vector remove
970
+ * @tsplus pipeable fncts.Vector remove
891
971
  */
892
972
 
893
- export function remove_(as, from, amount) {
894
- return concat_1(slice_1(as, 0, from), slice_1(as, from + amount, as.length));
973
+ export function remove(from, amount) {
974
+ return as => {
975
+ return concat_1(slice_1(from + amount, as.length)(as))(slice_1(0, from)(as));
976
+ };
895
977
  }
896
978
  /**
897
979
  * Returns a Vector of a given length that contains the specified value
@@ -906,7 +988,7 @@ export function replicate(n, a) {
906
988
  const l = emptyPushable_1();
907
989
 
908
990
  while (--t >= 0) {
909
- tsplus_module_2.push(l, a);
991
+ tsplus_module_2.push(a)(l);
910
992
  }
911
993
 
912
994
  return l;
@@ -916,17 +998,19 @@ export function replicate(n, a) {
916
998
  */
917
999
 
918
1000
  export function reverse(self) {
919
- return foldLeft_1(self, empty_1(), (vec, elem) => prepend_1(vec, elem));
1001
+ return foldLeft_1(empty_1(), (vec, elem) => prepend_1(elem)(vec))(self);
920
1002
  }
921
1003
  /**
922
1004
  * Folds a function over a Vector from left to right while collecting
923
1005
  * all the intermediate steps in a resulting Vector.
924
1006
  *
925
- * @tsplus fluent fncts.Vector scanLeft
1007
+ * @tsplus pipeable fncts.Vector scanLeft
926
1008
  */
927
1009
 
928
- export function scanLeft_(as, initial, f) {
929
- return foldLeft_1(as, tsplus_module_2.push(emptyPushable_1(), initial), (l2, a) => tsplus_module_2.push(l2, f(unsafeLast_1(l2), a)));
1010
+ export function scanLeft(initial, f) {
1011
+ return as => {
1012
+ return foldLeft_1(tsplus_module_2.push(initial)(emptyPushable_1()), (l2, a) => tsplus_module_2.push(f(unsafeLast_1(l2), a))(l2))(as);
1013
+ };
930
1014
  }
931
1015
  /**
932
1016
  * Takes a single arguments and returns a singleton Vector that contains it.
@@ -944,114 +1028,118 @@ export function single(a) {
944
1028
  * from the right end of the Vector.
945
1029
  *
946
1030
  * @complexity `O(log(n))`
947
- * @tsplus fluent fncts.Vector slice
1031
+ * @tsplus pipeable fncts.Vector slice
948
1032
  */
949
1033
 
950
- function slice_1(as, from, to) {
951
- let {
952
- bits,
953
- length
954
- } = as;
955
- let _to = to;
956
- let _from = from;
957
- _to = Math.min(length, to); // Handle negative indices
1034
+ function slice_1(from, to) {
1035
+ return as => {
1036
+ let {
1037
+ bits,
1038
+ length
1039
+ } = as;
1040
+ let _to = to;
1041
+ let _from = from;
1042
+ _to = Math.min(length, to); // Handle negative indices
958
1043
 
959
- if (_from < 0) {
960
- _from = length + from;
961
- }
1044
+ if (_from < 0) {
1045
+ _from = length + from;
1046
+ }
962
1047
 
963
- if (_to < 0) {
964
- _to = length + to;
965
- } // Should we just return the empty Vector?
1048
+ if (_to < 0) {
1049
+ _to = length + to;
1050
+ } // Should we just return the empty Vector?
966
1051
 
967
1052
 
968
- if (_to <= _from || _to <= 0 || length <= _from) {
969
- return empty_1();
970
- } // Return Vector unchanged if we are slicing nothing off
1053
+ if (_to <= _from || _to <= 0 || length <= _from) {
1054
+ return empty_1();
1055
+ } // Return Vector unchanged if we are slicing nothing off
971
1056
 
972
1057
 
973
- if (_from <= 0 && length <= _to) {
974
- return as;
975
- }
1058
+ if (_from <= 0 && length <= _to) {
1059
+ return as;
1060
+ }
976
1061
 
977
- const newLength = _to - _from;
978
- let prefixSize = getPrefixSize(as);
979
- const suffixSize = getSuffixSize(as); // Both indices lie in the prefix
1062
+ const newLength = _to - _from;
1063
+ let prefixSize = getPrefixSize(as);
1064
+ const suffixSize = getSuffixSize(as); // Both indices lie in the prefix
980
1065
 
981
- if (_to <= prefixSize) {
982
- return new tsplus_module_1.Vector(setPrefix(newLength, 0), 0, newLength, as.prefix.slice(prefixSize - _to, prefixSize - _from), undefined, emptyAffix);
983
- }
1066
+ if (_to <= prefixSize) {
1067
+ return new tsplus_module_1.Vector(setPrefix(newLength, 0), 0, newLength, as.prefix.slice(prefixSize - _to, prefixSize - _from), undefined, emptyAffix);
1068
+ }
984
1069
 
985
- const suffixStart = length - suffixSize; // Both indices lie in the suffix
1070
+ const suffixStart = length - suffixSize; // Both indices lie in the suffix
986
1071
 
987
- if (suffixStart <= _from) {
988
- return new tsplus_module_1.Vector(setSuffix(newLength, 0), 0, newLength, emptyAffix, undefined, as.suffix.slice(_from - suffixStart, _to - suffixStart));
989
- }
1072
+ if (suffixStart <= _from) {
1073
+ return new tsplus_module_1.Vector(setSuffix(newLength, 0), 0, newLength, emptyAffix, undefined, as.suffix.slice(_from - suffixStart, _to - suffixStart));
1074
+ }
990
1075
 
991
- const newVector = mutableClone_1(as);
992
- newVector.length = newLength; // Both indices lie in the tree
1076
+ const newVector = mutableClone_1(as);
1077
+ newVector.length = newLength; // Both indices lie in the tree
993
1078
 
994
- if (prefixSize <= _from && _to <= suffixStart) {
995
- sliceTreeVector(_from - prefixSize + as.offset, _to - prefixSize + as.offset - 1, as.root, getDepth(as), as.offset, newVector);
996
- return newVector;
997
- }
1079
+ if (prefixSize <= _from && _to <= suffixStart) {
1080
+ sliceTreeVector(_from - prefixSize + as.offset, _to - prefixSize + as.offset - 1, as.root, getDepth(as), as.offset, newVector);
1081
+ return newVector;
1082
+ }
998
1083
 
999
- if (0 < _from) {
1000
- // we need _to slice something off of the left
1001
- if (_from < prefixSize) {
1002
- // shorten the prefix even though it's not strictly needed,
1003
- // so that referenced items can be GC'd
1004
- newVector.prefix = as.prefix.slice(0, prefixSize - _from);
1005
- bits = setPrefix(prefixSize - _from, bits);
1006
- } else {
1007
- // if we're here `_to` can't lie in the tree, so we can set the
1008
- // root
1009
- zeroOffset();
1010
- newVector.root = sliceLeft(newVector.root, getDepth(as), _from - prefixSize, as.offset, true);
1011
- newVector.offset = newOffset;
1012
-
1013
- if (newVector.root === undefined) {
1014
- bits = setDepth(0, bits);
1084
+ if (0 < _from) {
1085
+ // we need _to slice something off of the left
1086
+ if (_from < prefixSize) {
1087
+ // shorten the prefix even though it's not strictly needed,
1088
+ // so that referenced items can be GC'd
1089
+ newVector.prefix = as.prefix.slice(0, prefixSize - _from);
1090
+ bits = setPrefix(prefixSize - _from, bits);
1091
+ } else {
1092
+ // if we're here `_to` can't lie in the tree, so we can set the
1093
+ // root
1094
+ zeroOffset();
1095
+ newVector.root = sliceLeft(newVector.root, getDepth(as), _from - prefixSize, as.offset, true);
1096
+ newVector.offset = newOffset;
1097
+
1098
+ if (newVector.root === undefined) {
1099
+ bits = setDepth(0, bits);
1100
+ }
1101
+
1102
+ bits = setPrefix(newAffix.length, bits);
1103
+ prefixSize = newAffix.length;
1104
+ newVector.prefix = newAffix;
1015
1105
  }
1016
-
1017
- bits = setPrefix(newAffix.length, bits);
1018
- prefixSize = newAffix.length;
1019
- newVector.prefix = newAffix;
1020
1106
  }
1021
- }
1022
1107
 
1023
- if (_to < length) {
1024
- // we need _to slice something off of the right
1025
- if (length - _to < suffixSize) {
1026
- bits = setSuffix(suffixSize - (length - _to), bits); // slice the suffix even though it's not strictly needed,
1027
- // _to allow the removed items _to be GC'd
1108
+ if (_to < length) {
1109
+ // we need _to slice something off of the right
1110
+ if (length - _to < suffixSize) {
1111
+ bits = setSuffix(suffixSize - (length - _to), bits); // slice the suffix even though it's not strictly needed,
1112
+ // _to allow the removed items _to be GC'd
1028
1113
 
1029
- newVector.suffix = as.suffix.slice(0, suffixSize - (length - _to));
1030
- } else {
1031
- newVector.root = sliceRight(newVector.root, getDepth(as), _to - prefixSize - 1, newVector.offset);
1114
+ newVector.suffix = as.suffix.slice(0, suffixSize - (length - _to));
1115
+ } else {
1116
+ newVector.root = sliceRight(newVector.root, getDepth(as), _to - prefixSize - 1, newVector.offset);
1032
1117
 
1033
- if (newVector.root === undefined) {
1034
- bits = setDepth(0, bits);
1035
- newVector.offset = 0;
1036
- }
1118
+ if (newVector.root === undefined) {
1119
+ bits = setDepth(0, bits);
1120
+ newVector.offset = 0;
1121
+ }
1037
1122
 
1038
- bits = setSuffix(newAffix.length, bits);
1039
- newVector.suffix = newAffix;
1123
+ bits = setSuffix(newAffix.length, bits);
1124
+ newVector.suffix = newAffix;
1125
+ }
1040
1126
  }
1041
- }
1042
1127
 
1043
- newVector.bits = bits;
1044
- return newVector;
1128
+ newVector.bits = bits;
1129
+ return newVector;
1130
+ };
1045
1131
  }
1046
1132
  /**
1047
- * @tsplus fluent fncts.Vector sort
1133
+ * @tsplus pipeable fncts.Vector sort
1048
1134
  */
1049
1135
 
1050
1136
 
1051
- export function sort_(self,
1137
+ export function sort(
1052
1138
  /** @tsplus auto */
1053
1139
  O) {
1054
- return sortWith_1(self, O.compare);
1140
+ return self => {
1141
+ return sortWith_1(O.compare)(self);
1142
+ };
1055
1143
  }
1056
1144
  /**
1057
1145
  * Sort the given Vector by comparing values using the given function.
@@ -1062,33 +1150,35 @@ O) {
1062
1150
  *
1063
1151
  * @complexity O(n * log(n))
1064
1152
  *
1065
- * @tsplus fluent fncts.Vector sortWith
1066
- */
1067
-
1068
- function sortWith_1(as, compare) {
1069
- const arr = [];
1070
- let i = 0;
1071
- forEach_1(as, elm => arr.push({
1072
- idx: i++,
1073
- elm
1074
- }));
1075
- arr.sort(({
1076
- elm: a,
1077
- idx: i
1078
- }, {
1079
- elm: b,
1080
- idx: j
1081
- }) => {
1082
- const c = compare(a, b);
1083
- return c !== 0 ? c : i < j ? -1 : 1;
1084
- });
1085
- const newL = emptyPushable_1();
1086
-
1087
- for (let i = 0; i < arr.length; ++i) {
1088
- tsplus_module_2.push(newL, arr[i].elm);
1089
- }
1153
+ * @tsplus pipeable fncts.Vector sortWith
1154
+ */
1155
+
1156
+ function sortWith_1(compare) {
1157
+ return as => {
1158
+ const arr = [];
1159
+ let i = 0;
1160
+ forEach_1(elm => arr.push({
1161
+ idx: i++,
1162
+ elm
1163
+ }))(as);
1164
+ arr.sort(({
1165
+ elm: a,
1166
+ idx: i
1167
+ }, {
1168
+ elm: b,
1169
+ idx: j
1170
+ }) => {
1171
+ const c = compare(a, b);
1172
+ return c !== 0 ? c : i < j ? -1 : 1;
1173
+ });
1174
+ const newL = emptyPushable_1();
1175
+
1176
+ for (let i = 0; i < arr.length; ++i) {
1177
+ tsplus_module_2.push(arr[i].elm)(newL);
1178
+ }
1090
1179
 
1091
- return newL;
1180
+ return newL;
1181
+ };
1092
1182
  }
1093
1183
  /**
1094
1184
  * Splits a Vector at the given index and return the two sides in a pair.
@@ -1098,12 +1188,14 @@ function sortWith_1(as, compare) {
1098
1188
  *
1099
1189
  * @complexity `O(log(n))`
1100
1190
  *
1101
- * @tsplus fluent fncts.Vector splitAt
1191
+ * @tsplus pipeable fncts.Vector splitAt
1102
1192
  */
1103
1193
 
1104
1194
 
1105
- function splitAt_1(as, index) {
1106
- return [slice_1(as, 0, index), slice_1(as, index, as.length)];
1195
+ function splitAt_1(index) {
1196
+ return as => {
1197
+ return [slice_1(0, index)(as), slice_1(index, as.length)(as)];
1198
+ };
1107
1199
  }
1108
1200
  /**
1109
1201
  * Splits a Vector at the first element in the Vector for which the given
@@ -1111,13 +1203,15 @@ function splitAt_1(as, index) {
1111
1203
  *
1112
1204
  * @complexity `O(n)`
1113
1205
  *
1114
- * @tsplus fluent fncts.Vector splitWhen
1206
+ * @tsplus pipeable fncts.Vector splitWhen
1115
1207
  */
1116
1208
 
1117
1209
 
1118
- export function splitWhen_(as, predicate) {
1119
- const idx = findIndex_1(as, predicate);
1120
- return idx === -1 ? [as, empty_1()] : splitAt_1(as, idx);
1210
+ export function splitWhen(predicate) {
1211
+ return as => {
1212
+ const idx = findIndex_1(predicate)(as);
1213
+ return idx === -1 ? [as, empty_1()] : splitAt_1(idx)(as);
1214
+ };
1121
1215
  }
1122
1216
  /**
1123
1217
  * Returns a new Vector with the first element removed. If the Vector is
@@ -1129,17 +1223,19 @@ export function splitWhen_(as, predicate) {
1129
1223
  */
1130
1224
 
1131
1225
  export function tail(as) {
1132
- return slice_1(as, 1, as.length);
1226
+ return slice_1(1, as.length)(as);
1133
1227
  }
1134
1228
  /**
1135
1229
  * Takes the first `n` elements from a Vector and returns them in a new Vector.
1136
1230
  *
1137
1231
  * @complexity `O(log(n))`
1138
- * @tsplus fluent fncts.Vector take
1232
+ * @tsplus pipeable fncts.Vector take
1139
1233
  */
1140
1234
 
1141
- export function take_(as, n) {
1142
- return slice_1(as, 0, n);
1235
+ export function take(n) {
1236
+ return as => {
1237
+ return slice_1(0, n)(as);
1238
+ };
1143
1239
  }
1144
1240
  /**
1145
1241
  * Takes the first elements in the Vector for which the predicate returns
@@ -1148,28 +1244,32 @@ export function take_(as, n) {
1148
1244
  * @complexity `O(k + log(n))` where `k` is the number of elements satisfying
1149
1245
  * the predicate.
1150
1246
  *
1151
- * @tsplus fluent fncts.Vector takeWhile
1247
+ * @tsplus pipeable fncts.Vector takeWhile
1152
1248
  */
1153
1249
 
1154
- export function takeWhile_(as, predicate) {
1155
- const {
1156
- index
1157
- } = foldLeftCb(findNotIndexCb, {
1158
- predicate,
1159
- index: 0
1160
- }, as);
1161
- return slice_1(as, 0, index);
1250
+ export function takeWhile(predicate) {
1251
+ return as => {
1252
+ const {
1253
+ index
1254
+ } = foldLeftCb(findNotIndexCb, {
1255
+ predicate,
1256
+ index: 0
1257
+ }, as);
1258
+ return slice_1(0, index)(as);
1259
+ };
1162
1260
  }
1163
1261
  /**
1164
1262
  * Takes the last `n` elements from a Vector and returns them in a new
1165
1263
  * Vector.
1166
1264
  *
1167
1265
  * @complexity `O(log(n))`
1168
- * @tsplus fluent fncts.Vector takeLast
1266
+ * @tsplus pipeable fncts.Vector takeLast
1169
1267
  */
1170
1268
 
1171
- export function takeLast_(as, n) {
1172
- return slice_1(as, as.length - n, as.length);
1269
+ export function takeLast(n) {
1270
+ return as => {
1271
+ return slice_1(as.length - n, as.length)(as);
1272
+ };
1173
1273
  }
1174
1274
  /**
1175
1275
  * Takes the last elements in the Vector for which the predicate returns
@@ -1178,17 +1278,19 @@ export function takeLast_(as, n) {
1178
1278
  * @complexity `O(k + log(n))` where `k` is the number of elements
1179
1279
  * satisfying the predicate.
1180
1280
  *
1181
- * @tsplus fluent fncts.Vector takeLastWhile
1281
+ * @tsplus pipeable fncts.Vector takeLastWhile
1182
1282
  */
1183
1283
 
1184
- export function takeLastWhile_(as, predicate) {
1185
- const {
1186
- index
1187
- } = foldRightCb(findNotIndexCb, {
1188
- predicate,
1189
- index: 0
1190
- }, as);
1191
- return slice_1(as, as.length - index, as.length);
1284
+ export function takeLastWhile(predicate) {
1285
+ return as => {
1286
+ const {
1287
+ index
1288
+ } = foldRightCb(findNotIndexCb, {
1289
+ predicate,
1290
+ index: 0
1291
+ }, as);
1292
+ return slice_1(as.length - index, as.length)(as);
1293
+ };
1192
1294
  }
1193
1295
  /**
1194
1296
  * Converts a Vector into an array.
@@ -1198,7 +1300,7 @@ export function takeLastWhile_(as, predicate) {
1198
1300
  */
1199
1301
 
1200
1302
  export function toArray(self) {
1201
- return foldLeft_1(self, [], arrayPush);
1303
+ return foldLeft_1([], arrayPush)(self);
1202
1304
  }
1203
1305
  /**
1204
1306
  * Converts a Vector into a List.
@@ -1209,27 +1311,28 @@ export function toArray(self) {
1209
1311
 
1210
1312
  export function toList(self) {
1211
1313
  const buffer = new tsplus_module_6.ListBuffer();
1212
- forEach_1(self, a => {
1314
+ forEach_1(a => {
1213
1315
  buffer.append(a);
1214
- });
1316
+ })(self);
1215
1317
  return buffer.toList;
1216
1318
  }
1217
- /**
1218
- * @tsplus getter fncts.Vector traverseWithIndex
1219
- */
1220
1319
 
1221
- const traverseWithIndex_1 = /*#__PURE__*/tsplus_module_7.mkTraverseWithIndex_()(() => self => G => f => {
1222
- return foldLeftWithIndex_1(self, G.pure(emptyPushable_1()), (i, b, a) => G.zipWith(b, f(i, a), (v, b) => {
1223
- push(v, b);
1320
+ function _traverseWithIndex_1(self) {
1321
+ return G => f => foldLeftWithIndex_1(G.pure(emptyPushable_1()), (i, b, a) => G.zipWith(f(i, a), (v, b) => {
1322
+ tsplus_module_2.push(b)(v);
1224
1323
  return v;
1225
- }));
1226
- });
1227
- export const traverseWithIndex = traverseWithIndex_1;
1324
+ })(b))(self);
1325
+ }
1228
1326
  /**
1229
1327
  * @tsplus getter fncts.Vector traverse
1230
1328
  */
1231
1329
 
1232
- export const traverse = self => G => f => traverseWithIndex_1(self)(G)((_, a) => f(a));
1330
+
1331
+ export function _traverse(self) {
1332
+ return G => f => _traverseWithIndex_1(self)(G)((_, a) => f(a));
1333
+ }
1334
+ export const traverseWithIndex = G => f => self => _traverseWithIndex_1(self)(G)(f);
1335
+ export const traverse = G => f => self => _traverseWithIndex_1(self)(G)((_, a) => f(a));
1233
1336
  /**
1234
1337
  * Returns a new Vector without repeated elements by using the given
1235
1338
  * Eq instance to determine when elements are equal
@@ -1239,7 +1342,7 @@ export const traverse = self => G => f => traverseWithIndex_1(self)(G)((_, a) =>
1239
1342
  */
1240
1343
 
1241
1344
  export function uniq(as) {
1242
- return E => dropRepeatsWith_1(as, E.equals);
1345
+ return E => dropRepeatsWith_1(E.equals)(as);
1243
1346
  }
1244
1347
  /**
1245
1348
  * @tsplus static fncts.VectorOps unfold
@@ -1252,9 +1355,9 @@ export function unfold(b, f) {
1252
1355
  while (true) {
1253
1356
  const mt = f(state);
1254
1357
 
1255
- if (tsplus_module_8.isJust(mt)) {
1358
+ if (tsplus_module_7.isJust(mt)) {
1256
1359
  const [a, b] = mt.value;
1257
- tsplus_module_2.push(out, a);
1360
+ tsplus_module_2.push(a)(out);
1258
1361
  state = b;
1259
1362
  } else {
1260
1363
  break;
@@ -1277,59 +1380,66 @@ function findCb(value, state) {
1277
1380
  * If no such element is found the function returns `undefined`.
1278
1381
  *
1279
1382
  * @complexity O(n)
1280
- * @tsplus fluent fncts.Vector unsafeFind
1383
+ * @tsplus pipeable fncts.Vector unsafeFind
1281
1384
  */
1282
1385
 
1283
1386
 
1284
- function unsafeFind_1(as, predicate) {
1285
- return foldLeftCb(findCb, {
1286
- predicate,
1287
- result: undefined
1288
- }, as).result;
1387
+ function unsafeFind_1(predicate) {
1388
+ return as => {
1389
+ return foldLeftCb(findCb, {
1390
+ predicate,
1391
+ result: undefined
1392
+ }, as).result;
1393
+ };
1289
1394
  }
1290
1395
  /**
1291
1396
  * Returns the _last_ element for which the predicate returns `true`.
1292
1397
  * If no such element is found the function returns `undefined`.
1293
1398
  *
1294
1399
  * @complexity O(n)
1295
- * @tsplus fluent fncts.Vector unsafeFindLast
1400
+ * @tsplus pipeable fncts.Vector unsafeFindLast
1296
1401
  */
1297
1402
 
1298
1403
 
1299
- function unsafeFindLast_1(as, predicate) {
1300
- return foldRightCb(findCb, {
1301
- predicate,
1302
- result: undefined
1303
- }, as).result;
1404
+ function unsafeFindLast_1(predicate) {
1405
+ return as => {
1406
+ return foldRightCb(findCb, {
1407
+ predicate,
1408
+ result: undefined
1409
+ }, as).result;
1410
+ };
1304
1411
  }
1305
1412
  /**
1306
1413
  * Gets the nth element of the Vector. If `n` is out of bounds
1307
1414
  * `undefined` is returned.
1308
1415
  *
1309
1416
  * @complexity O(log(n))
1310
- * @tsplus fluent fncts.Vector unsafeGet
1417
+ * @tsplus pipeable fncts.Vector unsafeGet
1418
+ * @tsplus pipeable-index fncts.Vector
1311
1419
  */
1312
1420
 
1313
1421
 
1314
- function unsafeGet_1(l, index) {
1315
- if (index < 0 || l.length <= index) {
1316
- return undefined;
1317
- }
1422
+ function unsafeGet_1(index) {
1423
+ return l => {
1424
+ if (index < 0 || l.length <= index) {
1425
+ return undefined;
1426
+ }
1318
1427
 
1319
- const prefixSize = getPrefixSize(l);
1320
- const suffixSize = getSuffixSize(l);
1428
+ const prefixSize = getPrefixSize(l);
1429
+ const suffixSize = getSuffixSize(l);
1321
1430
 
1322
- if (index < prefixSize) {
1323
- return l.prefix[prefixSize - index - 1];
1324
- } else if (index >= l.length - suffixSize) {
1325
- return l.suffix[index - (l.length - suffixSize)];
1326
- }
1431
+ if (index < prefixSize) {
1432
+ return l.prefix[prefixSize - index - 1];
1433
+ } else if (index >= l.length - suffixSize) {
1434
+ return l.suffix[index - (l.length - suffixSize)];
1435
+ }
1327
1436
 
1328
- const {
1329
- offset
1330
- } = l;
1331
- const depth = getDepth(l);
1332
- return l.root.sizes === undefined ? nodeNthDense(l.root, depth, offset === 0 ? index - prefixSize : handleOffset(depth, offset, index - prefixSize)) : nodeNth(l.root, depth, offset, index - prefixSize);
1437
+ const {
1438
+ offset
1439
+ } = l;
1440
+ const depth = getDepth(l);
1441
+ return l.root.sizes === undefined ? nodeNthDense(l.root, depth, offset === 0 ? index - prefixSize : handleOffset(depth, offset, index - prefixSize)) : nodeNth(l.root, depth, offset, index - prefixSize);
1442
+ };
1333
1443
  }
1334
1444
  /**
1335
1445
  * Returns the first element of the Vector. If the Vector is empty the
@@ -1363,32 +1473,34 @@ function unsafeLast_1(l) {
1363
1473
  * If the index is out of bounds the given Vector is returned unchanged.
1364
1474
  *
1365
1475
  * @complexity O(log(n))
1366
- * @tsplus fluent fncts.Vector updateAt
1476
+ * @tsplus pipeable fncts.Vector updateAt
1367
1477
  */
1368
1478
 
1369
1479
 
1370
- function updateAt_1(as, i, a) {
1371
- if (i < 0 || as.length <= i) {
1372
- return as;
1373
- }
1480
+ function updateAt_1(i, a) {
1481
+ return as => {
1482
+ if (i < 0 || as.length <= i) {
1483
+ return as;
1484
+ }
1374
1485
 
1375
- const prefixSize = getPrefixSize(as);
1376
- const suffixSize = getSuffixSize(as);
1377
- const newVector = mutableClone_1(as);
1378
-
1379
- if (i < prefixSize) {
1380
- const newPrefix = copyArray(newVector.prefix);
1381
- newPrefix[newPrefix.length - i - 1] = a;
1382
- newVector.prefix = newPrefix;
1383
- } else if (i >= as.length - suffixSize) {
1384
- const newSuffix = copyArray(newVector.suffix);
1385
- newSuffix[i - (as.length - suffixSize)] = a;
1386
- newVector.suffix = newSuffix;
1387
- } else {
1388
- newVector.root = updateNode(as.root, getDepth(as), i - prefixSize, as.offset, a);
1389
- }
1486
+ const prefixSize = getPrefixSize(as);
1487
+ const suffixSize = getSuffixSize(as);
1488
+ const newVector = mutableClone_1(as);
1390
1489
 
1391
- return newVector;
1490
+ if (i < prefixSize) {
1491
+ const newPrefix = copyArray(newVector.prefix);
1492
+ newPrefix[newPrefix.length - i - 1] = a;
1493
+ newVector.prefix = newPrefix;
1494
+ } else if (i >= as.length - suffixSize) {
1495
+ const newSuffix = copyArray(newVector.suffix);
1496
+ newSuffix[i - (as.length - suffixSize)] = a;
1497
+ newVector.suffix = newSuffix;
1498
+ } else {
1499
+ newVector.root = updateNode(as.root, getDepth(as), i - prefixSize, as.offset, a);
1500
+ }
1501
+
1502
+ return newVector;
1503
+ };
1392
1504
  }
1393
1505
  /**
1394
1506
  * @tsplus static fncts.VectorOps __call
@@ -1399,7 +1511,7 @@ function vector_1(...elements) {
1399
1511
  const v = emptyPushable_1();
1400
1512
 
1401
1513
  for (const element of elements) {
1402
- tsplus_module_2.push(v, element);
1514
+ tsplus_module_2.push(element)(v);
1403
1515
  }
1404
1516
 
1405
1517
  return v;