@fncts/base 0.0.40 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (645) hide show
  1. package/_cjs/collection/AsyncIterable/api.cjs +384 -0
  2. package/_cjs/collection/AsyncIterable/api.cjs.map +1 -0
  3. package/_cjs/collection/AsyncIterable/definition.cjs +2 -0
  4. package/_cjs/collection/AsyncIterable/definition.cjs.map +1 -0
  5. package/_cjs/collection/{compat/Array.cjs → AsyncIterable.cjs} +3 -3
  6. package/_cjs/collection/AsyncIterable.cjs.map +1 -0
  7. package/_cjs/collection/Iterable/api/traverseConc.cjs +1 -2
  8. package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
  9. package/_cjs/collection/Iterable/api.cjs +180 -137
  10. package/_cjs/collection/Iterable/api.cjs.map +1 -1
  11. package/_cjs/collection/Iterable/constructors.cjs.map +1 -1
  12. package/_cjs/collection/compat/ArrayLike/api.cjs +1 -2
  13. package/_cjs/collection/compat/ArrayLike/api.cjs.map +1 -1
  14. package/_cjs/collection/immutable/Conc/api/makeBy.cjs +1 -2
  15. package/_cjs/collection/immutable/Conc/api/makeBy.cjs.map +1 -1
  16. package/_cjs/collection/immutable/Conc/api/replicate.cjs +1 -2
  17. package/_cjs/collection/immutable/Conc/api/replicate.cjs.map +1 -1
  18. package/_cjs/collection/immutable/Conc/api.cjs +1 -2
  19. package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
  20. package/_cjs/collection/immutable/Conc/constructors.cjs +3 -4
  21. package/_cjs/collection/immutable/Conc/constructors.cjs.map +1 -1
  22. package/_cjs/collection/immutable/Conc/definition.cjs +3 -3
  23. package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
  24. package/_cjs/collection/immutable/Dictionary/api.cjs +1 -2
  25. package/_cjs/collection/immutable/Dictionary/api.cjs.map +1 -1
  26. package/_cjs/collection/immutable/Dictionary/definition.cjs +1 -2
  27. package/_cjs/collection/immutable/Dictionary/definition.cjs.map +1 -1
  28. package/_cjs/collection/immutable/HashMap/api.cjs +1 -2
  29. package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
  30. package/_cjs/collection/immutable/HashMap/definition.cjs +1 -2
  31. package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
  32. package/_cjs/collection/immutable/HashMap/internal.cjs +1 -2
  33. package/_cjs/collection/immutable/HashMap/internal.cjs.map +1 -1
  34. package/_cjs/collection/immutable/HashSet/api.cjs +1 -2
  35. package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
  36. package/_cjs/collection/immutable/HashSet/definition.cjs +1 -2
  37. package/_cjs/collection/immutable/HashSet/definition.cjs.map +1 -1
  38. package/_cjs/collection/immutable/List/api/foldLeft.cjs +1 -2
  39. package/_cjs/collection/immutable/List/api/foldLeft.cjs.map +1 -1
  40. package/_cjs/collection/immutable/List/api/unsafeTail.cjs +1 -2
  41. package/_cjs/collection/immutable/List/api/unsafeTail.cjs.map +1 -1
  42. package/_cjs/collection/immutable/List/api.cjs +3 -4
  43. package/_cjs/collection/immutable/List/api.cjs.map +1 -1
  44. package/_cjs/collection/immutable/List/constructors.cjs +1 -2
  45. package/_cjs/collection/immutable/List/constructors.cjs.map +1 -1
  46. package/_cjs/collection/immutable/List/definition.cjs +1 -2
  47. package/_cjs/collection/immutable/List/definition.cjs.map +1 -1
  48. package/_cjs/collection/immutable/Queue/api.cjs +1 -2
  49. package/_cjs/collection/immutable/Queue/api.cjs.map +1 -1
  50. package/_cjs/collection/immutable/Queue/constructors.cjs +1 -2
  51. package/_cjs/collection/immutable/Queue/constructors.cjs.map +1 -1
  52. package/_cjs/collection/immutable/Queue/definition.cjs +1 -2
  53. package/_cjs/collection/immutable/Queue/definition.cjs.map +1 -1
  54. package/_cjs/collection/immutable/Queue/guards.cjs +1 -2
  55. package/_cjs/collection/immutable/Queue/guards.cjs.map +1 -1
  56. package/_cjs/collection/immutable/ReadonlyArray/api/chunksOf.cjs +18 -0
  57. package/_cjs/collection/immutable/ReadonlyArray/api/chunksOf.cjs.map +1 -0
  58. package/_cjs/collection/immutable/ReadonlyArray/api/splitAt.cjs +15 -0
  59. package/_cjs/collection/immutable/ReadonlyArray/api/splitAt.cjs.map +1 -0
  60. package/_cjs/collection/immutable/ReadonlyArray/api/splitWhere.cjs +26 -0
  61. package/_cjs/collection/immutable/ReadonlyArray/api/splitWhere.cjs.map +1 -0
  62. package/_cjs/collection/immutable/{ImmutableArray → ReadonlyArray}/api.cjs +562 -538
  63. package/_cjs/collection/immutable/ReadonlyArray/api.cjs.map +1 -0
  64. package/_cjs/collection/immutable/ReadonlyArray/constructors.cjs +55 -0
  65. package/_cjs/collection/immutable/ReadonlyArray/constructors.cjs.map +1 -0
  66. package/_cjs/collection/immutable/ReadonlyArray/definition.cjs.map +1 -0
  67. package/_cjs/collection/immutable/{ImmutableArray → ReadonlyArray}/instances.cjs +5 -7
  68. package/_cjs/collection/immutable/ReadonlyArray/instances.cjs.map +1 -0
  69. package/_cjs/collection/immutable/{ImmutableArray.cjs → ReadonlyArray.cjs} +8 -19
  70. package/_cjs/collection/immutable/ReadonlyArray.cjs.map +1 -0
  71. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/api.cjs +472 -0
  72. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/api.cjs.map +1 -0
  73. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/constructors.cjs +79 -0
  74. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/constructors.cjs.map +1 -0
  75. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/definition.cjs +2 -0
  76. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/definition.cjs.map +1 -0
  77. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/destructors.cjs +49 -0
  78. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/destructors.cjs.map +1 -0
  79. package/_cjs/collection/immutable/{ImmutableNonEmptyArray → ReadonlyNonEmptyArray}/instances.cjs +3 -4
  80. package/_cjs/collection/immutable/ReadonlyNonEmptyArray/instances.cjs.map +1 -0
  81. package/_cjs/collection/immutable/{ImmutableNonEmptyArray.cjs → ReadonlyNonEmptyArray.cjs} +6 -6
  82. package/_cjs/collection/immutable/ReadonlyNonEmptyArray.cjs.map +1 -0
  83. package/_cjs/collection/immutable/RoseTree/api.cjs +1 -2
  84. package/_cjs/collection/immutable/RoseTree/api.cjs.map +1 -1
  85. package/_cjs/collection/immutable/RoseTree/definition.cjs +1 -2
  86. package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -1
  87. package/_cjs/collection/immutable/SortedMap/api.cjs +1 -2
  88. package/_cjs/collection/immutable/SortedMap/api.cjs.map +1 -1
  89. package/_cjs/collection/immutable/SortedMap/iterator.cjs +1 -2
  90. package/_cjs/collection/immutable/SortedMap/iterator.cjs.map +1 -1
  91. package/_cjs/collection/immutable/Vector/api.cjs +229 -230
  92. package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
  93. package/_cjs/collection/immutable/Vector/definition.cjs +1 -2
  94. package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
  95. package/_cjs/collection/mutable/ArrayDeque.cjs +1 -2
  96. package/_cjs/collection/mutable/ArrayDeque.cjs.map +1 -1
  97. package/_cjs/collection/mutable/HashMap.cjs +1 -2
  98. package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
  99. package/_cjs/collection/mutable/HashSet.cjs +1 -2
  100. package/_cjs/collection/mutable/HashSet.cjs.map +1 -1
  101. package/_cjs/collection/mutable/ListBuffer.cjs +1 -2
  102. package/_cjs/collection/mutable/ListBuffer.cjs.map +1 -1
  103. package/_cjs/collection/weak/IterableWeakMap.cjs +1 -2
  104. package/_cjs/collection/weak/IterableWeakMap.cjs.map +1 -1
  105. package/_cjs/control/Eval/api.cjs +89 -41
  106. package/_cjs/control/Eval/api.cjs.map +1 -1
  107. package/_cjs/control/Eval/constructors.cjs +5 -1
  108. package/_cjs/control/Eval/constructors.cjs.map +1 -1
  109. package/_cjs/control/Eval/instance.cjs +1 -2
  110. package/_cjs/control/Eval/instance.cjs.map +1 -1
  111. package/_cjs/control/Eval/run.cjs +1 -2
  112. package/_cjs/control/Eval/run.cjs.map +1 -1
  113. package/_cjs/control/Pure/api.cjs +1 -2
  114. package/_cjs/control/Pure/api.cjs.map +1 -1
  115. package/_cjs/control/Pure/definition.cjs +1 -2
  116. package/_cjs/control/Pure/definition.cjs.map +1 -1
  117. package/_cjs/control/Pure/instances.cjs +1 -2
  118. package/_cjs/control/Pure/instances.cjs.map +1 -1
  119. package/_cjs/control/Pure/runtime.cjs +15 -10
  120. package/_cjs/control/Pure/runtime.cjs.map +1 -1
  121. package/_cjs/data/CaseClass.cjs +11 -14
  122. package/_cjs/data/CaseClass.cjs.map +1 -1
  123. package/_cjs/data/Cause/api/fold.cjs +33 -34
  124. package/_cjs/data/Cause/api/fold.cjs.map +1 -1
  125. package/_cjs/data/Cause/api/isEmpty.cjs +1 -2
  126. package/_cjs/data/Cause/api/isEmpty.cjs.map +1 -1
  127. package/_cjs/data/Cause/api/linearize.cjs +1 -2
  128. package/_cjs/data/Cause/api/linearize.cjs.map +1 -1
  129. package/_cjs/data/Cause/api/prettyPrint.cjs +1 -2
  130. package/_cjs/data/Cause/api/prettyPrint.cjs.map +1 -1
  131. package/_cjs/data/Cause/api/unified.cjs +1 -2
  132. package/_cjs/data/Cause/api/unified.cjs.map +1 -1
  133. package/_cjs/data/Cause/api.cjs +1 -2
  134. package/_cjs/data/Cause/api.cjs.map +1 -1
  135. package/_cjs/data/Cause/definition.cjs +1 -2
  136. package/_cjs/data/Cause/definition.cjs.map +1 -1
  137. package/_cjs/data/Const/api.cjs +7 -7
  138. package/_cjs/data/Const/api.cjs.map +1 -1
  139. package/_cjs/data/Const/instances.cjs +12 -13
  140. package/_cjs/data/Const/instances.cjs.map +1 -1
  141. package/_cjs/data/Data.cjs +1 -2
  142. package/_cjs/data/Data.cjs.map +1 -1
  143. package/_cjs/data/Datum/api.cjs +110 -113
  144. package/_cjs/data/Datum/api.cjs.map +1 -1
  145. package/_cjs/data/Datum/definition.cjs +1 -2
  146. package/_cjs/data/Datum/definition.cjs.map +1 -1
  147. package/_cjs/data/Datum/instances.cjs +1 -2
  148. package/_cjs/data/Datum/instances.cjs.map +1 -1
  149. package/_cjs/data/Datum.cjs +39 -0
  150. package/_cjs/data/Datum.cjs.map +1 -0
  151. package/_cjs/data/DatumEither/api.cjs +56 -57
  152. package/_cjs/data/DatumEither/api.cjs.map +1 -1
  153. package/_cjs/data/Duration/api.cjs +1 -2
  154. package/_cjs/data/Duration/api.cjs.map +1 -1
  155. package/_cjs/data/Duration/definition.cjs +1 -2
  156. package/_cjs/data/Duration/definition.cjs.map +1 -1
  157. package/_cjs/data/Either/api/align.cjs +1 -2
  158. package/_cjs/data/Either/api/align.cjs.map +1 -1
  159. package/_cjs/data/Either/api/alignWith.cjs +1 -2
  160. package/_cjs/data/Either/api/alignWith.cjs.map +1 -1
  161. package/_cjs/data/Either/api.cjs +53 -55
  162. package/_cjs/data/Either/api.cjs.map +1 -1
  163. package/_cjs/data/Either/constructors.cjs +21 -22
  164. package/_cjs/data/Either/constructors.cjs.map +1 -1
  165. package/_cjs/data/Either/definition.cjs +1 -2
  166. package/_cjs/data/Either/definition.cjs.map +1 -1
  167. package/_cjs/data/Either/instances.cjs +1 -2
  168. package/_cjs/data/Either/instances.cjs.map +1 -1
  169. package/_cjs/data/EitherT/api.cjs +28 -29
  170. package/_cjs/data/EitherT/api.cjs.map +1 -1
  171. package/_cjs/data/Environment/api.cjs +1 -2
  172. package/_cjs/data/Environment/api.cjs.map +1 -1
  173. package/_cjs/data/Environment/definition.cjs +1 -2
  174. package/_cjs/data/Environment/definition.cjs.map +1 -1
  175. package/_cjs/data/EnvironmentPatch.cjs +2 -3
  176. package/_cjs/data/EnvironmentPatch.cjs.map +1 -1
  177. package/_cjs/data/Eq/api.cjs +189 -5
  178. package/_cjs/data/Eq/api.cjs.map +1 -1
  179. package/_cjs/data/Eq/derivations.cjs +10 -21
  180. package/_cjs/data/Eq/derivations.cjs.map +1 -1
  181. package/_cjs/data/Equatable/api.cjs +1 -2
  182. package/_cjs/data/Equatable/api.cjs.map +1 -1
  183. package/_cjs/data/Equatable/definition.cjs +1 -2
  184. package/_cjs/data/Equatable/definition.cjs.map +1 -1
  185. package/_cjs/data/Exit/api.cjs +90 -80
  186. package/_cjs/data/Exit/api.cjs.map +1 -1
  187. package/_cjs/data/Exit/constructors.cjs +1 -2
  188. package/_cjs/data/Exit/constructors.cjs.map +1 -1
  189. package/_cjs/data/Exit/definition.cjs +1 -2
  190. package/_cjs/data/Exit/definition.cjs.map +1 -1
  191. package/_cjs/data/FiberId/api.cjs +1 -2
  192. package/_cjs/data/FiberId/api.cjs.map +1 -1
  193. package/_cjs/data/FiberId/definition.cjs +1 -2
  194. package/_cjs/data/FiberId/definition.cjs.map +1 -1
  195. package/_cjs/data/Guard/api.cjs +13 -17
  196. package/_cjs/data/Guard/api.cjs.map +1 -1
  197. package/_cjs/data/HashEq.cjs +1 -2
  198. package/_cjs/data/HashEq.cjs.map +1 -1
  199. package/_cjs/data/Hashable/definition.cjs +1 -2
  200. package/_cjs/data/Hashable/definition.cjs.map +1 -1
  201. package/_cjs/data/Hashable/hash.cjs +1 -2
  202. package/_cjs/data/Hashable/hash.cjs.map +1 -1
  203. package/_cjs/data/Identity/api.cjs +1 -2
  204. package/_cjs/data/Identity/api.cjs.map +1 -1
  205. package/_cjs/data/Identity/definition.cjs +1 -2
  206. package/_cjs/data/Identity/definition.cjs.map +1 -1
  207. package/_cjs/data/Identity/instances.cjs +1 -2
  208. package/_cjs/data/Identity/instances.cjs.map +1 -1
  209. package/_cjs/data/Interval.cjs +1 -2
  210. package/_cjs/data/Interval.cjs.map +1 -1
  211. package/_cjs/data/Intervals.cjs +1 -2
  212. package/_cjs/data/Intervals.cjs.map +1 -1
  213. package/_cjs/data/Maybe/api.cjs +73 -60
  214. package/_cjs/data/Maybe/api.cjs.map +1 -1
  215. package/_cjs/data/Maybe/constructors.cjs +37 -38
  216. package/_cjs/data/Maybe/constructors.cjs.map +1 -1
  217. package/_cjs/data/Maybe/definition.cjs +1 -2
  218. package/_cjs/data/Maybe/definition.cjs.map +1 -1
  219. package/_cjs/data/Maybe/instances.cjs +1 -2
  220. package/_cjs/data/Maybe/instances.cjs.map +1 -1
  221. package/_cjs/data/Newtype.cjs +1 -2
  222. package/_cjs/data/Newtype.cjs.map +1 -1
  223. package/_cjs/data/Ord/api.cjs +1 -2
  224. package/_cjs/data/Ord/api.cjs.map +1 -1
  225. package/_cjs/data/Ord/definition.cjs +1 -2
  226. package/_cjs/data/Ord/definition.cjs.map +1 -1
  227. package/_cjs/data/Ord/instances.cjs +1 -2
  228. package/_cjs/data/Ord/instances.cjs.map +1 -1
  229. package/_cjs/data/Showable/definition.cjs +1 -2
  230. package/_cjs/data/Showable/definition.cjs.map +1 -1
  231. package/_cjs/data/Showable/show.cjs +1 -2
  232. package/_cjs/data/Showable/show.cjs.map +1 -1
  233. package/_cjs/data/Showable/styles.cjs +1 -2
  234. package/_cjs/data/Showable/styles.cjs.map +1 -1
  235. package/_cjs/data/Showable/util.cjs +1 -2
  236. package/_cjs/data/Showable/util.cjs.map +1 -1
  237. package/_cjs/data/Struct/api.cjs +5 -7
  238. package/_cjs/data/Struct/api.cjs.map +1 -1
  239. package/_cjs/data/Struct/definition.cjs +1 -2
  240. package/_cjs/data/Struct/definition.cjs.map +1 -1
  241. package/_cjs/data/Tag/constructors.cjs +1 -2
  242. package/_cjs/data/Tag/constructors.cjs.map +1 -1
  243. package/_cjs/data/Tag/definition.cjs +1 -2
  244. package/_cjs/data/Tag/definition.cjs.map +1 -1
  245. package/_cjs/data/These/api.cjs +86 -87
  246. package/_cjs/data/These/api.cjs.map +1 -1
  247. package/_cjs/data/These/constructors.cjs +1 -2
  248. package/_cjs/data/These/constructors.cjs.map +1 -1
  249. package/_cjs/data/These/definition.cjs +1 -2
  250. package/_cjs/data/These/definition.cjs.map +1 -1
  251. package/_cjs/data/These/destructors.cjs +1 -2
  252. package/_cjs/data/These/destructors.cjs.map +1 -1
  253. package/_cjs/data/These/instances.cjs +1 -2
  254. package/_cjs/data/These/instances.cjs.map +1 -1
  255. package/_cjs/data/Trace/api.cjs +1 -2
  256. package/_cjs/data/Trace/api.cjs.map +1 -1
  257. package/_cjs/data/Trace/constructors.cjs +1 -2
  258. package/_cjs/data/Trace/constructors.cjs.map +1 -1
  259. package/_cjs/data/Zipped.cjs +1 -2
  260. package/_cjs/data/Zipped.cjs.map +1 -1
  261. package/_cjs/data/bigint/instances.cjs +1 -2
  262. package/_cjs/data/bigint/instances.cjs.map +1 -1
  263. package/_cjs/data/boolean/instances.cjs +1 -2
  264. package/_cjs/data/boolean/instances.cjs.map +1 -1
  265. package/_cjs/data/exceptions/IOError.cjs +1 -2
  266. package/_cjs/data/exceptions/IOError.cjs.map +1 -1
  267. package/_cjs/data/exceptions/InterruptedException.cjs +1 -2
  268. package/_cjs/data/exceptions/InterruptedException.cjs.map +1 -1
  269. package/_cjs/data/number/instances.cjs +1 -2
  270. package/_cjs/data/number/instances.cjs.map +1 -1
  271. package/_cjs/data/object/instances.cjs +1 -2
  272. package/_cjs/data/object/instances.cjs.map +1 -1
  273. package/_cjs/data/string/api.cjs +1 -2
  274. package/_cjs/data/string/api.cjs.map +1 -1
  275. package/_cjs/data/string/instances.cjs +1 -2
  276. package/_cjs/data/string/instances.cjs.map +1 -1
  277. package/_cjs/internal/Stack.cjs +7 -2
  278. package/_cjs/internal/Stack.cjs.map +1 -1
  279. package/_cjs/optics/At/api.cjs +1 -2
  280. package/_cjs/optics/At/api.cjs.map +1 -1
  281. package/_cjs/optics/At/definition.cjs +1 -2
  282. package/_cjs/optics/At/definition.cjs.map +1 -1
  283. package/_cjs/optics/Index/api.cjs +3 -4
  284. package/_cjs/optics/Index/api.cjs.map +1 -1
  285. package/_cjs/optics/Iso/api.cjs +1 -2
  286. package/_cjs/optics/Iso/api.cjs.map +1 -1
  287. package/_cjs/optics/Iso/definition.cjs +1 -2
  288. package/_cjs/optics/Iso/definition.cjs.map +1 -1
  289. package/_cjs/optics/Lens/api.cjs +2 -3
  290. package/_cjs/optics/Lens/api.cjs.map +1 -1
  291. package/_cjs/optics/Lens/definition.cjs +1 -2
  292. package/_cjs/optics/Lens/definition.cjs.map +1 -1
  293. package/_cjs/optics/Optional/api/compose.cjs +1 -2
  294. package/_cjs/optics/Optional/api/compose.cjs.map +1 -1
  295. package/_cjs/optics/Optional/api/focus.cjs +1 -2
  296. package/_cjs/optics/Optional/api/focus.cjs.map +1 -1
  297. package/_cjs/optics/Optional/api.cjs +1 -2
  298. package/_cjs/optics/Optional/api.cjs.map +1 -1
  299. package/_cjs/optics/Optional/definition.cjs +1 -2
  300. package/_cjs/optics/Optional/definition.cjs.map +1 -1
  301. package/_cjs/optics/Prism/api/compose.cjs +1 -2
  302. package/_cjs/optics/Prism/api/compose.cjs.map +1 -1
  303. package/_cjs/optics/Prism/api/focus.cjs +1 -2
  304. package/_cjs/optics/Prism/api/focus.cjs.map +1 -1
  305. package/_cjs/optics/Prism/api/fromNullable.cjs +1 -2
  306. package/_cjs/optics/Prism/api/fromNullable.cjs.map +1 -1
  307. package/_cjs/optics/Prism/api/just.cjs +1 -2
  308. package/_cjs/optics/Prism/api/just.cjs.map +1 -1
  309. package/_cjs/optics/Prism/definition.cjs +1 -2
  310. package/_cjs/optics/Prism/definition.cjs.map +1 -1
  311. package/_cjs/optics/Traversal/api/compose.cjs +1 -2
  312. package/_cjs/optics/Traversal/api/compose.cjs.map +1 -1
  313. package/_cjs/optics/Traversal/api/focus.cjs +1 -2
  314. package/_cjs/optics/Traversal/api/focus.cjs.map +1 -1
  315. package/_cjs/optics/Traversal/api/fromTraversable.cjs +1 -2
  316. package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
  317. package/_cjs/optics/Traversal/definition.cjs +1 -2
  318. package/_cjs/optics/Traversal/definition.cjs.map +1 -1
  319. package/_cjs/typeclass/ApplicativeExcept.cjs +1 -2
  320. package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
  321. package/_cjs/typeclass/Apply.cjs +1 -2
  322. package/_cjs/typeclass/Apply.cjs.map +1 -1
  323. package/_cjs/typeclass/Chain.cjs +1 -2
  324. package/_cjs/typeclass/Chain.cjs.map +1 -1
  325. package/_cjs/typeclass/MonadExcept.cjs +1 -2
  326. package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
  327. package/_cjs/typeclass/Monoid.cjs +1 -2
  328. package/_cjs/typeclass/Monoid.cjs.map +1 -1
  329. package/_cjs/typeclass/Semialign.cjs +1 -2
  330. package/_cjs/typeclass/Semialign.cjs.map +1 -1
  331. package/_cjs/typeclass/Semigroup/api.cjs +1 -2
  332. package/_cjs/typeclass/Semigroup/api.cjs.map +1 -1
  333. package/_cjs/typeclass/Semigroup/derivations.cjs +1 -2
  334. package/_cjs/typeclass/Semigroup/derivations.cjs.map +1 -1
  335. package/_cjs/typeclass/Witherable.cjs +1 -2
  336. package/_cjs/typeclass/Witherable.cjs.map +1 -1
  337. package/_cjs/typeclass/WitherableWithIndex.cjs +1 -2
  338. package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
  339. package/_cjs/util/AnsiFormat.cjs +1 -2
  340. package/_cjs/util/AnsiFormat.cjs.map +1 -1
  341. package/_cjs/util/assert.cjs +1 -1
  342. package/_cjs/util/assert.cjs.map +1 -1
  343. package/_cjs/util/pattern.cjs.map +1 -1
  344. package/_cjs/util/rand/generator/RandomGenerator.cjs.map +1 -1
  345. package/_mjs/collection/AsyncIterable/api.mjs +366 -0
  346. package/_mjs/collection/AsyncIterable/api.mjs.map +1 -0
  347. package/_mjs/collection/AsyncIterable/definition.mjs +2 -0
  348. package/_mjs/collection/AsyncIterable/definition.mjs.map +1 -0
  349. package/_mjs/collection/AsyncIterable.mjs +4 -0
  350. package/_mjs/collection/AsyncIterable.mjs.map +1 -0
  351. package/_mjs/collection/Iterable/api.mjs +175 -134
  352. package/_mjs/collection/Iterable/api.mjs.map +1 -1
  353. package/_mjs/collection/Iterable/constructors.mjs.map +1 -1
  354. package/_mjs/collection/immutable/Conc/constructors.mjs +2 -2
  355. package/_mjs/collection/immutable/Conc/constructors.mjs.map +1 -1
  356. package/_mjs/collection/immutable/Conc/definition.mjs +1 -1
  357. package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
  358. package/_mjs/collection/immutable/List/api.mjs +2 -2
  359. package/_mjs/collection/immutable/List/api.mjs.map +1 -1
  360. package/_mjs/collection/immutable/{ImmutableArray → ReadonlyArray}/api/chunksOf.mjs +3 -3
  361. package/_mjs/collection/immutable/ReadonlyArray/api/chunksOf.mjs.map +1 -0
  362. package/_mjs/collection/immutable/ReadonlyArray/api/splitAt.mjs +9 -0
  363. package/_mjs/collection/immutable/ReadonlyArray/api/splitAt.mjs.map +1 -0
  364. package/_mjs/collection/immutable/ReadonlyArray/api/splitWhere.mjs +19 -0
  365. package/_mjs/collection/immutable/ReadonlyArray/api/splitWhere.mjs.map +1 -0
  366. package/_mjs/collection/immutable/ReadonlyArray/api.mjs +1302 -0
  367. package/_mjs/collection/immutable/ReadonlyArray/api.mjs.map +1 -0
  368. package/_mjs/collection/immutable/ReadonlyArray/constructors.mjs +44 -0
  369. package/_mjs/collection/immutable/ReadonlyArray/constructors.mjs.map +1 -0
  370. package/_mjs/collection/immutable/ReadonlyArray/definition.mjs.map +1 -0
  371. package/_mjs/collection/immutable/{ImmutableArray → ReadonlyArray}/instances.mjs +4 -5
  372. package/_mjs/collection/immutable/ReadonlyArray/instances.mjs.map +1 -0
  373. package/_mjs/collection/immutable/ReadonlyArray.mjs +11 -0
  374. package/_mjs/collection/immutable/ReadonlyArray.mjs.map +1 -0
  375. package/_mjs/collection/immutable/ReadonlyNonEmptyArray/api.mjs +433 -0
  376. package/_mjs/collection/immutable/ReadonlyNonEmptyArray/api.mjs.map +1 -0
  377. package/_mjs/collection/immutable/{ImmutableNonEmptyArray → ReadonlyNonEmptyArray}/constructors.mjs +16 -15
  378. package/_mjs/collection/immutable/ReadonlyNonEmptyArray/constructors.mjs.map +1 -0
  379. package/_mjs/collection/immutable/ReadonlyNonEmptyArray/definition.mjs +2 -0
  380. package/_mjs/collection/immutable/ReadonlyNonEmptyArray/definition.mjs.map +1 -0
  381. package/_mjs/collection/immutable/ReadonlyNonEmptyArray/destructors.mjs +41 -0
  382. package/_mjs/collection/immutable/ReadonlyNonEmptyArray/destructors.mjs.map +1 -0
  383. package/_mjs/collection/immutable/{ImmutableNonEmptyArray → ReadonlyNonEmptyArray}/instances.mjs +2 -2
  384. package/_mjs/collection/immutable/ReadonlyNonEmptyArray/instances.mjs.map +1 -0
  385. package/_mjs/collection/immutable/ReadonlyNonEmptyArray.mjs +7 -0
  386. package/_mjs/collection/immutable/ReadonlyNonEmptyArray.mjs.map +1 -0
  387. package/_mjs/collection/immutable/Vector/api.mjs +224 -224
  388. package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
  389. package/_mjs/control/Eval/api.mjs +83 -15
  390. package/_mjs/control/Eval/api.mjs.map +1 -1
  391. package/_mjs/control/Eval/constructors.mjs +4 -0
  392. package/_mjs/control/Eval/constructors.mjs.map +1 -1
  393. package/_mjs/control/Pure/runtime.mjs +14 -8
  394. package/_mjs/control/Pure/runtime.mjs.map +1 -1
  395. package/_mjs/data/CaseClass.mjs +10 -12
  396. package/_mjs/data/CaseClass.mjs.map +1 -1
  397. package/_mjs/data/Cause/api/fold.mjs +32 -32
  398. package/_mjs/data/Cause/api/fold.mjs.map +1 -1
  399. package/_mjs/data/Const/api.mjs +7 -7
  400. package/_mjs/data/Const/api.mjs.map +1 -1
  401. package/_mjs/data/Const/instances.mjs +11 -11
  402. package/_mjs/data/Const/instances.mjs.map +1 -1
  403. package/_mjs/data/Datum/api.mjs +107 -108
  404. package/_mjs/data/Datum/api.mjs.map +1 -1
  405. package/_mjs/data/Datum.mjs +5 -0
  406. package/_mjs/data/Datum.mjs.map +1 -0
  407. package/_mjs/data/DatumEither/api.mjs +53 -53
  408. package/_mjs/data/DatumEither/api.mjs.map +1 -1
  409. package/_mjs/data/Either/api.mjs +42 -42
  410. package/_mjs/data/Either/api.mjs.map +1 -1
  411. package/_mjs/data/Either/constructors.mjs +20 -20
  412. package/_mjs/data/Either/constructors.mjs.map +1 -1
  413. package/_mjs/data/EitherT/api.mjs +27 -27
  414. package/_mjs/data/EitherT/api.mjs.map +1 -1
  415. package/_mjs/data/Environment/api.mjs.map +1 -1
  416. package/_mjs/data/EnvironmentPatch.mjs +1 -1
  417. package/_mjs/data/Eq/api.mjs +175 -3
  418. package/_mjs/data/Eq/api.mjs.map +1 -1
  419. package/_mjs/data/Eq/derivations.mjs +8 -19
  420. package/_mjs/data/Eq/derivations.mjs.map +1 -1
  421. package/_mjs/data/Exit/api.mjs +88 -78
  422. package/_mjs/data/Exit/api.mjs.map +1 -1
  423. package/_mjs/data/Guard/api.mjs +12 -15
  424. package/_mjs/data/Guard/api.mjs.map +1 -1
  425. package/_mjs/data/Maybe/api.mjs +71 -58
  426. package/_mjs/data/Maybe/api.mjs.map +1 -1
  427. package/_mjs/data/Maybe/constructors.mjs +36 -36
  428. package/_mjs/data/Maybe/constructors.mjs.map +1 -1
  429. package/_mjs/data/Struct/api.mjs +4 -5
  430. package/_mjs/data/Struct/api.mjs.map +1 -1
  431. package/_mjs/data/These/api.mjs +85 -85
  432. package/_mjs/data/These/api.mjs.map +1 -1
  433. package/_mjs/internal/Stack.mjs +7 -2
  434. package/_mjs/internal/Stack.mjs.map +1 -1
  435. package/_mjs/optics/Index/api.mjs +2 -2
  436. package/_mjs/optics/Index/api.mjs.map +1 -1
  437. package/_mjs/optics/Lens/api.mjs +1 -1
  438. package/_mjs/util/assert.mjs +1 -1
  439. package/_mjs/util/assert.mjs.map +1 -1
  440. package/_mjs/util/pattern.mjs.map +1 -1
  441. package/_mjs/util/rand/generator/RandomGenerator.mjs.map +1 -1
  442. package/_src/collection/AsyncIterable/api.ts +369 -0
  443. package/_src/collection/AsyncIterable/definition.ts +7 -0
  444. package/_src/collection/AsyncIterable.ts +4 -0
  445. package/_src/collection/Iterable/api.ts +215 -162
  446. package/_src/collection/Iterable/constructors.ts +0 -2
  447. package/_src/collection/compat/ArrayLike/definition.ts +2 -2
  448. package/_src/collection/compat.ts +0 -1
  449. package/_src/collection/immutable/Conc/constructors.ts +1 -2
  450. package/_src/collection/immutable/Conc/definition.ts +7 -6
  451. package/_src/collection/immutable/List/api.ts +2 -2
  452. package/_src/collection/immutable/ReadonlyArray/api/chunksOf.ts +8 -0
  453. package/_src/collection/immutable/ReadonlyArray/api/splitAt.ts +8 -0
  454. package/_src/collection/immutable/{ImmutableArray → ReadonlyArray}/api/splitWhere.ts +3 -3
  455. package/_src/collection/immutable/ReadonlyArray/api.ts +1536 -0
  456. package/_src/collection/immutable/ReadonlyArray/constructors.ts +47 -0
  457. package/_src/collection/{compat/Array → immutable/ReadonlyArray}/definition.ts +8 -0
  458. package/_src/collection/immutable/{ImmutableArray → ReadonlyArray}/instances.ts +22 -22
  459. package/_src/collection/immutable/ReadonlyArray.ts +12 -0
  460. package/_src/collection/immutable/ReadonlyNonEmptyArray/api.ts +481 -0
  461. package/_src/collection/immutable/ReadonlyNonEmptyArray/constructors.ts +76 -0
  462. package/_src/collection/immutable/ReadonlyNonEmptyArray/definition.ts +22 -0
  463. package/_src/collection/immutable/ReadonlyNonEmptyArray/destructors.ts +41 -0
  464. package/_src/collection/immutable/{ImmutableNonEmptyArray → ReadonlyNonEmptyArray}/instances.ts +13 -13
  465. package/_src/collection/immutable/ReadonlyNonEmptyArray.ts +7 -0
  466. package/_src/collection/immutable/Vector/api.ts +310 -309
  467. package/_src/collection/immutable.ts +11 -11
  468. package/_src/collection.ts +6 -5
  469. package/_src/control/Eval/api.ts +109 -16
  470. package/_src/control/Eval/constructors.ts +5 -0
  471. package/_src/control/Pure/runtime.ts +8 -2
  472. package/_src/data/CaseClass.ts +5 -5
  473. package/_src/data/Cause/api/fold.ts +2 -2
  474. package/_src/data/Const/api.ts +8 -8
  475. package/_src/data/Const/instances.ts +10 -10
  476. package/_src/data/Datum/api.ts +113 -113
  477. package/_src/data/Datum.ts +5 -0
  478. package/_src/data/DatumEither/api.ts +41 -43
  479. package/_src/data/Either/api.ts +47 -47
  480. package/_src/data/Either/constructors.ts +14 -16
  481. package/_src/data/EitherT/api.ts +111 -110
  482. package/_src/data/Environment/api.ts +6 -3
  483. package/_src/data/Eq/api.ts +193 -4
  484. package/_src/data/Eq/derivations.ts +12 -19
  485. package/_src/data/Exit/api.ts +89 -77
  486. package/_src/data/Guard/api.ts +11 -11
  487. package/_src/data/Maybe/api.ts +82 -73
  488. package/_src/data/Maybe/constructors.ts +34 -36
  489. package/_src/data/Struct/api.ts +1 -1
  490. package/_src/data/These/api.ts +93 -92
  491. package/_src/data.ts +1 -0
  492. package/_src/global.ts +7 -12
  493. package/_src/internal/Stack.ts +6 -2
  494. package/_src/optics/Index/api.ts +1 -1
  495. package/_src/util/assert.ts +2 -2
  496. package/_src/util/pattern.ts +8 -90
  497. package/_src/util/rand/generator/RandomGenerator.ts +1 -0
  498. package/collection/AsyncIterable/api.d.ts +71 -0
  499. package/collection/AsyncIterable/definition.d.ts +9 -0
  500. package/collection/AsyncIterable.d.ts +2 -0
  501. package/collection/Iterable/api.d.ts +40 -25
  502. package/collection/compat/ArrayLike/definition.d.ts +2 -2
  503. package/collection/compat.d.ts +0 -1
  504. package/collection/immutable/Conc/definition.d.ts +1 -1
  505. package/collection/immutable/ReadonlyArray/api/chunksOf.d.ts +5 -0
  506. package/collection/immutable/ReadonlyArray/api/splitAt.d.ts +5 -0
  507. package/collection/immutable/ReadonlyArray/api/splitWhere.d.ts +6 -0
  508. package/collection/immutable/ReadonlyArray/api.d.ts +614 -0
  509. package/collection/immutable/ReadonlyArray/constructors.d.ts +30 -0
  510. package/collection/{compat/Array → immutable/ReadonlyArray}/definition.d.ts +8 -0
  511. package/collection/immutable/ReadonlyArray/instances.d.ts +87 -0
  512. package/collection/immutable/ReadonlyArray.d.ts +7 -0
  513. package/collection/immutable/ReadonlyNonEmptyArray/api.d.ts +186 -0
  514. package/collection/immutable/ReadonlyNonEmptyArray/constructors.d.ts +45 -0
  515. package/collection/immutable/ReadonlyNonEmptyArray/definition.d.ts +21 -0
  516. package/collection/immutable/ReadonlyNonEmptyArray/destructors.d.ts +31 -0
  517. package/collection/immutable/ReadonlyNonEmptyArray/instances.d.ts +52 -0
  518. package/collection/immutable/ReadonlyNonEmptyArray.d.ts +5 -0
  519. package/collection/immutable/Vector/api.d.ts +93 -93
  520. package/collection/immutable.d.ts +2 -2
  521. package/collection.d.ts +1 -0
  522. package/control/Eval/api.d.ts +27 -5
  523. package/control/Eval/constructors.d.ts +5 -0
  524. package/data/CaseClass.d.ts +2 -3
  525. package/data/Const/api.d.ts +5 -5
  526. package/data/Const/instances.d.ts +4 -4
  527. package/data/Datum/api.d.ts +64 -64
  528. package/data/Datum.d.ts +3 -0
  529. package/data/DatumEither/api.d.ts +25 -25
  530. package/data/Either/api.d.ts +24 -24
  531. package/data/Either/constructors.d.ts +12 -12
  532. package/data/EitherT/api.d.ts +16 -16
  533. package/data/Environment/api.d.ts +4 -2
  534. package/data/Eq/api.d.ts +89 -2
  535. package/data/Eq/derivations.d.ts +7 -0
  536. package/data/Exit/api.d.ts +43 -37
  537. package/data/Guard/api.d.ts +7 -8
  538. package/data/Maybe/api.d.ts +38 -33
  539. package/data/Maybe/constructors.d.ts +16 -16
  540. package/data/These/api.d.ts +26 -26
  541. package/data.d.ts +1 -0
  542. package/global.d.ts +4 -8
  543. package/internal/Stack.d.ts +2 -0
  544. package/optics/Lens/api.d.ts +1 -1
  545. package/package.json +3 -3
  546. package/util/assert.d.ts +1 -1
  547. package/_cjs/collection/compat/Array/api.cjs +0 -142
  548. package/_cjs/collection/compat/Array/api.cjs.map +0 -1
  549. package/_cjs/collection/compat/Array/definition.cjs.map +0 -1
  550. package/_cjs/collection/compat/Array.cjs.map +0 -1
  551. package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs +0 -19
  552. package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs.map +0 -1
  553. package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs +0 -18
  554. package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs.map +0 -1
  555. package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs +0 -18
  556. package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs.map +0 -1
  557. package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs +0 -28
  558. package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs.map +0 -1
  559. package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +0 -1
  560. package/_cjs/collection/immutable/ImmutableArray/constructors.cjs +0 -59
  561. package/_cjs/collection/immutable/ImmutableArray/constructors.cjs.map +0 -1
  562. package/_cjs/collection/immutable/ImmutableArray/definition.cjs +0 -44
  563. package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +0 -1
  564. package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +0 -1
  565. package/_cjs/collection/immutable/ImmutableArray.cjs.map +0 -1
  566. package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +0 -474
  567. package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +0 -1
  568. package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs +0 -79
  569. package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs.map +0 -1
  570. package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs +0 -36
  571. package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +0 -1
  572. package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs +0 -53
  573. package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs.map +0 -1
  574. package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +0 -1
  575. package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs.map +0 -1
  576. package/_cjs/control/Eval/api/sequenceArray.cjs +0 -17
  577. package/_cjs/control/Eval/api/sequenceArray.cjs.map +0 -1
  578. package/_mjs/collection/compat/Array/api.mjs +0 -125
  579. package/_mjs/collection/compat/Array/api.mjs.map +0 -1
  580. package/_mjs/collection/compat/Array/definition.mjs.map +0 -1
  581. package/_mjs/collection/compat/Array.mjs +0 -4
  582. package/_mjs/collection/compat/Array.mjs.map +0 -1
  583. package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs.map +0 -1
  584. package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs +0 -10
  585. package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs.map +0 -1
  586. package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs +0 -10
  587. package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs.map +0 -1
  588. package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs +0 -20
  589. package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs.map +0 -1
  590. package/_mjs/collection/immutable/ImmutableArray/api.mjs +0 -1284
  591. package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +0 -1
  592. package/_mjs/collection/immutable/ImmutableArray/constructors.mjs +0 -46
  593. package/_mjs/collection/immutable/ImmutableArray/constructors.mjs.map +0 -1
  594. package/_mjs/collection/immutable/ImmutableArray/definition.mjs +0 -35
  595. package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +0 -1
  596. package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +0 -1
  597. package/_mjs/collection/immutable/ImmutableArray.mjs +0 -12
  598. package/_mjs/collection/immutable/ImmutableArray.mjs.map +0 -1
  599. package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +0 -437
  600. package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +0 -1
  601. package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs.map +0 -1
  602. package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +0 -25
  603. package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +0 -1
  604. package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs +0 -43
  605. package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs.map +0 -1
  606. package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +0 -1
  607. package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs +0 -7
  608. package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs.map +0 -1
  609. package/_mjs/control/Eval/api/sequenceArray.mjs +0 -9
  610. package/_mjs/control/Eval/api/sequenceArray.mjs.map +0 -1
  611. package/_src/collection/compat/Array/api.ts +0 -134
  612. package/_src/collection/compat/Array.ts +0 -4
  613. package/_src/collection/immutable/ImmutableArray/api/chunksOf.ts +0 -8
  614. package/_src/collection/immutable/ImmutableArray/api/slice.ts +0 -8
  615. package/_src/collection/immutable/ImmutableArray/api/splitAt.ts +0 -8
  616. package/_src/collection/immutable/ImmutableArray/api.ts +0 -1526
  617. package/_src/collection/immutable/ImmutableArray/constructors.ts +0 -47
  618. package/_src/collection/immutable/ImmutableArray/definition.ts +0 -48
  619. package/_src/collection/immutable/ImmutableArray.ts +0 -13
  620. package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +0 -483
  621. package/_src/collection/immutable/ImmutableNonEmptyArray/constructors.ts +0 -83
  622. package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +0 -47
  623. package/_src/collection/immutable/ImmutableNonEmptyArray/destructors.ts +0 -41
  624. package/_src/collection/immutable/ImmutableNonEmptyArray.ts +0 -7
  625. package/_src/control/Eval/api/sequenceArray.ts +0 -6
  626. package/collection/compat/Array/api.d.ts +0 -62
  627. package/collection/compat/Array.d.ts +0 -2
  628. package/collection/immutable/ImmutableArray/api/chunksOf.d.ts +0 -6
  629. package/collection/immutable/ImmutableArray/api/slice.d.ts +0 -6
  630. package/collection/immutable/ImmutableArray/api/splitAt.d.ts +0 -6
  631. package/collection/immutable/ImmutableArray/api/splitWhere.d.ts +0 -7
  632. package/collection/immutable/ImmutableArray/api.d.ts +0 -602
  633. package/collection/immutable/ImmutableArray/constructors.d.ts +0 -32
  634. package/collection/immutable/ImmutableArray/definition.d.ts +0 -34
  635. package/collection/immutable/ImmutableArray/instances.d.ts +0 -87
  636. package/collection/immutable/ImmutableArray.d.ts +0 -8
  637. package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +0 -186
  638. package/collection/immutable/ImmutableNonEmptyArray/constructors.d.ts +0 -46
  639. package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +0 -40
  640. package/collection/immutable/ImmutableNonEmptyArray/destructors.d.ts +0 -32
  641. package/collection/immutable/ImmutableNonEmptyArray/instances.d.ts +0 -52
  642. package/collection/immutable/ImmutableNonEmptyArray.d.ts +0 -5
  643. package/control/Eval/api/sequenceArray.d.ts +0 -6
  644. /package/_cjs/collection/{compat/Array → immutable/ReadonlyArray}/definition.cjs +0 -0
  645. /package/_mjs/collection/{compat/Array → immutable/ReadonlyArray}/definition.mjs +0 -0
@@ -3,11 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports._traverseWithIndex = exports._traverse = void 0;
7
- exports._wilt = _wilt;
8
- exports._wiltWithIndex = void 0;
9
- exports._wither = _wither;
10
- exports._witherWithIndex = void 0;
11
6
  exports.align = align;
12
7
  exports.alignWith = void 0;
13
8
  exports.alt = alt;
@@ -18,7 +13,7 @@ exports.chainRecDepthFirst = chainRecDepthFirst;
18
13
  exports.chop = void 0;
19
14
  exports.collectWhile = collectWhile;
20
15
  exports.comprehension = comprehension;
21
- exports.concat = void 0;
16
+ exports.concat = concat;
22
17
  exports.cross = cross;
23
18
  exports.crossWith = void 0;
24
19
  exports.deleteAt = deleteAt;
@@ -29,8 +24,10 @@ exports.dropLastWhile = dropLastWhile;
29
24
  exports.dropWhile = dropWhile;
30
25
  exports.elem = void 0;
31
26
  exports.every = every;
32
- exports.filter = exports.everyWithIndex = void 0;
27
+ exports.everyWithIndex = void 0;
28
+ exports.filter = filter;
33
29
  exports.filterMap = filterMap;
30
+ exports.filterMapUndefined = filterMapUndefined;
34
31
  exports.filterWithIndex = exports.filterMapWithIndex = void 0;
35
32
  exports.find = find;
36
33
  exports.findIndex = findIndex;
@@ -39,14 +36,19 @@ exports.findLastIndex = findLastIndex;
39
36
  exports.findLastMap = findLastMap;
40
37
  exports.findLastMapWithIndex = void 0;
41
38
  exports.findMap = findMap;
42
- exports.foldLeft = exports.fold = exports.flatten = exports.flatMapWithIndex = exports.flatMap = exports.findWithIndex = exports.findMapWithIndex = void 0;
39
+ exports.findWithIndex = exports.findMapWithIndex = void 0;
40
+ exports.flatMap = flatMap;
41
+ exports.foldLeft = exports.fold = exports.flatten = exports.flatMapWithIndex = void 0;
43
42
  exports.foldLeftWhile = foldLeftWhile;
44
43
  exports.foldLeftWithIndexWhile = exports.foldLeftWithIndex = void 0;
45
44
  exports.foldMap = foldMap;
46
45
  exports.foldMapWithIndex = void 0;
47
46
  exports.foldRight = foldRight;
48
47
  exports.foldRightWhile = foldRightWhile;
49
- exports.get = exports.forEach = exports.foldRightWithIndexWhile = exports.foldRightWithIndex = void 0;
48
+ exports.foldRightWithIndexWhile = exports.foldRightWithIndex = void 0;
49
+ exports.forEach = forEach;
50
+ exports.fromValue = fromValue;
51
+ exports.get = void 0;
50
52
  exports.group = group;
51
53
  exports.groupBy = groupBy;
52
54
  exports.head = head;
@@ -54,11 +56,12 @@ exports.init = init;
54
56
  exports.insertAt = insertAt;
55
57
  exports.intersection = intersection;
56
58
  exports.intersperse = intersperse;
57
- exports.isOutOfBound = exports.isEmpty = void 0;
59
+ exports.isOutOfBound = exports.isNonEmpty = exports.isEmpty = void 0;
58
60
  exports.join = join;
59
61
  exports.last = last;
60
62
  exports.lefts = lefts;
61
- exports.map = exports.length = void 0;
63
+ exports.length = length;
64
+ exports.map = map;
62
65
  exports.mapAccum = mapAccum;
63
66
  exports.mapWithIndex = void 0;
64
67
  exports.modifyAt = modifyAt;
@@ -81,95 +84,97 @@ exports.tail = tail;
81
84
  exports.take = take;
82
85
  exports.takeLast = takeLast;
83
86
  exports.takeWhile = takeWhile;
84
- exports.traverseWithIndex = exports.traverse = void 0;
87
+ exports.traverse_ = exports.traverseWithIndex_ = exports.traverseWithIndex = exports.traverse = void 0;
85
88
  exports.union = union;
86
89
  exports.uniq = uniq;
87
90
  exports.unprepend = unprepend;
88
- exports.unsafeUpdateAt = exports.unsafeModifyAt = exports.unsafeInsertAt = exports.unsafeGet = exports.unsafeDeleteAt = exports.unsafeAsMutable = void 0;
91
+ exports.unsafeAsMutable = unsafeAsMutable;
92
+ exports.unsafeUpdateAt = exports.unsafeModifyAt = exports.unsafeInsertAt = exports.unsafeDeleteAt = void 0;
89
93
  exports.unzip = unzip;
90
94
  exports.updateAt = updateAt;
91
- exports.witherWithIndex = exports.wither = exports.wiltWithIndex = exports.wilt = void 0;
95
+ exports.wiltWithIndex_ = exports.wiltWithIndex = exports.wilt = void 0;
96
+ exports.wilt_ = wilt_;
97
+ exports.witherWithIndex_ = exports.witherWithIndex = exports.wither = void 0;
98
+ exports.wither_ = wither_;
92
99
  exports.zip = zip;
93
100
  exports.zipWith = void 0;
94
101
  var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/These/constructors"));
95
- var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/ImmutableArray/constructors"));
96
- var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Zipped"));
97
- var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/ImmutableArray/api/slice"));
98
- var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/ImmutableNonEmptyArray/definition"));
99
- var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
100
- var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/control/Eval/constructors"));
101
- var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/control/Eval/instance"));
102
- var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/control/Eval/api"));
103
- var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/control/Eval/run"));
104
- var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
105
- var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/ImmutableNonEmptyArray/constructors"));
106
- var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Dictionary/definition"));
107
- var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Dictionary/api"));
108
- var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/instances"));
109
- var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Either/destructors"));
102
+ var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
103
+ var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/control/Eval/run"));
104
+ var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/control/Eval/constructors"));
105
+ var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/control/Eval/instance"));
106
+ var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/control/Eval/api"));
107
+ var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Zipped"));
108
+ var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
109
+ var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/ReadonlyNonEmptyArray/constructors"));
110
+ var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Dictionary/definition"));
111
+ var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Dictionary/api"));
112
+ var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/instances"));
113
+ var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/ReadonlyArray/constructors"));
114
+ var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Either/destructors"));
110
115
  var _function = /*#__PURE__*/require("@fncts/base/data/function");
111
116
  var P = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/typeclass"));
112
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
113
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
114
- const fileName_1 = "(@fncts/base) src/collection/immutable/ImmutableArray/api.ts";
117
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
118
+ const fileName_1 = "(@fncts/base) src/collection/immutable/ReadonlyArray/api.ts";
115
119
  const alignWith = exports.alignWith = alignWith_1;
116
120
  const append = exports.append = append_1;
117
- const crossWith = exports.crossWith = crossWith_1;
118
- const flatMapWithIndex = exports.flatMapWithIndex = flatMapWithIndex_1;
119
- const flatMap = exports.flatMap = flatMap_1;
120
- const flatten = exports.flatten = flatten_1;
121
121
  const chop = exports.chop = chop_1;
122
- const concat = exports.concat = concat_1;
122
+ const crossWith = exports.crossWith = crossWith_1;
123
123
  const elem = exports.elem = elem_1;
124
124
  const everyWithIndex = exports.everyWithIndex = everyWithIndex_1;
125
- const filter = exports.filter = filter_1;
126
- const filterWithIndex = exports.filterWithIndex = filterWithIndex_1;
127
125
  const filterMapWithIndex = exports.filterMapWithIndex = filterMapWithIndex_1;
128
- const findWithIndex = exports.findWithIndex = findWithIndex_1;
129
- const findMapWithIndex = exports.findMapWithIndex = findMapWithIndex_1;
126
+ const filterWithIndex = exports.filterWithIndex = filterWithIndex_1;
130
127
  const findLastMapWithIndex = exports.findLastMapWithIndex = findLastMapWithIndex_1;
131
- const foldLeftWithIndex = exports.foldLeftWithIndex = foldLeftWithIndex_1;
128
+ const findMapWithIndex = exports.findMapWithIndex = findMapWithIndex_1;
129
+ const findWithIndex = exports.findWithIndex = findWithIndex_1;
130
+ const flatMapWithIndex = exports.flatMapWithIndex = flatMapWithIndex_1;
131
+ const flatten = exports.flatten = flatten_1;
132
+ const fold = exports.fold = fold_1;
132
133
  const foldLeft = exports.foldLeft = foldLeft_1;
134
+ const foldLeftWithIndex = exports.foldLeftWithIndex = foldLeftWithIndex_1;
133
135
  const foldLeftWithIndexWhile = exports.foldLeftWithIndexWhile = foldLeftWithIndexWhile_1;
134
- const fold = exports.fold = fold_1;
135
136
  const foldMapWithIndex = exports.foldMapWithIndex = foldMapWithIndex_1;
136
137
  const foldRightWithIndex = exports.foldRightWithIndex = foldRightWithIndex_1;
137
138
  const foldRightWithIndexWhile = exports.foldRightWithIndexWhile = foldRightWithIndexWhile_1;
138
- const forEach = exports.forEach = forEach_1;
139
139
  const get = exports.get = get_1;
140
140
  const isEmpty = exports.isEmpty = isEmpty_1;
141
+ const isNonEmpty = exports.isNonEmpty = isNonEmpty_1;
141
142
  const isOutOfBound = exports.isOutOfBound = isOutOfBound_1;
142
- const length = exports.length = length_1;
143
- const map = exports.map = map_1;
144
143
  const mapWithIndex = exports.mapWithIndex = mapWithIndex_1;
145
- const mutate = exports.mutate = mutate_1;
146
144
  const mutableClone = exports.mutableClone = mutableClone_1;
147
- const partitionWithIndex = exports.partitionWithIndex = partitionWithIndex_1;
145
+ const mutate = exports.mutate = mutate_1;
148
146
  const partitionMapWithIndex = exports.partitionMapWithIndex = partitionMapWithIndex_1;
147
+ const partitionWithIndex = exports.partitionWithIndex = partitionWithIndex_1;
149
148
  const prepend = exports.prepend = prepend_1;
150
149
  const prependAll = exports.prependAll = prependAll_1;
151
150
  const rotate = exports.rotate = rotate_1;
152
151
  const sort = exports.sort = sort_1;
153
152
  const spanIndexLeft = exports.spanIndexLeft = spanIndexLeft_1;
154
153
  const spanIndexRight = exports.spanIndexRight = spanIndexRight_1;
155
- const _traverseWithIndex = exports._traverseWithIndex = _traverseWithIndex_1;
156
- const _traverse = exports._traverse = _traverse_1;
157
- const unsafeGet = exports.unsafeGet = unsafeGet_1;
158
- const unsafeAsMutable = exports.unsafeAsMutable = unsafeAsMutable_1;
154
+ const traverse_ = exports.traverse_ = traverse_1;
155
+ const traverseWithIndex_ = exports.traverseWithIndex_ = traverseWithIndex_1;
159
156
  const unsafeDeleteAt = exports.unsafeDeleteAt = unsafeDeleteAt_1;
160
157
  const unsafeInsertAt = exports.unsafeInsertAt = unsafeInsertAt_1;
161
158
  const unsafeModifyAt = exports.unsafeModifyAt = unsafeModifyAt_1;
162
159
  const unsafeUpdateAt = exports.unsafeUpdateAt = unsafeUpdateAt_1;
163
- const _wiltWithIndex = exports._wiltWithIndex = _wiltWithIndex_1;
164
- const _witherWithIndex = exports._witherWithIndex = _witherWithIndex_1;
160
+ const wiltWithIndex_ = exports.wiltWithIndex_ = wiltWithIndex_1;
161
+ const witherWithIndex_ = exports.witherWithIndex_ = witherWithIndex_1;
165
162
  const zipWith = exports.zipWith = zipWith_1;
166
163
  /**
167
- * @tsplus pipeable fncts.ImmutableArray alignWith
164
+ * @tsplus pipeable fncts.ReadonlyArray align
165
+ */
166
+ function align(fb) {
167
+ return self => {
168
+ return alignWith_1(fb, _function.identity)(self);
169
+ };
170
+ }
171
+ /**
172
+ * @tsplus pipeable fncts.ReadonlyArray alignWith
168
173
  */
169
174
  function alignWith_1(fb, f) {
170
175
  return self => {
171
- const selfArray = self._array;
172
- const thatArray = fb._array;
176
+ const selfArray = self;
177
+ const thatArray = fb;
173
178
  const minlen = Math.min(selfArray.length, thatArray.length);
174
179
  const maxlen = Math.max(selfArray.length, thatArray.length);
175
180
  const ret = Array(maxlen);
@@ -177,7 +182,7 @@ function alignWith_1(fb, f) {
177
182
  ret[i] = f(tsplus_module_1.both(selfArray[i], thatArray[i]));
178
183
  }
179
184
  if (minlen === maxlen) {
180
- return tsplus_module_2.asImmutableArray(ret);
185
+ return ret;
181
186
  } else if (selfArray.length > thatArray.length) {
182
187
  for (let i = minlen; i < maxlen; i++) {
183
188
  ret[i] = f(tsplus_module_1.left(selfArray[i]));
@@ -187,83 +192,42 @@ function alignWith_1(fb, f) {
187
192
  ret[i] = f(tsplus_module_1.right(thatArray[i]));
188
193
  }
189
194
  }
190
- return tsplus_module_2.asImmutableArray(ret);
191
- };
192
- }
193
- /**
194
- * @tsplus pipeable fncts.ImmutableArray align
195
- */
196
- function align(fb) {
197
- return self => {
198
- return alignWith_1(fb, _function.identity)(self);
195
+ return ret;
199
196
  };
200
197
  }
201
198
  /**
202
- * @tsplus pipeable fncts.ImmutableArray alt
199
+ * @tsplus pipeable fncts.ReadonlyArray alt
203
200
  */
204
201
  function alt(that) {
205
202
  return self => {
206
- return concat_1(that())(self);
203
+ return self.concat(that());
207
204
  };
208
205
  }
209
206
  /**
210
- * @tsplus pipeable fncts.ImmutableArray ap
207
+ * @tsplus pipeable fncts.ReadonlyArray ap
211
208
  */
212
209
  function ap(fa) {
213
210
  return self => {
214
- return flatMap_1(f => map_1(f)(fa))(self);
211
+ return self.flatMap(f => fa.map(f));
215
212
  };
216
213
  }
217
214
  /**
218
- * @tsplus pipeable fncts.ImmutableArray append
215
+ * @tsplus pipeable fncts.ReadonlyArray append
219
216
  */
220
217
  function append_1(last) {
221
218
  return self => {
222
- const selfArray = self._array;
219
+ const selfArray = self;
223
220
  const len = selfArray.length;
224
221
  const r = Array(len + 1);
225
222
  r[len] = last;
226
223
  for (let i = 0; i < len; i++) {
227
224
  r[i] = selfArray[i];
228
225
  }
229
- return tsplus_module_2.asImmutableArray(r);
230
- };
231
- }
232
- /**
233
- * @tsplus pipeable fncts.ImmutableArray crossWith
234
- */
235
- function crossWith_1(fb, f) {
236
- return self => {
237
- return flatMap_1(a => map_1(b => f(a, b))(fb))(self);
238
- };
239
- }
240
- /**
241
- * @tsplus pipeable fncts.ImmutableArray cross
242
- */
243
- function cross(fb) {
244
- return self => {
245
- return crossWith_1(fb, (a, b) => tsplus_module_3.make(a, b))(self);
226
+ return r;
246
227
  };
247
228
  }
248
229
  /**
249
- * @tsplus static fncts.ImmutableArrayOps chainRecDepthFirst
250
- */
251
- function chainRecDepthFirst(a, f) {
252
- const buffer = unsafeAsMutable_1(tsplus_module_4.slice()(f(a)));
253
- const out = [];
254
- while (buffer.length > 0) {
255
- const e = buffer.shift();
256
- void 0;
257
- if (e._tag === "Left" /* EitherTag.Left */) {
258
- buffer.unshift(...f(e.left));
259
- } else {
260
- out.push(e.right);
261
- }
262
- }
263
- return tsplus_module_2.asImmutableArray(out);
264
- }
265
- /**
266
- * @tsplus static fncts.ImmutableArrayOps chainRecBreadthFirst
230
+ * @tsplus static fncts.ReadonlyArrayOps chainRecBreadthFirst
267
231
  */
268
232
  function chainRecBreadthFirst(a, f) {
269
233
  const initial = f(a);
@@ -272,7 +236,7 @@ function chainRecBreadthFirst(a, f) {
272
236
  function go(e) {
273
237
  void 0;
274
238
  if (e._tag === "Left") {
275
- forEach_1(v => buffer.push(v))(f(e.left));
239
+ f(e.left).forEach(v => buffer.push(v));
276
240
  } else {
277
241
  out.push(e.right);
278
242
  }
@@ -283,181 +247,173 @@ function chainRecBreadthFirst(a, f) {
283
247
  while (buffer.length > 0) {
284
248
  go(buffer.shift());
285
249
  }
286
- return tsplus_module_2.asImmutableArray(out);
250
+ return out;
287
251
  }
288
252
  /**
289
- * @tsplus pipeable fncts.ImmutableArray flatMapWithIndex
253
+ * @tsplus static fncts.ReadonlyArrayOps chainRecDepthFirst
290
254
  */
291
- function flatMapWithIndex_1(f) {
292
- return self => {
293
- let outLen = 0;
294
- const selfArray = self._array;
295
- const len = selfArray.length;
296
- const temp = Array(len);
297
- for (let i = 0; i < len; i++) {
298
- const e = selfArray[i];
299
- const arr = f(i, e)._array;
300
- outLen += arr.length;
301
- temp[i] = arr;
302
- }
303
- const out = Array(outLen);
304
- let start = 0;
305
- for (let i = 0; i < len; i++) {
306
- const arr = temp[i];
307
- const l = arr.length;
308
- for (let j = 0; j < l; j++) {
309
- out[j + start] = arr[j];
310
- }
311
- start += l;
255
+ function chainRecDepthFirst(a, f) {
256
+ const buffer = f(a).slice();
257
+ const out = [];
258
+ while (buffer.length > 0) {
259
+ const e = buffer.shift();
260
+ void 0;
261
+ if (e._tag === "Left" /* EitherTag.Left */) {
262
+ buffer.unshift(...f(e.left));
263
+ } else {
264
+ out.push(e.right);
312
265
  }
313
- return tsplus_module_2.asImmutableArray(out);
314
- };
315
- }
316
- /**
317
- * @tsplus pipeable fncts.ImmutableArray flatMap
318
- */
319
- function flatMap_1(f) {
320
- return self => {
321
- return flatMapWithIndex_1((_, a) => f(a))(self);
322
- };
323
- }
324
- /**
325
- * @tsplus getter fncts.ImmutableArray flatten
326
- */
327
- function flatten_1(self) {
328
- return flatMap_1(_function.identity)(self);
266
+ }
267
+ return out;
329
268
  }
330
269
  /**
331
270
  * A useful recursion pattern for processing a `Array` to produce a new `Array`,
332
271
  * often used for "chopping" up the input `Array`. Typically chop is called with some function
333
272
  * that will consume an initial prefix of the `Array` and produce a value and the rest of the `Array`.
334
273
  *
335
- * @tsplus pipeable fncts.ImmutableArray chop
274
+ * @tsplus pipeable fncts.ReadonlyArray chop
336
275
  */
337
276
  function chop_1(f) {
338
277
  return as => {
339
278
  const result = [];
340
279
  let cs = as;
341
- while (tsplus_module_5.isNonEmpty(cs)) {
280
+ while (isNonEmpty_1(cs)) {
342
281
  const [b, c] = f(cs);
343
282
  result.push(b);
344
283
  cs = c;
345
284
  }
346
- return tsplus_module_2.asImmutableArray(result);
285
+ return result;
347
286
  };
348
287
  }
349
288
  /**
350
- * @tsplus pipeable fncts.ImmutableArray collectWhile
289
+ * @tsplus pipeable fncts.ReadonlyArray collectWhile
351
290
  */
352
291
  function collectWhile(f) {
353
292
  return as => {
354
293
  const result = [];
355
- for (let i = 0; i < length_1(as); i++) {
356
- const o = f(as._array[i]);
357
- if (tsplus_module_6.isJust(o)) {
294
+ for (let i = 0; i < as.length; i++) {
295
+ const o = f(as[i]);
296
+ if (tsplus_module_2.isJust(o)) {
358
297
  result.push(o.value);
359
298
  } else {
360
299
  break;
361
300
  }
362
301
  }
363
- return tsplus_module_2.asImmutableArray(result);
302
+ return result;
364
303
  };
365
304
  }
305
+ function comprehension(input, f, g = () => true) {
306
+ return tsplus_module_3.run(comprehensionLoop([], input, f, g));
307
+ }
366
308
  function comprehensionLoop(scope, input, f, g) {
367
309
  if (input.length === 0) {
368
- return g(...scope) ? tsplus_module_7.now(tsplus_module_2.make(f(...scope))) : tsplus_module_7.now(tsplus_module_2.empty());
310
+ return g(...scope) ? tsplus_module_4.now([f(...scope)]) : tsplus_module_4.now([]);
369
311
  } else {
370
- return tsplus_module_9.map(rs => flatten_1(rs))(_traverse_1(input[0])(tsplus_module_8.Applicative)(a => comprehensionLoop(append_1(a)(scope), input.slice(1), f, g)));
312
+ return tsplus_module_6.map(rs => flatten_1(rs))(traverse_1(input[0])(tsplus_module_5.Applicative)(a => comprehensionLoop(append_1(a)(scope), input.slice(1), f, g)));
371
313
  }
372
314
  }
373
- function comprehension(input, f, g = () => true) {
374
- return tsplus_module_10.run(comprehensionLoop(tsplus_module_2.empty(), input, f, g));
375
- }
376
315
  /**
377
- * @tsplus pipeable fncts.ImmutableArray concat
378
- * @tsplus pipeable-operator fncts.ImmutableArray +
316
+ * @tsplus pipeable fncts.ReadonlyArray concat
317
+ * @tsplus pipeable-operator fncts.ReadonlyArray +
379
318
  */
380
- function concat_1(that) {
319
+ function concat(that) {
381
320
  return self => {
382
- const lenx = self._array.length;
321
+ const lenx = self.length;
383
322
  if (lenx === 0) {
384
323
  return that;
385
324
  }
386
- const leny = that._array.length;
325
+ const leny = that.length;
387
326
  if (leny === 0) {
388
327
  return self;
389
328
  }
390
329
  const r = Array(lenx + leny);
391
330
  for (let i = 0; i < lenx; i++) {
392
- r[i] = self._array[i];
331
+ r[i] = self[i];
393
332
  }
394
333
  for (let i = 0; i < leny; i++) {
395
- r[i + lenx] = that._array[i];
334
+ r[i + lenx] = that[i];
396
335
  }
397
- return tsplus_module_2.asImmutableArray(r);
336
+ return r;
398
337
  };
399
338
  }
400
339
  /**
401
- * @tsplus pipeable fncts.ImmutableArray deleteAt
340
+ * @tsplus pipeable fncts.ReadonlyArray cross
341
+ */
342
+ function cross(fb) {
343
+ return self => {
344
+ return crossWith_1(fb, (a, b) => tsplus_module_7.make(a, b))(self);
345
+ };
346
+ }
347
+ /**
348
+ * @tsplus pipeable fncts.ReadonlyArray crossWith
349
+ */
350
+ function crossWith_1(fb, f) {
351
+ return self => {
352
+ return self.flatMap(a => fb.map(b => f(a, b)));
353
+ };
354
+ }
355
+ /**
356
+ * @tsplus pipeable fncts.ReadonlyArray deleteAt
402
357
  */
403
358
  function deleteAt(i) {
404
359
  return as => {
405
- return isOutOfBound_1(i)(as) ? tsplus_module_11.nothing(fileName_1 + ":304:40") : tsplus_module_11.just(unsafeDeleteAt_1(i)(as), fileName_1 + ":304:49");
360
+ return isOutOfBound_1(i)(as) ? tsplus_module_8.nothing(fileName_1 + ":255:40") : tsplus_module_8.just(unsafeDeleteAt_1(i)(as), fileName_1 + ":255:49");
406
361
  };
407
362
  }
408
363
  /**
409
- * @tsplus pipeable fncts.ImmutableArray difference
364
+ * @tsplus pipeable fncts.ReadonlyArray difference
410
365
  */
411
366
  function difference(ys, /** @tsplus auto */E) {
412
367
  return self => {
413
- return filter_1(a => !elem_1(a, E)(ys))(self);
368
+ return self.filter(a => !elem_1(a, E)(ys));
414
369
  };
415
370
  }
416
371
  /**
417
- * @tsplus pipeable fncts.ImmutableArray drop
372
+ * @tsplus pipeable fncts.ReadonlyArray drop
418
373
  */
419
374
  function drop(n) {
420
375
  return self => {
421
- return tsplus_module_4.slice(n)(self);
376
+ return self.slice(n);
422
377
  };
423
378
  }
424
379
  /**
425
- * @tsplus pipeable fncts.ImmutableArray dropLast
380
+ * @tsplus pipeable fncts.ReadonlyArray dropLast
426
381
  */
427
382
  function dropLast(n) {
428
383
  return self => {
429
- return tsplus_module_4.slice(0, length_1(self) - n)(self);
384
+ return self.slice(0, self.length - n);
430
385
  };
431
386
  }
432
387
  /**
433
- * @tsplus pipeable fncts.ImmutableArray dropWhile
388
+ * @tsplus pipeable fncts.ReadonlyArray dropLastWhile
434
389
  */
435
- function dropWhile(p) {
436
- return self => {
437
- return tsplus_module_4.slice(spanIndexLeft_1(p)(self))(self);
390
+ function dropLastWhile(p) {
391
+ return as => {
392
+ return as.slice(0, spanIndexRight_1(p)(as) + 1);
438
393
  };
439
394
  }
440
395
  /**
441
- * @tsplus pipeable fncts.ImmutableArray dropLastWhile
396
+ * @tsplus pipeable fncts.ReadonlyArray dropWhile
442
397
  */
443
- function dropLastWhile(p) {
444
- return as => {
445
- return tsplus_module_4.slice(0, spanIndexRight_1(p)(as) + 1)(as);
398
+ function dropWhile(p) {
399
+ return self => {
400
+ return self.slice(spanIndexLeft_1(p)(self));
446
401
  };
447
402
  }
448
403
  /**
449
404
  * Test if a value is a member of an array. Takes an `Eq<A>` as a single
450
405
  * argument which returns the function to use to search for a value of type `A` in
451
- * an array of type `ImmutableArray<A>`.
406
+ * an array of type `ReadonlyArray<A>`.
452
407
  *
453
- * @tsplus pipeable fncts.ImmutableArray elem
408
+ * @tsplus pipeable fncts.ReadonlyArray elem
409
+ * @tsplus pipeable fncts.Array elem
454
410
  */
455
411
  function elem_1(a, /** @tsplus auto */E) {
456
412
  return as => {
457
413
  const predicate = element => E.equals(a)(element);
458
- const len = length_1(as);
414
+ const len = as.length;
459
415
  for (let i = 0; i < len; i++) {
460
- if (predicate(as._array[i])) {
416
+ if (predicate(as[i])) {
461
417
  return true;
462
418
  }
463
419
  }
@@ -473,65 +429,67 @@ function everyWithIndex_1(p) {
473
429
  return self => {
474
430
  let result = true;
475
431
  let i = 0;
476
- while (result && i < length_1(self)) {
477
- result = p(i, self._array[i]);
432
+ while (result && i < self.length) {
433
+ result = p(i, self[i]);
478
434
  i++;
479
435
  }
480
436
  return result;
481
437
  };
482
438
  }
483
- /**
484
- * @tsplus pipeable fncts.ImmutableArray some
485
- */
486
- function some(p) {
439
+ function filter(p) {
487
440
  return self => {
488
- let result = false;
489
- let i = 0;
490
- while (!result && i < length_1(self)) {
491
- result = p(self._array[i]);
492
- i++;
493
- }
494
- return result;
441
+ return filterWithIndex_1((_, a) => p(a))(self);
495
442
  };
496
443
  }
497
- function filter_1(p) {
444
+ /**
445
+ * @tsplus pipeable fncts.ReadonlyArray filterMap
446
+ */
447
+ function filterMap(f) {
498
448
  return self => {
499
- return filterWithIndex_1((_, a) => p(a))(self);
449
+ return filterMapWithIndex_1((_, a) => f(a))(self);
500
450
  };
501
451
  }
502
- function filterWithIndex_1(p) {
452
+ /**
453
+ * @tsplus pipeable fncts.Array filterMap
454
+ * @tsplus pipeable fncts.ReadonlyArray filterMap
455
+ */
456
+ function filterMapUndefined(f) {
503
457
  return self => {
504
- const result = [];
505
- for (let i = 0; i < length_1(self); i++) {
506
- const a = self._array[i];
507
- if (p(i, a)) {
508
- result.push(a);
458
+ const out = [];
459
+ for (let i = 0; i < self.length; i++) {
460
+ const v = f(self[i]);
461
+ if (v !== undefined) {
462
+ out.push(v);
509
463
  }
510
464
  }
511
- return tsplus_module_2.asImmutableArray(result);
465
+ return out;
512
466
  };
513
467
  }
514
468
  /**
515
- * @tsplus pipeable fncts.ImmutableArray filterMapWithIndex
469
+ * @tsplus pipeable fncts.ReadonlyArray filterMapWithIndex
516
470
  */
517
471
  function filterMapWithIndex_1(f) {
518
472
  return fa => {
519
473
  const result = [];
520
- for (let i = 0; i < length_1(fa); i++) {
521
- const maybeB = f(i, unsafeGet_1(fa, i));
522
- if (tsplus_module_6.isJust(maybeB)) {
474
+ for (let i = 0; i < fa.length; i++) {
475
+ const maybeB = f(i, fa[i]);
476
+ if (tsplus_module_2.isJust(maybeB)) {
523
477
  result.push(maybeB.value);
524
478
  }
525
479
  }
526
- return tsplus_module_2.asImmutableArray(result);
480
+ return result;
527
481
  };
528
482
  }
529
- /**
530
- * @tsplus pipeable fncts.ImmutableArray filterMap
531
- */
532
- function filterMap(f) {
483
+ function filterWithIndex_1(p) {
533
484
  return self => {
534
- return filterMapWithIndex_1((_, a) => f(a))(self);
485
+ const result = [];
486
+ for (let i = 0; i < self.length; i++) {
487
+ const a = self[i];
488
+ if (p(i, a)) {
489
+ result.push(a);
490
+ }
491
+ }
492
+ return result;
535
493
  };
536
494
  }
537
495
  function find(p) {
@@ -540,26 +498,57 @@ function find(p) {
540
498
  };
541
499
  }
542
500
  /**
543
- * @tsplus pipeable fncts.ImmutableArray findIndex
501
+ * @tsplus pipeable fncts.ReadonlyArray findIndex
544
502
  */
545
503
  function findIndex(predicate) {
546
504
  return as => {
547
- return findMapWithIndex_1((i, a) => predicate(a) ? tsplus_module_11.just(i, fileName_1 + ":490:62") : tsplus_module_11.nothing(fileName_1 + ":490:75"))(as);
505
+ return findMapWithIndex_1((i, a) => predicate(a) ? tsplus_module_8.just(i, fileName_1 + ":443:62") : tsplus_module_8.nothing(fileName_1 + ":443:75"))(as);
548
506
  };
549
507
  }
550
- function findWithIndex_1(p) {
508
+ function findLast(p) {
551
509
  return as => {
552
- const len = length_1(as);
553
- for (let i = 0; i < len; i++) {
554
- if (p(i, as._array[i])) {
555
- return tsplus_module_11.just(as._array[i], fileName_1 + ":506:20");
510
+ const len = as.length;
511
+ for (let i = len - 1; i >= 0; i--) {
512
+ if (p(as[i])) {
513
+ return tsplus_module_8.just(as[i], fileName_1 + ":457:20");
556
514
  }
557
515
  }
558
- return tsplus_module_11.nothing(fileName_1 + ":509:19");
516
+ return tsplus_module_8.nothing(fileName_1 + ":460:19");
517
+ };
518
+ }
519
+ /**
520
+ * @tsplus pipeable fncts.ReadonlyArray findLastIndex
521
+ */
522
+ function findLastIndex(p) {
523
+ return self => {
524
+ return findLastMapWithIndex_1((i, a) => p(a) ? tsplus_module_8.just(i, fileName_1 + ":468:60") : tsplus_module_8.nothing(fileName_1 + ":468:73"))(self);
559
525
  };
560
526
  }
561
527
  /**
562
- * @tsplus pipeable fncts.ImmutableArray findMap
528
+ * @tsplus pipeable fncts.ReadonlyArray findLastMap
529
+ */
530
+ function findLastMap(f) {
531
+ return as => {
532
+ return findLastMapWithIndex_1((_, a) => f(a))(as);
533
+ };
534
+ }
535
+ /**
536
+ * @tsplus pipeable fncts.ReadonlyArray findLastMapWithIndex
537
+ */
538
+ function findLastMapWithIndex_1(f) {
539
+ return as => {
540
+ const len = as.length;
541
+ for (let i = len - 1; i >= 0; i--) {
542
+ const v = f(i, as[i]);
543
+ if (tsplus_module_2.isJust(v)) {
544
+ return v;
545
+ }
546
+ }
547
+ return tsplus_module_8.nothing(fileName_1 + ":493:19");
548
+ };
549
+ }
550
+ /**
551
+ * @tsplus pipeable fncts.ReadonlyArray findMap
563
552
  */
564
553
  function findMap(f) {
565
554
  return as => {
@@ -567,79 +556,83 @@ function findMap(f) {
567
556
  };
568
557
  }
569
558
  /**
570
- * @tsplus pipeable fncts.ImmutableArray findMapWithIndex
559
+ * @tsplus pipeable fncts.ReadonlyArray findMapWithIndex
571
560
  */
572
561
  function findMapWithIndex_1(f) {
573
562
  return as => {
574
- const len = length_1(as);
563
+ const len = as.length;
575
564
  for (let i = 0; i < len; i++) {
576
- const v = f(i, as._array[i]);
577
- if (tsplus_module_6.isJust(v)) {
565
+ const v = f(i, as[i]);
566
+ if (tsplus_module_2.isJust(v)) {
578
567
  return v;
579
568
  }
580
569
  }
581
- return tsplus_module_11.nothing(fileName_1 + ":534:19");
570
+ return tsplus_module_8.nothing(fileName_1 + ":516:19");
582
571
  };
583
572
  }
584
- function findLast(p) {
573
+ function findWithIndex_1(p) {
585
574
  return as => {
586
- const len = length_1(as);
587
- for (let i = len - 1; i >= 0; i--) {
588
- if (p(as._array[i])) {
589
- return tsplus_module_11.just(as._array[i], fileName_1 + ":548:20");
575
+ const len = as.length;
576
+ for (let i = 0; i < len; i++) {
577
+ if (p(i, as[i])) {
578
+ return tsplus_module_8.just(as[i], fileName_1 + ":530:20");
590
579
  }
591
580
  }
592
- return tsplus_module_11.nothing(fileName_1 + ":551:19");
581
+ return tsplus_module_8.nothing(fileName_1 + ":533:19");
593
582
  };
594
583
  }
595
584
  /**
596
- * @tsplus pipeable fncts.ImmutableArray findLastIndex
585
+ * @tsplus pipeable fncts.ReadonlyArray flatMap
597
586
  */
598
- function findLastIndex(p) {
587
+ function flatMap(f) {
599
588
  return self => {
600
- return findLastMapWithIndex_1((i, a) => p(a) ? tsplus_module_11.just(i, fileName_1 + ":560:60") : tsplus_module_11.nothing(fileName_1 + ":560:73"))(self);
589
+ return flatMapWithIndex_1((_, a) => f(a))(self);
601
590
  };
602
591
  }
603
592
  /**
604
- * @tsplus pipeable fncts.ImmutableArray findLastMap
593
+ * @tsplus pipeable fncts.ReadonlyArray flatMapWithIndex
605
594
  */
606
- function findLastMap(f) {
607
- return as => {
608
- return findLastMapWithIndex_1((_, a) => f(a))(as);
595
+ function flatMapWithIndex_1(f) {
596
+ return self => {
597
+ let outLen = 0;
598
+ const len = self.length;
599
+ const temp = Array(len);
600
+ for (let i = 0; i < len; i++) {
601
+ const e = self[i];
602
+ const arr = f(i, e);
603
+ outLen += arr.length;
604
+ temp[i] = arr;
605
+ }
606
+ const out = Array(outLen);
607
+ let start = 0;
608
+ for (let i = 0; i < len; i++) {
609
+ const arr = temp[i];
610
+ const l = arr.length;
611
+ for (let j = 0; j < l; j++) {
612
+ out[j + start] = arr[j];
613
+ }
614
+ start += l;
615
+ }
616
+ return out;
609
617
  };
610
618
  }
611
619
  /**
612
- * @tsplus pipeable fncts.ImmutableArray findLastMapWithIndex
620
+ * @tsplus getter fncts.ReadonlyArray flatten
613
621
  */
614
- function findLastMapWithIndex_1(f) {
615
- return as => {
616
- const len = length_1(as);
617
- for (let i = len - 1; i >= 0; i--) {
618
- const v = f(i, as._array[i]);
619
- if (tsplus_module_6.isJust(v)) {
620
- return v;
621
- }
622
- }
623
- return tsplus_module_11.nothing(fileName_1 + ":585:19");
624
- };
622
+ function flatten_1(self) {
623
+ return self.flatMap(_function.identity);
625
624
  }
626
625
  /**
627
- * @tsplus pipeable fncts.ImmutableArray foldLeftWithIndex
628
- * @tsplus pipeable fncts.MutableArray foldLeftWithIndex
626
+ * @tsplus pipeable fncts.ReadonlyArray fold
629
627
  */
630
- function foldLeftWithIndex_1(b, f) {
628
+ function fold_1(/** @tsplus auto */M) {
631
629
  return self => {
632
- const len = length_1(self);
633
- let r = b;
634
- for (let i = 0; i < len; i++) {
635
- r = f(i, r, self._array[i]);
636
- }
637
- return r;
630
+ return foldLeft_1(M.nat, (b, a) => M.combine(a)(b))(self);
638
631
  };
639
632
  }
640
633
  /**
641
- * @tsplus pipeable fncts.ImmutableArray foldLeft
642
- * @tsplus pipeable fncts.MutableArray foldLeft
634
+ * @tsplus pipeable fncts.ReadonlyArray foldLeft
635
+ * @tsplus pipeable fncts.Array foldLeft
643
636
  */
644
637
  function foldLeft_1(b, f) {
645
638
  return self => {
@@ -647,8 +640,8 @@ function foldLeft_1(b, f) {
647
640
  };
648
641
  }
649
642
  /**
650
- * @tsplus pipeable fncts.ImmutableArray foldLeftWhile
651
- * @tsplus pipeable fncts.MutableArray foldLeftWhile
643
+ * @tsplus pipeable fncts.ReadonlyArray foldLeftWhile
644
+ * @tsplus pipeable fncts.Array foldLeftWhile
652
645
  */
653
646
  function foldLeftWhile(b, p, f) {
654
647
  return self => {
@@ -656,30 +649,44 @@ function foldLeftWhile(b, p, f) {
656
649
  };
657
650
  }
658
651
  /**
659
- * @tsplus pipeable fncts.ImmutableArray foldLeftWithIndexWhile
660
- * @tsplus pipeable fncts.MutableArray foldLeftWithIndexWhile
652
+ * @tsplus pipeable fncts.ReadonlyArray foldLeftWithIndex
653
+ * @tsplus pipeable fncts.Array foldLeftWithIndex
654
+ */
655
+ function foldLeftWithIndex_1(b, f) {
656
+ return self => {
657
+ const len = self.length;
658
+ let r = b;
659
+ for (let i = 0; i < len; i++) {
660
+ r = f(i, r, self[i]);
661
+ }
662
+ return r;
663
+ };
664
+ }
665
+ /**
666
+ * @tsplus pipeable fncts.ReadonlyArray foldLeftWithIndexWhile
667
+ * @tsplus pipeable fncts.Array foldLeftWithIndexWhile
661
668
  */
662
669
  function foldLeftWithIndexWhile_1(b, p, f) {
663
670
  return self => {
664
671
  let out = b;
665
672
  let cont = p(out);
666
- for (let i = 0; cont && i < length_1(self); i++) {
667
- out = f(i, out, self._array[i]);
673
+ for (let i = 0; cont && i < self.length; i++) {
674
+ out = f(i, out, self[i]);
668
675
  cont = p(out);
669
676
  }
670
677
  return out;
671
678
  };
672
679
  }
673
680
  /**
674
- * @tsplus pipeable fncts.ImmutableArray fold
681
+ * @tsplus pipeable fncts.ReadonlyArray foldMap
675
682
  */
676
- function fold_1(/** @tsplus auto */M) {
683
+ function foldMap(f, /** @tsplus auto */M) {
677
684
  return self => {
678
- return foldLeft_1(M.nat, (b, a) => M.combine(a)(b))(self);
685
+ return foldMapWithIndex_1((_, a) => f(a), M)(self);
679
686
  };
680
687
  }
681
688
  /**
682
- * @tsplus pipeable fncts.ImmutableArray foldMapWithIndex
689
+ * @tsplus pipeable fncts.ReadonlyArray foldMapWithIndex
683
690
  */
684
691
  function foldMapWithIndex_1(f, /** @tsplus auto */M) {
685
692
  return self => {
@@ -687,99 +694,101 @@ function foldMapWithIndex_1(f, /** @tsplus auto */M) {
687
694
  };
688
695
  }
689
696
  /**
690
- * @tsplus pipeable fncts.ImmutableArray foldMap
697
+ * @tsplus pipeable fncts.ReadonlyArray foldRight
691
698
  */
692
- function foldMap(f, /** @tsplus auto */M) {
693
- return self => {
694
- return foldMapWithIndex_1((_, a) => f(a), M)(self);
695
- };
696
- }
697
- /**
698
- * @tsplus pipeable fncts.ImmutableArray foldRightWithIndex
699
- */
700
- function foldRightWithIndex_1(b, f) {
699
+ function foldRight(b, f) {
701
700
  return self => {
702
- let r = b;
703
- for (let i = length_1(self) - 1; i >= 0; i--) {
704
- r = f(i, self._array[i], r);
705
- }
706
- return r;
701
+ return foldRightWithIndex_1(b, (_, a, b) => f(a, b))(self);
707
702
  };
708
703
  }
709
704
  /**
710
- * @tsplus pipeable fncts.ImmutableArray foldRight
705
+ * @tsplus pipeable fncts.ReadonlyArray foldRighWhile
711
706
  */
712
- function foldRight(b, f) {
707
+ function foldRightWhile(b, p, f) {
713
708
  return self => {
714
- return foldRightWithIndex_1(b, (_, a, b) => f(a, b))(self);
709
+ return foldRightWithIndexWhile_1(b, p, (_, a, b) => f(a, b))(self);
715
710
  };
716
711
  }
717
712
  /**
718
- * @tsplus pipeable fncts.ImmutableArray foldRighWhile
713
+ * @tsplus pipeable fncts.ReadonlyArray foldRightWithIndex
719
714
  */
720
- function foldRightWhile(b, p, f) {
715
+ function foldRightWithIndex_1(b, f) {
721
716
  return self => {
722
- return foldRightWithIndexWhile_1(b, p, (_, a, b) => f(a, b))(self);
717
+ let r = b;
718
+ for (let i = self.length - 1; i >= 0; i--) {
719
+ r = f(i, self[i], r);
720
+ }
721
+ return r;
723
722
  };
724
723
  }
725
724
  /**
726
- * @tsplus pipeable fncts.ImmutableArray foldRightWithIndexWhile
725
+ * @tsplus pipeable fncts.ReadonlyArray foldRightWithIndexWhile
727
726
  */
728
727
  function foldRightWithIndexWhile_1(b, predicate, f) {
729
728
  return self => {
730
729
  let out = b;
731
730
  let cont = predicate(out);
732
- for (let i = length_1(self) - 1; cont && i >= 0; i--) {
733
- out = f(i, self._array[i], out);
731
+ for (let i = self.length - 1; cont && i >= 0; i--) {
732
+ out = f(i, self[i], out);
734
733
  cont = predicate(out);
735
734
  }
736
735
  return out;
737
736
  };
738
737
  }
739
738
  /**
740
- * @tsplus pipeable fncts.ImmutableArray forEach
739
+ * @tsplus pipeable fncts.ReadonlyArray forEach
741
740
  */
742
- function forEach_1(f) {
741
+ function forEach(f) {
743
742
  return self => {
744
- return forEach_1(f)(self);
743
+ return self.forEach(f);
745
744
  };
746
745
  }
747
746
  /**
748
- * @tsplus pipeable fncts.ImmutableArray get
747
+ * @tsplus static fncts.ArrayOps fromValue
748
+ */
749
+ function fromValue(value) {
750
+ if (Array.isArray(value)) {
751
+ return value;
752
+ } else {
753
+ return [value];
754
+ }
755
+ }
756
+ /**
757
+ * @tsplus pipeable fncts.ReadonlyArray get
749
758
  * @tsplus pipeable fncts.MutableArray get
750
759
  */
751
760
  function get_1(i) {
752
761
  return self => {
753
- return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing(fileName_1 + ":728:42") : tsplus_module_11.just(self._array[i], fileName_1 + ":728:51");
762
+ return isOutOfBound_1(i)(self) ? tsplus_module_8.nothing(fileName_1 + ":729:42") : tsplus_module_8.just(self[i], fileName_1 + ":729:51");
754
763
  };
755
764
  }
756
765
  /**
757
- * @tsplus pipeable fncts.ImmutableArray group
766
+ * @tsplus pipeable fncts.ReadonlyArray group
758
767
  */
759
768
  function group(E) {
760
769
  return chop_1(self => {
761
- const h = self._array[0];
770
+ const h = self[0];
762
771
  const out = [h];
763
772
  let i = 1;
764
- for (; i < length_1(self); i++) {
765
- const a = self._array[i];
773
+ for (; i < self.length; i++) {
774
+ const a = self[i];
766
775
  if (E.equals(h)(a)) {
767
776
  out.push(a);
768
777
  } else {
769
778
  break;
770
779
  }
771
780
  }
772
- return [tsplus_module_12.unsafeAsNonEmptyArray(out), tsplus_module_4.slice(i)(self)];
781
+ return [tsplus_module_9.unsafeAsNonEmptyArray(out), self.slice(i)];
773
782
  });
774
783
  }
775
784
  /**
776
- * @tsplus pipeable fncts.ImmutableArray groupBy
785
+ * @tsplus pipeable fncts.ReadonlyArray groupBy
777
786
  */
778
787
  function groupBy(f) {
779
788
  return self => {
780
789
  const out = {};
781
- for (let i = 0; i < length_1(self); i++) {
782
- const a = self._array[i];
790
+ for (let i = 0; i < self.length; i++) {
791
+ const a = self[i];
783
792
  const k = f(a);
784
793
  if (Object.prototype.hasOwnProperty.call(out, k)) {
785
794
  out[k].push(a);
@@ -787,184 +796,183 @@ function groupBy(f) {
787
796
  out[k] = [a];
788
797
  }
789
798
  }
790
- return tsplus_module_14.map(tsplus_module_12.from)(tsplus_module_13.Dictionary.get(out));
799
+ return tsplus_module_11.map(tsplus_module_9.from)(tsplus_module_10.Dictionary.get(out));
791
800
  };
792
801
  }
793
802
  /**
794
- * @tsplus getter fncts.ImmutableArray head
803
+ * @tsplus getter fncts.ReadonlyArray head
795
804
  */
796
805
  function head(self) {
797
- return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just(self._array[0], fileName_1 + ":775:34") : tsplus_module_11.nothing(fileName_1 + ":775:60");
806
+ return isNonEmpty_1(self) ? tsplus_module_8.just(self[0], fileName_1 + ":776:34") : tsplus_module_8.nothing(fileName_1 + ":776:53");
798
807
  }
799
808
  /**
800
- * @tsplus getter fncts.ImmutableArray init
809
+ * @tsplus getter fncts.ReadonlyArray init
801
810
  */
802
811
  function init(self) {
803
- const len = length_1(self);
804
- return len === 0 ? tsplus_module_11.nothing(fileName_1 + ":783:29") : tsplus_module_11.just(tsplus_module_4.slice(0, len - 1)(self), fileName_1 + ":783:38");
812
+ const len = self.length;
813
+ return len === 0 ? tsplus_module_8.nothing(fileName_1 + ":784:29") : tsplus_module_8.just(self.slice(0, len - 1), fileName_1 + ":784:38");
805
814
  }
806
815
  /**
807
- * @tsplus pipeable fncts.ImmutableArray insertAt
816
+ * @tsplus pipeable fncts.ReadonlyArray insertAt
808
817
  */
809
818
  function insertAt(i, a) {
810
819
  return self => {
811
- return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing(fileName_1 + ":791:42") : tsplus_module_11.just(unsafeInsertAt_1(i, a)(self), fileName_1 + ":791:51");
820
+ return isOutOfBound_1(i)(self) ? tsplus_module_8.nothing(fileName_1 + ":792:42") : tsplus_module_8.just(unsafeInsertAt_1(i, a)(self), fileName_1 + ":792:51");
812
821
  };
813
822
  }
814
823
  /**
815
- * @tsplus pipeable fncts.ImmutableArray intersection
824
+ * @tsplus pipeable fncts.ReadonlyArray intersection
816
825
  */
817
826
  function intersection(that, /** @tsplus auto */E) {
818
827
  return self => {
819
- return filter_1(a => elem_1(a, E)(that))(self);
828
+ return self.filter(a => elem_1(a, E)(that));
820
829
  };
821
830
  }
822
831
  /**
823
- * @tsplus pipeable fncts.ImmutableArray intersperse
832
+ * @tsplus pipeable fncts.ReadonlyArray intersperse
824
833
  */
825
834
  function intersperse(a) {
826
835
  return self => {
827
- const len = length_1(self);
828
- return len === 0 ? self : prepend_1(unsafeGet_1(self, 0))(prependAll_1(a)(tsplus_module_4.slice(1, len)(self)));
836
+ const len = self.length;
837
+ return len === 0 ? self : prepend_1(self[0])(prependAll_1(a)(self.slice(1, len)));
829
838
  };
830
839
  }
831
840
  /**
832
- * @tsplus fluent fncts.ImmutableArray isEmpty
841
+ * @tsplus fluent fncts.ReadonlyArray isEmpty
833
842
  */
834
843
  function isEmpty_1(self) {
835
- return length_1(self) === 0;
844
+ return self.length === 0;
845
+ }
846
+ /**
847
+ * @tsplus fluent fncts.ReadonlyArray isNonEmpty
848
+ */
849
+ function isNonEmpty_1(self) {
850
+ return self.length > 0;
836
851
  }
837
852
  /**
838
- * @tsplus pipeable fncts.ImmutableArray isOutOfBound
853
+ * @tsplus pipeable fncts.ReadonlyArray isOutOfBound
839
854
  */
840
855
  function isOutOfBound_1(i) {
841
856
  return self => {
842
- return i < 0 || i >= length_1(self);
857
+ return i < 0 || i >= self.length;
843
858
  };
844
859
  }
845
860
  /**
846
- * @tsplus pipeable fncts.ImmutableArray join
861
+ * @tsplus pipeable fncts.ReadonlyArray join
847
862
  */
848
863
  function join(separator) {
849
864
  return self => {
850
- return self._array.join(separator);
865
+ return self.join(separator);
851
866
  };
852
867
  }
853
868
  /**
854
- * @tsplus getter fncts.ImmutableArray last
869
+ * @tsplus getter fncts.ReadonlyArray last
855
870
  */
856
871
  function last(self) {
857
- return get_1(length_1(self) - 1)(self);
872
+ return get_1(self.length - 1)(self);
858
873
  }
859
874
  /**
860
- * @tsplus getter fncts.ImmutableArray length
861
- */
862
- function length_1(self) {
863
- return self._array.length;
864
- }
865
- /**
866
- * @tsplus getter fncts.ImmutableArray lefts
875
+ * @tsplus getter fncts.ReadonlyArray lefts
867
876
  */
868
877
  function lefts(self) {
869
878
  const ls = [];
870
- for (let i = 0; i < length_1(self); i++) {
871
- const a = self._array[i];
879
+ for (let i = 0; i < self.length; i++) {
880
+ const a = self[i];
872
881
  void 0;
873
882
  if (a._tag === "Left" /* EitherTag.Left */) {
874
883
  ls.push(a.left);
875
884
  }
876
885
  }
877
- return tsplus_module_2.asImmutableArray(ls);
886
+ return ls;
887
+ }
888
+ /**
889
+ * @tsplus getter fncts.ReadonlyArray length
890
+ */
891
+ function length(self) {
892
+ return self.length;
878
893
  }
879
894
  /**
880
- * @tsplus pipeable fncts.ImmutableArray map
895
+ * @tsplus pipeable fncts.ReadonlyArray map
881
896
  */
882
- function map_1(f) {
897
+ function map(f) {
883
898
  return self => {
884
899
  return mapWithIndex_1((_, a) => f(a))(self);
885
900
  };
886
901
  }
887
902
  /**
888
- * @tsplus pipeable fncts.ImmutableArray mapAccum
903
+ * @tsplus pipeable fncts.ReadonlyArray mapAccum
889
904
  */
890
905
  function mapAccum(s, f) {
891
906
  return self => {
892
- const bs = Array(length_1(self));
907
+ const bs = Array(self.length);
893
908
  let state = s;
894
- for (let i = 0; i < length_1(self); i++) {
895
- const result = f(state, self._array[i]);
909
+ for (let i = 0; i < self.length; i++) {
910
+ const result = f(state, self[i]);
896
911
  bs[i] = result[0];
897
912
  state = result[1];
898
913
  }
899
- return [tsplus_module_2.asImmutableArray(bs), state];
914
+ return [bs, state];
900
915
  };
901
916
  }
902
917
  /**
903
- * @tsplus pipeable fncts.ImmutableArray mapWithIndex
918
+ * @tsplus pipeable fncts.ReadonlyArray mapWithIndex
904
919
  */
905
920
  function mapWithIndex_1(f) {
906
921
  return self => {
907
- const len = self._array.length;
922
+ const len = self.length;
908
923
  const bs = Array(len);
909
924
  for (let i = 0; i < len; i++) {
910
- bs[i] = f(i, self._array[i]);
925
+ bs[i] = f(i, self[i]);
911
926
  }
912
- return tsplus_module_2.asImmutableArray(bs);
927
+ return bs;
913
928
  };
914
929
  }
915
930
  /**
916
- * @tsplus pipeable fncts.ImmutableArray modifyAt
931
+ * @tsplus pipeable fncts.ReadonlyArray modifyAt
917
932
  */
918
933
  function modifyAt(i, f) {
919
934
  return self => {
920
- return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing(fileName_1 + ":912:42") : tsplus_module_11.just(unsafeModifyAt_1(i, f)(self), fileName_1 + ":912:51");
935
+ return isOutOfBound_1(i)(self) ? tsplus_module_8.nothing(fileName_1 + ":920:42") : tsplus_module_8.just(unsafeModifyAt_1(i, f)(self), fileName_1 + ":920:51");
921
936
  };
922
937
  }
923
938
  /**
924
- * @tsplus pipeable fncts.ImmutableArray mutate
939
+ * @tsplus getter fncts.ReadonlyArray mutableClone
940
+ */
941
+ function mutableClone_1(self) {
942
+ return self.slice(0);
943
+ }
944
+ /**
945
+ * @tsplus pipeable fncts.ReadonlyArray mutate
925
946
  */
926
947
  function mutate_1(f) {
927
948
  return self => {
928
949
  const mut = mutableClone_1(self);
929
950
  f(mut);
930
- return tsplus_module_2.asImmutableArray(mut);
951
+ return mut;
931
952
  };
932
953
  }
933
- /**
934
- * @tsplus getter fncts.ImmutableArray mutableClone
935
- */
936
- function mutableClone_1(self) {
937
- return tsplus_module_4.slice(0)(self)._array;
938
- }
939
- function partitionWithIndex_1(p) {
954
+ function partition(p) {
940
955
  return self => {
941
- const left = [];
942
- const right = [];
943
- for (let i = 0; i < length_1(self); i++) {
944
- const a = self._array[i];
945
- if (p(i, a)) {
946
- right.push(a);
947
- } else {
948
- left.push(a);
949
- }
950
- }
951
- return [tsplus_module_2.asImmutableArray(left), tsplus_module_2.asImmutableArray(right)];
956
+ return partitionWithIndex_1((_, a) => p(a))(self);
952
957
  };
953
958
  }
954
- function partition(p) {
959
+ /**
960
+ * @tsplus pipeable fncts.ReadonlyArray partitionMap
961
+ */
962
+ function partitionMap(f) {
955
963
  return self => {
956
- return partitionWithIndex_1((_, a) => p(a))(self);
964
+ return partitionMapWithIndex_1((_, a) => f(a))(self);
957
965
  };
958
966
  }
959
967
  /**
960
- * @tsplus pipeable fncts.ImmutableArray partitionMapWithIndex
968
+ * @tsplus pipeable fncts.ReadonlyArray partitionMapWithIndex
961
969
  */
962
970
  function partitionMapWithIndex_1(f) {
963
971
  return self => {
964
972
  const left = [];
965
973
  const right = [];
966
- for (let i = 0; i < length_1(self); i++) {
967
- const ea = f(i, self._array[i]);
974
+ for (let i = 0; i < self.length; i++) {
975
+ const ea = f(i, self[i]);
968
976
  void 0;
969
977
  switch (ea._tag) {
970
978
  case "Left" /* EitherTag.Left */:
@@ -975,171 +983,163 @@ function partitionMapWithIndex_1(f) {
975
983
  break;
976
984
  }
977
985
  }
978
- return [tsplus_module_2.asImmutableArray(left), tsplus_module_2.asImmutableArray(right)];
986
+ return [left, right];
979
987
  };
980
988
  }
981
- /**
982
- * @tsplus pipeable fncts.ImmutableArray partitionMap
983
- */
984
- function partitionMap(f) {
989
+ function partitionWithIndex_1(p) {
985
990
  return self => {
986
- return partitionMapWithIndex_1((_, a) => f(a))(self);
991
+ const left = [];
992
+ const right = [];
993
+ for (let i = 0; i < self.length; i++) {
994
+ const a = self[i];
995
+ if (p(i, a)) {
996
+ right.push(a);
997
+ } else {
998
+ left.push(a);
999
+ }
1000
+ }
1001
+ return [left, right];
987
1002
  };
988
1003
  }
989
1004
  /**
990
- * @tsplus pipeable fncts.ImmutableArray prepend
1005
+ * @tsplus pipeable fncts.ReadonlyArray prepend
991
1006
  */
992
1007
  function prepend_1(head) {
993
1008
  return self => {
994
- const len = length_1(self);
1009
+ const len = self.length;
995
1010
  const out = Array(len + 1);
996
1011
  out[0] = head;
997
1012
  for (let i = 0; i < len; i++) {
998
- out[i + 1] = self._array[i];
1013
+ out[i + 1] = self[i];
999
1014
  }
1000
- return tsplus_module_2.asImmutableArray(out);
1015
+ return out;
1001
1016
  };
1002
1017
  }
1003
1018
  /**
1004
- * @tsplus pipeable fncts.ImmutableArray prependAll
1019
+ * @tsplus pipeable fncts.ReadonlyArray prependAll
1020
+ * @tsplus pipeable fncts.Array prependAll
1005
1021
  */
1006
1022
  function prependAll_1(a) {
1007
1023
  return self => {
1008
1024
  const out = [];
1009
- for (let i = 0; i < length_1(self); i++) {
1010
- out.push(a, self._array[i]);
1025
+ for (let i = 0; i < self.length; i++) {
1026
+ out.push(a, self[i]);
1011
1027
  }
1012
- return tsplus_module_2.asImmutableArray(out);
1028
+ return out;
1013
1029
  };
1014
1030
  }
1015
1031
  /**
1016
- * @tsplus getter fncts.ImmutableArray reverse
1032
+ * @tsplus getter fncts.ReadonlyArray reverse
1017
1033
  */
1018
1034
  function reverse(self) {
1019
1035
  if (isEmpty_1(self)) {
1020
1036
  return self;
1021
- } else if (length_1(self) === 1) {
1022
- return tsplus_module_2.make(self._array[0]);
1037
+ } else if (self.length === 1) {
1038
+ return [self[0]];
1023
1039
  } else {
1024
- const out = Array(length_1(self));
1025
- for (let j = 0, i = length_1(self) - 1; i >= 0; i--, j++) {
1026
- out[j] = self._array[i];
1040
+ const out = Array(self.length);
1041
+ for (let j = 0, i = self.length - 1; i >= 0; i--, j++) {
1042
+ out[j] = self[i];
1027
1043
  }
1028
- return tsplus_module_2.asImmutableArray(out);
1044
+ return out;
1029
1045
  }
1030
1046
  }
1031
1047
  /**
1032
- * @tsplus getter fncts.ImmutableArray rights
1048
+ * @tsplus getter fncts.ReadonlyArray rights
1033
1049
  */
1034
1050
  function rights(self) {
1035
1051
  const rs = [];
1036
- for (let i = 0; i < length_1(self); i++) {
1037
- const a = self._array[i];
1052
+ for (let i = 0; i < self.length; i++) {
1053
+ const a = self[i];
1038
1054
  void 0;
1039
1055
  if (a._tag === "Right" /* EitherTag.Right */) {
1040
1056
  rs.push(a.right);
1041
1057
  }
1042
1058
  }
1043
- return tsplus_module_2.asImmutableArray(rs);
1059
+ return rs;
1044
1060
  }
1045
1061
  /**
1046
- * @tsplus pipeable fncts.ImmutableArray rotate
1062
+ * @tsplus pipeable fncts.ReadonlyArray rotate
1047
1063
  */
1048
1064
  function rotate_1(n) {
1049
1065
  return self => {
1050
- const len = length_1(self);
1066
+ const len = self.length;
1051
1067
  if (n === 0 || len <= 1 || len === Math.abs(n)) {
1052
1068
  return self;
1053
1069
  } else if (n < 0) {
1054
1070
  return rotate_1(len + n)(self);
1055
1071
  } else {
1056
- return concat_1(tsplus_module_4.slice(0, len - n)(self))(tsplus_module_4.slice(-n)(self));
1072
+ return self.slice(-n).concat(self.slice(0, len - n));
1057
1073
  }
1058
1074
  };
1059
1075
  }
1060
1076
  /**
1061
- * @tsplus pipeable fncts.ImmutableArray scanLeft
1077
+ * @tsplus pipeable fncts.ReadonlyArray scanLeft
1062
1078
  */
1063
1079
  function scanLeft(b, f) {
1064
1080
  return self => {
1065
- const l = length_1(self);
1081
+ const l = self.length;
1066
1082
  const r = Array(l + 1);
1067
1083
  r[0] = b;
1068
1084
  for (let i = 0; i < l; i++) {
1069
- r[i + 1] = f(r[i], self._array[i]);
1085
+ r[i + 1] = f(r[i], self[i]);
1070
1086
  }
1071
- return tsplus_module_2.asImmutableArray(r);
1087
+ return r;
1072
1088
  };
1073
1089
  }
1074
1090
  /**
1075
- * @tsplus pipeable fncts.ImmutableArray scanRight
1091
+ * @tsplus pipeable fncts.ReadonlyArray scanRight
1076
1092
  */
1077
1093
  function scanRight(b, f) {
1078
1094
  return self => {
1079
- const l = length_1(self);
1095
+ const l = self.length;
1080
1096
  const r = Array(l + 1);
1081
1097
  r[l] = b;
1082
1098
  for (let i = l - 1; i >= 0; i--) {
1083
- r[i] = f(self._array[i], r[i + 1]);
1099
+ r[i] = f(self[i], r[i + 1]);
1084
1100
  }
1085
- return tsplus_module_2.asImmutableArray(r);
1101
+ return r;
1086
1102
  };
1087
1103
  }
1088
1104
  /**
1089
- * @tsplus pipeable fncts.ImmutableArray sort
1105
+ * @tsplus pipeable fncts.ReadonlyArray some
1090
1106
  */
1091
- function sort_1(/** @tsplus auto */O) {
1107
+ function some(p) {
1092
1108
  return self => {
1093
- return isEmpty_1(self) || length_1(self) === 1 ? self : tsplus_module_2.asImmutableArray(self._array.slice().sort((a, b) => O.compare(b)(a)));
1109
+ let result = false;
1110
+ let i = 0;
1111
+ while (!result && i < self.length) {
1112
+ result = p(self[i]);
1113
+ i++;
1114
+ }
1115
+ return result;
1094
1116
  };
1095
1117
  }
1096
1118
  /**
1097
- * @tsplus pipeable fncts.ImmutableArray sortBy
1119
+ * @tsplus pipeable fncts.ReadonlyArray sort
1098
1120
  */
1099
- function sortBy(Os) {
1121
+ function sort_1(/** @tsplus auto */O) {
1100
1122
  return self => {
1101
- return sort_1(fold_1(tsplus_module_15.getMonoid())(Os))(self);
1123
+ return isEmpty_1(self) || self.length === 1 ? self : self.slice().sort((a, b) => O.compare(b)(a));
1102
1124
  };
1103
1125
  }
1104
- function spanLeft(p) {
1105
- return self => {
1106
- const i = spanIndexLeft_1(p)(self);
1107
- const init = Array(i);
1108
- for (let j = 0; j < i; j++) {
1109
- init[j] = self._array[j];
1110
- }
1111
- const l = length_1(self);
1112
- const rest = Array(l - i);
1113
- for (let j = i; j < l; j++) {
1114
- rest[j - i] = self._array[j];
1115
- }
1116
- return [tsplus_module_2.asImmutableArray(init), tsplus_module_2.asImmutableArray(rest)];
1117
- };
1118
- }
1119
- function spanRight(p) {
1126
+ /**
1127
+ * @tsplus pipeable fncts.ReadonlyArray sortBy
1128
+ */
1129
+ function sortBy(Os) {
1120
1130
  return self => {
1121
- const i = spanIndexRight_1(p)(self);
1122
- const l = length_1(self);
1123
- const tail = Array(l - i - 1);
1124
- for (let j = l - 1; j > i; j--) {
1125
- tail[j - i - 1] = self._array[j];
1126
- }
1127
- const rest = Array(i);
1128
- for (let j = i; j >= 0; j--) {
1129
- rest[j] = self._array[j];
1130
- }
1131
- return [tsplus_module_2.asImmutableArray(rest), tsplus_module_2.asImmutableArray(tail)];
1131
+ return sort_1(fold_1(tsplus_module_12.getMonoid())(Os))(self);
1132
1132
  };
1133
1133
  }
1134
1134
  /**
1135
- * @tsplus pipeable fncts.ImmutableArray spanIndexLeft
1135
+ * @tsplus pipeable fncts.ReadonlyArray spanIndexLeft
1136
1136
  */
1137
1137
  function spanIndexLeft_1(p) {
1138
1138
  return self => {
1139
- const l = length_1(self);
1139
+ const l = self.length;
1140
1140
  let i = 0;
1141
1141
  for (; i < l; i++) {
1142
- if (!p(self._array[i])) {
1142
+ if (!p(self[i])) {
1143
1143
  break;
1144
1144
  }
1145
1145
  }
@@ -1147,39 +1147,69 @@ function spanIndexLeft_1(p) {
1147
1147
  };
1148
1148
  }
1149
1149
  /**
1150
- * @tsplus pipeable fncts.ImmutableArray spanIndexRight
1150
+ * @tsplus pipeable fncts.ReadonlyArray spanIndexRight
1151
1151
  */
1152
1152
  function spanIndexRight_1(predicate) {
1153
1153
  return as => {
1154
- let i = length_1(as) - 1;
1154
+ let i = as.length - 1;
1155
1155
  for (; i >= 0; i--) {
1156
- if (!predicate(as._array[i])) {
1156
+ if (!predicate(as[i])) {
1157
1157
  break;
1158
1158
  }
1159
1159
  }
1160
1160
  return i;
1161
1161
  };
1162
1162
  }
1163
+ function spanLeft(p) {
1164
+ return self => {
1165
+ const i = spanIndexLeft_1(p)(self);
1166
+ const init = Array(i);
1167
+ for (let j = 0; j < i; j++) {
1168
+ init[j] = self[j];
1169
+ }
1170
+ const l = self.length;
1171
+ const rest = Array(l - i);
1172
+ for (let j = i; j < l; j++) {
1173
+ rest[j - i] = self[j];
1174
+ }
1175
+ return [init, rest];
1176
+ };
1177
+ }
1178
+ function spanRight(p) {
1179
+ return self => {
1180
+ const i = spanIndexRight_1(p)(self);
1181
+ const l = self.length;
1182
+ const tail = Array(l - i - 1);
1183
+ for (let j = l - 1; j > i; j--) {
1184
+ tail[j - i - 1] = self[j];
1185
+ }
1186
+ const rest = Array(i);
1187
+ for (let j = i; j >= 0; j--) {
1188
+ rest[j] = self[j];
1189
+ }
1190
+ return [rest, tail];
1191
+ };
1192
+ }
1163
1193
  /**
1164
- * @tsplus getter fncts.ImmutableArray tail
1194
+ * @tsplus getter fncts.ReadonlyArray tail
1165
1195
  */
1166
1196
  function tail(self) {
1167
- return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just(tsplus_module_4.slice(1)(self), fileName_1 + ":1217:34") : tsplus_module_11.nothing(fileName_1 + ":1217:59");
1197
+ return isNonEmpty_1(self) ? tsplus_module_8.just(self.slice(1), fileName_1 + ":1234:34") : tsplus_module_8.nothing(fileName_1 + ":1234:59");
1168
1198
  }
1169
1199
  /**
1170
- * @tsplus pipeable fncts.ImmutableArray take
1200
+ * @tsplus pipeable fncts.ReadonlyArray take
1171
1201
  */
1172
1202
  function take(n) {
1173
1203
  return self => {
1174
- return tsplus_module_4.slice(0, n)(self);
1204
+ return self.slice(0, n);
1175
1205
  };
1176
1206
  }
1177
1207
  /**
1178
- * @tsplus pipeable fncts.ImmutableArray takeLast
1208
+ * @tsplus pipeable fncts.ReadonlyArray takeLast
1179
1209
  */
1180
1210
  function takeLast(n) {
1181
1211
  return as => {
1182
- return isEmpty_1(as) ? tsplus_module_2.empty() : tsplus_module_4.slice(-n)(as);
1212
+ return isEmpty_1(as) ? [] : as.slice(-n);
1183
1213
  };
1184
1214
  }
1185
1215
  function takeWhile(p) {
@@ -1187,71 +1217,65 @@ function takeWhile(p) {
1187
1217
  const i = spanIndexLeft_1(p)(self);
1188
1218
  const init = Array(i);
1189
1219
  for (let j = 0; j < i; j++) {
1190
- init[j] = self._array[j];
1220
+ init[j] = self[j];
1191
1221
  }
1192
- return tsplus_module_2.asImmutableArray(init);
1222
+ return init;
1193
1223
  };
1194
1224
  }
1195
- function _traverseWithIndex_1(self) {
1196
- return G => f => foldLeftWithIndex_1(G.pure(tsplus_module_2.empty()), (i, fbs, a) => G.zipWith(f(i, a), (bs, b) => append_1(b)(bs))(fbs))(self);
1197
- }
1198
1225
  /**
1199
- * @tsplus getter fncts.ImmutableArray traverse
1226
+ * @tsplus getter fncts.ReadonlyArray traverse
1200
1227
  */
1201
- function _traverse_1(self) {
1202
- return G => f => _traverseWithIndex_1(self)(G)((_, a) => f(a));
1228
+ function traverse_1(self) {
1229
+ return G => f => traverseWithIndex_1(self)(G)((_, a) => f(a));
1230
+ }
1231
+ function traverseWithIndex_1(self) {
1232
+ return G => f => foldLeftWithIndex_1(G.pure(tsplus_module_13.empty()), (i, fbs, a) => G.zipWith(f(i, a), (bs, b) => append_1(b)(bs))(fbs))(self);
1203
1233
  }
1204
- const traverseWithIndex = G => f => self => _traverseWithIndex_1(self)(G)(f);
1234
+ const traverseWithIndex = G => f => self => traverseWithIndex_1(self)(G)(f);
1205
1235
  exports.traverseWithIndex = traverseWithIndex;
1206
- const traverse = G => f => self => _traverseWithIndex_1(self)(G)((_, a) => f(a));
1236
+ const traverse = G => f => self => traverseWithIndex_1(self)(G)((_, a) => f(a));
1207
1237
  /**
1208
- * @tsplus pipeable fncts.ImmutableArray union
1238
+ * @tsplus pipeable fncts.ReadonlyArray union
1209
1239
  */
1210
1240
  exports.traverse = traverse;
1211
1241
  function union(that, /** @tsplus auto */E) {
1212
1242
  return self => {
1213
- return concat_1(filter_1(a => !elem_1(a, E)(self))(that))(self);
1243
+ return self.concat(that.filter(a => !elem_1(a, E)(self)));
1214
1244
  };
1215
1245
  }
1216
1246
  /**
1217
- * @tsplus pipeable fncts.ImmutableArray uniq
1247
+ * @tsplus pipeable fncts.ReadonlyArray uniq
1218
1248
  */
1219
1249
  function uniq(/** @tsplus auto */E) {
1220
1250
  return self => {
1221
- if (length_1(self) === 1) {
1251
+ if (self.length === 1) {
1222
1252
  return self;
1223
1253
  }
1224
1254
  const out = [];
1225
- const len = length_1(self);
1255
+ const len = self.length;
1226
1256
  for (let i = 0; i < len; i++) {
1227
- const a = self._array[i];
1228
- if (!elem_1(a, E)(tsplus_module_2.asImmutableArray(out))) {
1257
+ const a = self[i];
1258
+ if (!elem_1(a, E)(out)) {
1229
1259
  out.push(a);
1230
1260
  }
1231
1261
  }
1232
- return tsplus_module_2.asImmutableArray(out);
1262
+ return out;
1233
1263
  };
1234
1264
  }
1235
1265
  /**
1236
- * @tsplus getter fncts.ImmutableArray unprepend
1266
+ * @tsplus getter fncts.ReadonlyArray unprepend
1237
1267
  */
1238
1268
  function unprepend(self) {
1239
- return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just([unsafeGet_1(self, 0), tsplus_module_4.slice(1)(self)], fileName_1 + ":1328:34") : tsplus_module_11.nothing(fileName_1 + ":1328:71");
1240
- }
1241
- /**
1242
- * @tsplus index fncts.ImmutableArray
1243
- */
1244
- function unsafeGet_1(self, i) {
1245
- return self._array[i];
1269
+ return isNonEmpty_1(self) ? tsplus_module_8.just([self[0], self.slice(1)], fileName_1 + ":1345:34") : tsplus_module_8.nothing(fileName_1 + ":1345:71");
1246
1270
  }
1247
1271
  /**
1248
- * @tsplus getter fncts.ImmutableArray unsafeAsMutable
1272
+ * @tsplus getter fncts.ReadonlyArray unsafeAsMutable
1249
1273
  */
1250
- function unsafeAsMutable_1(self) {
1251
- return self._array;
1274
+ function unsafeAsMutable(self) {
1275
+ return self;
1252
1276
  }
1253
1277
  /**
1254
- * @tsplus pipeable fncts.ImmutableArray unsafeDeleteAt
1278
+ * @tsplus pipeable fncts.ReadonlyArray unsafeDeleteAt
1255
1279
  */
1256
1280
  function unsafeDeleteAt_1(i) {
1257
1281
  return self => {
@@ -1261,7 +1285,7 @@ function unsafeDeleteAt_1(i) {
1261
1285
  };
1262
1286
  }
1263
1287
  /**
1264
- * @tsplus pipeable fncts.ImmutableArray unsafeInsertAt
1288
+ * @tsplus pipeable fncts.ReadonlyArray unsafeInsertAt
1265
1289
  */
1266
1290
  function unsafeInsertAt_1(i, a) {
1267
1291
  return as => {
@@ -1271,12 +1295,12 @@ function unsafeInsertAt_1(i, a) {
1271
1295
  };
1272
1296
  }
1273
1297
  /**
1274
- * @tsplus pipeable fncts.ImmutableArray unsafeModifyAt
1298
+ * @tsplus pipeable fncts.ReadonlyArray unsafeModifyAt
1275
1299
  */
1276
1300
  function unsafeModifyAt_1(i, f) {
1277
1301
  return as => {
1278
- const next = f(unsafeGet_1(as, i));
1279
- if (unsafeGet_1(as, i) === next) {
1302
+ const next = f(as[i]);
1303
+ if (as[i] === next) {
1280
1304
  return as;
1281
1305
  }
1282
1306
  return mutate_1(xs => {
@@ -1285,11 +1309,11 @@ function unsafeModifyAt_1(i, f) {
1285
1309
  };
1286
1310
  }
1287
1311
  /**
1288
- * @tsplus pipeable fncts.ImmutableArray unsafeUpdateAt
1312
+ * @tsplus pipeable fncts.ReadonlyArray unsafeUpdateAt
1289
1313
  */
1290
1314
  function unsafeUpdateAt_1(i, a) {
1291
1315
  return as => {
1292
- if (unsafeGet_1(as, i) === a) {
1316
+ if (as[i] === a) {
1293
1317
  return as;
1294
1318
  } else {
1295
1319
  return mutate_1(xs => {
@@ -1299,30 +1323,36 @@ function unsafeUpdateAt_1(i, a) {
1299
1323
  };
1300
1324
  }
1301
1325
  /**
1302
- * @tsplus getter fncts.ImmutableArray unzip
1326
+ * @tsplus getter fncts.ReadonlyArray unzip
1303
1327
  */
1304
1328
  function unzip(self) {
1305
- const fa = Array(length_1(self));
1306
- const fb = Array(length_1(self));
1307
- for (let i = 0; i < length_1(self); i++) {
1308
- fa[i] = self._array[i][0];
1309
- fb[i] = self._array[i][1];
1329
+ const fa = Array(self.length);
1330
+ const fb = Array(self.length);
1331
+ for (let i = 0; i < self.length; i++) {
1332
+ fa[i] = self[i][0];
1333
+ fb[i] = self[i][1];
1310
1334
  }
1311
- return [tsplus_module_2.asImmutableArray(fa), tsplus_module_2.asImmutableArray(fb)];
1335
+ return [fa, fb];
1312
1336
  }
1313
1337
  /**
1314
- * @tsplus pipeable fncts.ImmutableArray updateAt
1338
+ * @tsplus pipeable fncts.ReadonlyArray updateAt
1315
1339
  */
1316
1340
  function updateAt(i, a) {
1317
1341
  return as => {
1318
- return isOutOfBound_1(i)(as) ? tsplus_module_11.nothing(fileName_1 + ":1417:40") : tsplus_module_11.just(unsafeUpdateAt_1(i, a)(as), fileName_1 + ":1417:49");
1342
+ return isOutOfBound_1(i)(as) ? tsplus_module_8.nothing(fileName_1 + ":1427:40") : tsplus_module_8.just(unsafeUpdateAt_1(i, a)(as), fileName_1 + ":1427:49");
1319
1343
  };
1320
1344
  }
1321
1345
  /**
1322
- * @tsplus getter fncts.ImmutableArray wiltWithIndex
1346
+ * @tsplus getter fncts.ReadonlyArray wilt
1323
1347
  */
1324
- function _wiltWithIndex_1(self) {
1325
- return G => f => G.map(([b1s, b2s]) => [tsplus_module_2.asImmutableArray(b1s), tsplus_module_2.asImmutableArray(b2s)])(foldLeftWithIndex_1(G.pure([[], []]), (i, fbs, a) => G.zipWith(fbs, (eb, r) => tsplus_module_16.match(b1 => {
1348
+ function wilt_(self) {
1349
+ return G => f => wiltWithIndex_1(self)(G)((_, a) => f(a));
1350
+ }
1351
+ /**
1352
+ * @tsplus getter fncts.ReadonlyArray wiltWithIndex
1353
+ */
1354
+ function wiltWithIndex_1(self) {
1355
+ return G => f => G.map(([b1s, b2s]) => [b1s, b2s])(foldLeftWithIndex_1(G.pure([[], []]), (i, fbs, a) => G.zipWith(fbs, (eb, r) => tsplus_module_14.match(b1 => {
1326
1356
  r[0].push(b1);
1327
1357
  return r;
1328
1358
  }, b2 => {
@@ -1331,37 +1361,31 @@ function _wiltWithIndex_1(self) {
1331
1361
  })(eb))(f(i, a)))(self));
1332
1362
  }
1333
1363
  /**
1334
- * @tsplus getter fncts.ImmutableArray wilt
1364
+ * @tsplus getter fncts.ReadonlyArray wither
1335
1365
  */
1336
- function _wilt(self) {
1337
- return G => f => _wiltWithIndex_1(self)(G)((_, a) => f(a));
1366
+ function wither_(self) {
1367
+ return G => f => witherWithIndex_1(self)(G)((_, a) => f(a));
1338
1368
  }
1339
1369
  /**
1340
- * @tsplus getter fncts.ImmutableArray witherWithIndex
1370
+ * @tsplus getter fncts.ReadonlyArray witherWithIndex
1341
1371
  */
1342
- function _witherWithIndex_1(self) {
1343
- return G => f => G.map(bs => tsplus_module_2.asImmutableArray(bs))(foldLeftWithIndex_1(G.pure([]), (i, b, a) => G.zipWith(b, (maybeB, bs) => {
1344
- if (tsplus_module_6.isJust(maybeB)) {
1372
+ function witherWithIndex_1(self) {
1373
+ return G => f => G.map(bs => bs)(foldLeftWithIndex_1(G.pure([]), (i, b, a) => G.zipWith(b, (maybeB, bs) => {
1374
+ if (tsplus_module_2.isJust(maybeB)) {
1345
1375
  bs.push(maybeB.value);
1346
1376
  }
1347
1377
  return bs;
1348
1378
  })(f(i, a)))(self));
1349
1379
  }
1350
- /**
1351
- * @tsplus getter fncts.ImmutableArray wither
1352
- */
1353
- function _wither(self) {
1354
- return G => f => _witherWithIndex_1(self)(G)((_, a) => f(a));
1355
- }
1356
- const wiltWithIndex = G => f => self => _wiltWithIndex_1(self)(G)(f);
1380
+ const wiltWithIndex = G => f => self => wiltWithIndex_1(self)(G)(f);
1357
1381
  exports.wiltWithIndex = wiltWithIndex;
1358
- const wilt = G => f => self => _wiltWithIndex_1(self)(G)((_, a) => f(a));
1382
+ const wilt = G => f => self => wiltWithIndex_1(self)(G)((_, a) => f(a));
1359
1383
  exports.wilt = wilt;
1360
- const witherWithIndex = G => f => self => _witherWithIndex_1(self)(G)(f);
1384
+ const witherWithIndex = G => f => self => witherWithIndex_1(self)(G)(f);
1361
1385
  exports.witherWithIndex = witherWithIndex;
1362
- const wither = G => f => self => _witherWithIndex_1(self)(G)((_, a) => f(a));
1386
+ const wither = G => f => self => witherWithIndex_1(self)(G)((_, a) => f(a));
1363
1387
  /**
1364
- * @tsplus pipeable fncts.ImmutableArray zip
1388
+ * @tsplus pipeable fncts.ReadonlyArray zip
1365
1389
  */
1366
1390
  exports.wither = wither;
1367
1391
  function zip(that) {
@@ -1370,16 +1394,16 @@ function zip(that) {
1370
1394
  };
1371
1395
  }
1372
1396
  /**
1373
- * @tsplus pipeable fncts.ImmutableArray zipWith
1397
+ * @tsplus pipeable fncts.ReadonlyArray zipWith
1374
1398
  */
1375
1399
  function zipWith_1(fb, f) {
1376
1400
  return self => {
1377
- const len = Math.min(length_1(self), length_1(fb));
1401
+ const len = Math.min(self.length, fb.length);
1378
1402
  const fc = Array(len);
1379
1403
  for (let i = 0; i < len; i++) {
1380
- fc[i] = f(self._array[i], fb._array[i]);
1404
+ fc[i] = f(self[i], fb[i]);
1381
1405
  }
1382
- return tsplus_module_2.asImmutableArray(fc);
1406
+ return fc;
1383
1407
  };
1384
1408
  }
1385
1409
  //# sourceMappingURL=api.cjs.map