effect 4.0.0-beta.74 → 4.0.0-beta.75

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 (796) hide show
  1. package/dist/Array.d.ts +729 -611
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +273 -213
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +37 -30
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +19 -16
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +34 -40
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +16 -16
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +8 -8
  14. package/dist/Boolean.js +4 -4
  15. package/dist/Brand.d.ts +13 -11
  16. package/dist/Brand.d.ts.map +1 -1
  17. package/dist/Brand.js +10 -8
  18. package/dist/Brand.js.map +1 -1
  19. package/dist/Cause.d.ts +21 -23
  20. package/dist/Cause.d.ts.map +1 -1
  21. package/dist/Cause.js +21 -23
  22. package/dist/Cause.js.map +1 -1
  23. package/dist/Channel.d.ts +219 -9
  24. package/dist/Channel.d.ts.map +1 -1
  25. package/dist/Channel.js +83 -3
  26. package/dist/Channel.js.map +1 -1
  27. package/dist/ChannelSchema.d.ts +11 -11
  28. package/dist/ChannelSchema.js +5 -5
  29. package/dist/Chunk.d.ts +69 -16
  30. package/dist/Chunk.d.ts.map +1 -1
  31. package/dist/Chunk.js +43 -8
  32. package/dist/Chunk.js.map +1 -1
  33. package/dist/Clock.d.ts +3 -3
  34. package/dist/Clock.js +3 -3
  35. package/dist/Combiner.d.ts +9 -13
  36. package/dist/Combiner.d.ts.map +1 -1
  37. package/dist/Combiner.js +9 -13
  38. package/dist/Combiner.js.map +1 -1
  39. package/dist/Config.d.ts +49 -56
  40. package/dist/Config.d.ts.map +1 -1
  41. package/dist/Config.js +40 -43
  42. package/dist/Config.js.map +1 -1
  43. package/dist/ConfigProvider.d.ts +34 -44
  44. package/dist/ConfigProvider.d.ts.map +1 -1
  45. package/dist/ConfigProvider.js +24 -32
  46. package/dist/ConfigProvider.js.map +1 -1
  47. package/dist/Console.d.ts +2 -2
  48. package/dist/Console.js +2 -2
  49. package/dist/Context.d.ts +60 -72
  50. package/dist/Context.d.ts.map +1 -1
  51. package/dist/Context.js +28 -32
  52. package/dist/Context.js.map +1 -1
  53. package/dist/Cron.d.ts +2 -2
  54. package/dist/Cron.js +2 -2
  55. package/dist/Crypto.d.ts +4 -4
  56. package/dist/Crypto.js +4 -4
  57. package/dist/Data.d.ts +21 -15
  58. package/dist/Data.d.ts.map +1 -1
  59. package/dist/Data.js +7 -7
  60. package/dist/Data.js.map +1 -1
  61. package/dist/DateTime.d.ts +35 -16
  62. package/dist/DateTime.d.ts.map +1 -1
  63. package/dist/DateTime.js +35 -8
  64. package/dist/DateTime.js.map +1 -1
  65. package/dist/Deferred.d.ts +24 -15
  66. package/dist/Deferred.d.ts.map +1 -1
  67. package/dist/Deferred.js +8 -5
  68. package/dist/Deferred.js.map +1 -1
  69. package/dist/Duration.d.ts +44 -31
  70. package/dist/Duration.d.ts.map +1 -1
  71. package/dist/Duration.js +22 -11
  72. package/dist/Duration.js.map +1 -1
  73. package/dist/Effect.d.ts +516 -416
  74. package/dist/Effect.d.ts.map +1 -1
  75. package/dist/Effect.js +234 -174
  76. package/dist/Effect.js.map +1 -1
  77. package/dist/Encoding.d.ts +5 -0
  78. package/dist/Encoding.d.ts.map +1 -1
  79. package/dist/Encoding.js +5 -0
  80. package/dist/Encoding.js.map +1 -1
  81. package/dist/Equal.d.ts +26 -39
  82. package/dist/Equal.d.ts.map +1 -1
  83. package/dist/Equal.js +10 -17
  84. package/dist/Equal.js.map +1 -1
  85. package/dist/Equivalence.d.ts +71 -99
  86. package/dist/Equivalence.d.ts.map +1 -1
  87. package/dist/Equivalence.js +53 -73
  88. package/dist/Equivalence.js.map +1 -1
  89. package/dist/ErrorReporter.d.ts +1 -1
  90. package/dist/ErrorReporter.js +1 -1
  91. package/dist/Exit.d.ts +79 -96
  92. package/dist/Exit.d.ts.map +1 -1
  93. package/dist/Exit.js +57 -64
  94. package/dist/Exit.js.map +1 -1
  95. package/dist/Fiber.d.ts +8 -6
  96. package/dist/Fiber.d.ts.map +1 -1
  97. package/dist/Fiber.js +8 -6
  98. package/dist/Fiber.js.map +1 -1
  99. package/dist/FiberHandle.d.ts +25 -0
  100. package/dist/FiberHandle.d.ts.map +1 -1
  101. package/dist/FiberHandle.js +15 -0
  102. package/dist/FiberHandle.js.map +1 -1
  103. package/dist/FiberMap.d.ts +35 -0
  104. package/dist/FiberMap.d.ts.map +1 -1
  105. package/dist/FiberMap.js +15 -0
  106. package/dist/FiberMap.js.map +1 -1
  107. package/dist/FiberSet.d.ts +20 -0
  108. package/dist/FiberSet.d.ts.map +1 -1
  109. package/dist/FiberSet.js +10 -0
  110. package/dist/FiberSet.js.map +1 -1
  111. package/dist/Filter.d.ts +4 -4
  112. package/dist/Filter.js +4 -4
  113. package/dist/Formatter.d.ts +14 -19
  114. package/dist/Formatter.d.ts.map +1 -1
  115. package/dist/Formatter.js +14 -19
  116. package/dist/Formatter.js.map +1 -1
  117. package/dist/Function.d.ts +15 -16
  118. package/dist/Function.d.ts.map +1 -1
  119. package/dist/Function.js +9 -10
  120. package/dist/Function.js.map +1 -1
  121. package/dist/Graph.d.ts +2 -2
  122. package/dist/Graph.js +2 -2
  123. package/dist/HKT.d.ts +2 -2
  124. package/dist/Hash.d.ts +2 -1
  125. package/dist/Hash.d.ts.map +1 -1
  126. package/dist/Hash.js +2 -1
  127. package/dist/Hash.js.map +1 -1
  128. package/dist/HashMap.d.ts +15 -0
  129. package/dist/HashMap.d.ts.map +1 -1
  130. package/dist/HashMap.js +5 -0
  131. package/dist/HashMap.js.map +1 -1
  132. package/dist/HashRing.d.ts +9 -9
  133. package/dist/HashRing.js +3 -3
  134. package/dist/Iterable.d.ts +24 -12
  135. package/dist/Iterable.d.ts.map +1 -1
  136. package/dist/Iterable.js +16 -6
  137. package/dist/Iterable.js.map +1 -1
  138. package/dist/JsonPatch.d.ts +2 -3
  139. package/dist/JsonPatch.d.ts.map +1 -1
  140. package/dist/JsonPatch.js +2 -3
  141. package/dist/JsonPatch.js.map +1 -1
  142. package/dist/JsonPointer.d.ts +2 -6
  143. package/dist/JsonPointer.d.ts.map +1 -1
  144. package/dist/JsonPointer.js +2 -6
  145. package/dist/JsonPointer.js.map +1 -1
  146. package/dist/JsonSchema.d.ts +17 -13
  147. package/dist/JsonSchema.d.ts.map +1 -1
  148. package/dist/JsonSchema.js +17 -13
  149. package/dist/JsonSchema.js.map +1 -1
  150. package/dist/Latch.d.ts +4 -3
  151. package/dist/Latch.d.ts.map +1 -1
  152. package/dist/Latch.js +4 -3
  153. package/dist/Latch.js.map +1 -1
  154. package/dist/Layer.d.ts +92 -114
  155. package/dist/Layer.d.ts.map +1 -1
  156. package/dist/Layer.js +38 -46
  157. package/dist/Layer.js.map +1 -1
  158. package/dist/Logger.d.ts +11 -14
  159. package/dist/Logger.d.ts.map +1 -1
  160. package/dist/Logger.js +11 -14
  161. package/dist/Logger.js.map +1 -1
  162. package/dist/Match.d.ts +2 -2
  163. package/dist/Match.js +2 -2
  164. package/dist/Metric.d.ts +89 -109
  165. package/dist/Metric.d.ts.map +1 -1
  166. package/dist/Metric.js +51 -61
  167. package/dist/Metric.js.map +1 -1
  168. package/dist/MutableHashMap.d.ts +21 -12
  169. package/dist/MutableHashMap.d.ts.map +1 -1
  170. package/dist/MutableHashMap.js +7 -4
  171. package/dist/MutableHashMap.js.map +1 -1
  172. package/dist/MutableList.d.ts +15 -0
  173. package/dist/MutableList.d.ts.map +1 -1
  174. package/dist/MutableList.js +15 -0
  175. package/dist/MutableList.js.map +1 -1
  176. package/dist/MutableRef.d.ts +56 -42
  177. package/dist/MutableRef.d.ts.map +1 -1
  178. package/dist/MutableRef.js +28 -22
  179. package/dist/MutableRef.js.map +1 -1
  180. package/dist/Newtype.d.ts +10 -7
  181. package/dist/Newtype.d.ts.map +1 -1
  182. package/dist/Newtype.js +10 -7
  183. package/dist/Newtype.js.map +1 -1
  184. package/dist/Number.d.ts +23 -11
  185. package/dist/Number.d.ts.map +1 -1
  186. package/dist/Number.js +9 -5
  187. package/dist/Number.js.map +1 -1
  188. package/dist/Optic.d.ts +16 -16
  189. package/dist/Optic.d.ts.map +1 -1
  190. package/dist/Optic.js +10 -9
  191. package/dist/Optic.js.map +1 -1
  192. package/dist/Option.d.ts +196 -168
  193. package/dist/Option.d.ts.map +1 -1
  194. package/dist/Option.js +96 -79
  195. package/dist/Option.js.map +1 -1
  196. package/dist/Order.d.ts +118 -179
  197. package/dist/Order.d.ts.map +1 -1
  198. package/dist/Order.js +92 -144
  199. package/dist/Order.js.map +1 -1
  200. package/dist/PartitionedSemaphore.d.ts +14 -14
  201. package/dist/PartitionedSemaphore.js +6 -6
  202. package/dist/Path.d.ts +2 -2
  203. package/dist/Path.js +2 -2
  204. package/dist/Pipeable.d.ts +2 -2
  205. package/dist/Pipeable.js +2 -2
  206. package/dist/PlatformError.d.ts +4 -4
  207. package/dist/PlatformError.js +4 -4
  208. package/dist/Pool.d.ts +7 -11
  209. package/dist/Pool.d.ts.map +1 -1
  210. package/dist/Pool.js +3 -5
  211. package/dist/Pool.js.map +1 -1
  212. package/dist/Predicate.d.ts +274 -263
  213. package/dist/Predicate.d.ts.map +1 -1
  214. package/dist/Predicate.js +128 -123
  215. package/dist/Predicate.js.map +1 -1
  216. package/dist/PubSub.d.ts +24 -14
  217. package/dist/PubSub.d.ts.map +1 -1
  218. package/dist/PubSub.js +16 -6
  219. package/dist/PubSub.js.map +1 -1
  220. package/dist/Pull.d.ts +4 -4
  221. package/dist/Pull.js +4 -4
  222. package/dist/Queue.d.ts +46 -7
  223. package/dist/Queue.d.ts.map +1 -1
  224. package/dist/Queue.js +46 -7
  225. package/dist/Queue.js.map +1 -1
  226. package/dist/RcRef.d.ts +0 -4
  227. package/dist/RcRef.d.ts.map +1 -1
  228. package/dist/RcRef.js.map +1 -1
  229. package/dist/Redactable.d.ts +2 -2
  230. package/dist/Redactable.js +2 -2
  231. package/dist/Redacted.d.ts +3 -3
  232. package/dist/Redacted.js +3 -3
  233. package/dist/Reducer.d.ts +2 -3
  234. package/dist/Reducer.d.ts.map +1 -1
  235. package/dist/Reducer.js +2 -3
  236. package/dist/Reducer.js.map +1 -1
  237. package/dist/Ref.d.ts +17 -16
  238. package/dist/Ref.d.ts.map +1 -1
  239. package/dist/Ref.js +15 -14
  240. package/dist/Ref.js.map +1 -1
  241. package/dist/References.d.ts +4 -4
  242. package/dist/References.js +4 -4
  243. package/dist/Request.d.ts +18 -18
  244. package/dist/Request.js +6 -6
  245. package/dist/Resource.d.ts +2 -2
  246. package/dist/Resource.js +2 -2
  247. package/dist/Result.d.ts +77 -33
  248. package/dist/Result.d.ts.map +1 -1
  249. package/dist/Result.js +42 -19
  250. package/dist/Result.js.map +1 -1
  251. package/dist/Runtime.d.ts +11 -8
  252. package/dist/Runtime.d.ts.map +1 -1
  253. package/dist/Runtime.js +11 -8
  254. package/dist/Runtime.js.map +1 -1
  255. package/dist/Schedule.d.ts +107 -45
  256. package/dist/Schedule.d.ts.map +1 -1
  257. package/dist/Schedule.js +41 -29
  258. package/dist/Schedule.js.map +1 -1
  259. package/dist/Scheduler.d.ts +6 -4
  260. package/dist/Scheduler.d.ts.map +1 -1
  261. package/dist/Scheduler.js +6 -4
  262. package/dist/Scheduler.js.map +1 -1
  263. package/dist/Schema.d.ts +443 -371
  264. package/dist/Schema.d.ts.map +1 -1
  265. package/dist/Schema.js +518 -427
  266. package/dist/Schema.js.map +1 -1
  267. package/dist/SchemaAST.d.ts +42 -21
  268. package/dist/SchemaAST.d.ts.map +1 -1
  269. package/dist/SchemaAST.js +80 -59
  270. package/dist/SchemaAST.js.map +1 -1
  271. package/dist/SchemaGetter.d.ts +126 -106
  272. package/dist/SchemaGetter.d.ts.map +1 -1
  273. package/dist/SchemaGetter.js +121 -101
  274. package/dist/SchemaGetter.js.map +1 -1
  275. package/dist/SchemaIssue.d.ts +37 -39
  276. package/dist/SchemaIssue.d.ts.map +1 -1
  277. package/dist/SchemaIssue.js +16 -17
  278. package/dist/SchemaIssue.js.map +1 -1
  279. package/dist/SchemaParser.d.ts +72 -153
  280. package/dist/SchemaParser.d.ts.map +1 -1
  281. package/dist/SchemaParser.js +72 -145
  282. package/dist/SchemaParser.js.map +1 -1
  283. package/dist/SchemaRepresentation.d.ts +30 -21
  284. package/dist/SchemaRepresentation.d.ts.map +1 -1
  285. package/dist/SchemaRepresentation.js +26 -22
  286. package/dist/SchemaRepresentation.js.map +1 -1
  287. package/dist/SchemaTransformation.d.ts +169 -145
  288. package/dist/SchemaTransformation.d.ts.map +1 -1
  289. package/dist/SchemaTransformation.js +183 -159
  290. package/dist/SchemaTransformation.js.map +1 -1
  291. package/dist/SchemaUtils.js +2 -2
  292. package/dist/SchemaUtils.js.map +1 -1
  293. package/dist/Scope.d.ts +15 -0
  294. package/dist/Scope.d.ts.map +1 -1
  295. package/dist/Scope.js +15 -0
  296. package/dist/Scope.js.map +1 -1
  297. package/dist/ScopedCache.d.ts +1 -1
  298. package/dist/ScopedCache.js +1 -1
  299. package/dist/ScopedRef.d.ts +14 -18
  300. package/dist/ScopedRef.d.ts.map +1 -1
  301. package/dist/ScopedRef.js +6 -8
  302. package/dist/ScopedRef.js.map +1 -1
  303. package/dist/Semaphore.d.ts +9 -9
  304. package/dist/Semaphore.js +3 -3
  305. package/dist/Sink.d.ts +13 -13
  306. package/dist/Sink.d.ts.map +1 -1
  307. package/dist/Sink.js +9 -9
  308. package/dist/Sink.js.map +1 -1
  309. package/dist/Stdio.d.ts +4 -5
  310. package/dist/Stdio.d.ts.map +1 -1
  311. package/dist/Stdio.js +4 -5
  312. package/dist/Stdio.js.map +1 -1
  313. package/dist/Stream.d.ts +321 -44
  314. package/dist/Stream.d.ts.map +1 -1
  315. package/dist/Stream.js +137 -22
  316. package/dist/Stream.js.map +1 -1
  317. package/dist/String.d.ts +6 -9
  318. package/dist/String.d.ts.map +1 -1
  319. package/dist/String.js +2 -3
  320. package/dist/String.js.map +1 -1
  321. package/dist/Struct.d.ts +15 -13
  322. package/dist/Struct.d.ts.map +1 -1
  323. package/dist/Struct.js +11 -9
  324. package/dist/Struct.js.map +1 -1
  325. package/dist/SubscriptionRef.d.ts +24 -19
  326. package/dist/SubscriptionRef.d.ts.map +1 -1
  327. package/dist/SubscriptionRef.js +12 -7
  328. package/dist/SubscriptionRef.js.map +1 -1
  329. package/dist/SynchronizedRef.d.ts +88 -63
  330. package/dist/SynchronizedRef.d.ts.map +1 -1
  331. package/dist/SynchronizedRef.js +32 -23
  332. package/dist/SynchronizedRef.js.map +1 -1
  333. package/dist/Tracer.d.ts +4 -4
  334. package/dist/Tracer.js +4 -4
  335. package/dist/Trie.d.ts +15 -0
  336. package/dist/Trie.d.ts.map +1 -1
  337. package/dist/Trie.js +5 -0
  338. package/dist/Trie.js.map +1 -1
  339. package/dist/Tuple.d.ts +25 -19
  340. package/dist/Tuple.d.ts.map +1 -1
  341. package/dist/Tuple.js +17 -13
  342. package/dist/Tuple.js.map +1 -1
  343. package/dist/TxReentrantLock.d.ts +6 -3
  344. package/dist/TxReentrantLock.d.ts.map +1 -1
  345. package/dist/TxReentrantLock.js +2 -1
  346. package/dist/TxReentrantLock.js.map +1 -1
  347. package/dist/TxRef.d.ts +16 -16
  348. package/dist/TxRef.js +8 -8
  349. package/dist/TxSubscriptionRef.d.ts +43 -27
  350. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  351. package/dist/TxSubscriptionRef.js +19 -13
  352. package/dist/TxSubscriptionRef.js.map +1 -1
  353. package/dist/Types.d.ts +12 -38
  354. package/dist/Types.d.ts.map +1 -1
  355. package/dist/Types.js +0 -2
  356. package/dist/UndefinedOr.d.ts +15 -14
  357. package/dist/UndefinedOr.d.ts.map +1 -1
  358. package/dist/UndefinedOr.js +11 -10
  359. package/dist/UndefinedOr.js.map +1 -1
  360. package/dist/Unify.d.ts +2 -2
  361. package/dist/internal/schema/annotations.js.map +1 -1
  362. package/dist/internal/schema/arbitrary.js +9 -9
  363. package/dist/internal/schema/arbitrary.js.map +1 -1
  364. package/dist/internal/schema/equivalence.js +9 -9
  365. package/dist/internal/schema/equivalence.js.map +1 -1
  366. package/dist/internal/schema/representation.js +14 -14
  367. package/dist/internal/schema/representation.js.map +1 -1
  368. package/dist/internal/schema/schema.js +11 -11
  369. package/dist/internal/schema/schema.js.map +1 -1
  370. package/dist/testing/TestSchema.d.ts +10 -10
  371. package/dist/testing/TestSchema.d.ts.map +1 -1
  372. package/dist/testing/TestSchema.js +9 -9
  373. package/dist/testing/TestSchema.js.map +1 -1
  374. package/dist/unstable/ai/AiError.d.ts +4 -2
  375. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  376. package/dist/unstable/ai/AiError.js +4 -2
  377. package/dist/unstable/ai/AiError.js.map +1 -1
  378. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +17 -20
  379. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
  380. package/dist/unstable/ai/AnthropicStructuredOutput.js +36 -39
  381. package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
  382. package/dist/unstable/ai/Chat.d.ts +4 -5
  383. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  384. package/dist/unstable/ai/Chat.js +4 -5
  385. package/dist/unstable/ai/Chat.js.map +1 -1
  386. package/dist/unstable/ai/EmbeddingModel.d.ts +4 -4
  387. package/dist/unstable/ai/EmbeddingModel.js +4 -4
  388. package/dist/unstable/ai/IdGenerator.d.ts +2 -3
  389. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  390. package/dist/unstable/ai/IdGenerator.js +2 -3
  391. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  392. package/dist/unstable/ai/LanguageModel.d.ts +3 -2
  393. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  394. package/dist/unstable/ai/LanguageModel.js +5 -4
  395. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  396. package/dist/unstable/ai/McpSchema.d.ts +14 -12
  397. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  398. package/dist/unstable/ai/McpSchema.js +19 -17
  399. package/dist/unstable/ai/McpSchema.js.map +1 -1
  400. package/dist/unstable/ai/McpServer.d.ts +11 -4
  401. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  402. package/dist/unstable/ai/McpServer.js +8 -5
  403. package/dist/unstable/ai/McpServer.js.map +1 -1
  404. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +20 -18
  405. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
  406. package/dist/unstable/ai/OpenAiStructuredOutput.js +45 -43
  407. package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
  408. package/dist/unstable/ai/Prompt.d.ts +2 -2
  409. package/dist/unstable/ai/Prompt.js +3 -3
  410. package/dist/unstable/ai/Prompt.js.map +1 -1
  411. package/dist/unstable/ai/ResponseIdTracker.d.ts +3 -2
  412. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
  413. package/dist/unstable/ai/ResponseIdTracker.js +3 -2
  414. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  415. package/dist/unstable/ai/Telemetry.d.ts +21 -6
  416. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  417. package/dist/unstable/ai/Telemetry.js +7 -2
  418. package/dist/unstable/ai/Telemetry.js.map +1 -1
  419. package/dist/unstable/ai/Tool.d.ts +7 -6
  420. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  421. package/dist/unstable/ai/Tool.js +8 -7
  422. package/dist/unstable/ai/Tool.js.map +1 -1
  423. package/dist/unstable/ai/Toolkit.d.ts +2 -2
  424. package/dist/unstable/ai/Toolkit.js +2 -2
  425. package/dist/unstable/cli/Command.d.ts +37 -16
  426. package/dist/unstable/cli/Command.d.ts.map +1 -1
  427. package/dist/unstable/cli/Command.js +15 -8
  428. package/dist/unstable/cli/Command.js.map +1 -1
  429. package/dist/unstable/cli/Completions.d.ts +1 -1
  430. package/dist/unstable/cli/Completions.js +1 -1
  431. package/dist/unstable/cli/Flag.d.ts +7 -6
  432. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  433. package/dist/unstable/cli/Flag.js +7 -6
  434. package/dist/unstable/cli/Flag.js.map +1 -1
  435. package/dist/unstable/cli/GlobalFlag.d.ts +6 -1
  436. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  437. package/dist/unstable/cli/GlobalFlag.js +7 -2
  438. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  439. package/dist/unstable/cli/Param.d.ts +3 -3
  440. package/dist/unstable/cli/Param.d.ts.map +1 -1
  441. package/dist/unstable/cli/Param.js +13 -10
  442. package/dist/unstable/cli/Param.js.map +1 -1
  443. package/dist/unstable/cli/Primitive.d.ts +3 -2
  444. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  445. package/dist/unstable/cli/Primitive.js +3 -2
  446. package/dist/unstable/cli/Primitive.js.map +1 -1
  447. package/dist/unstable/cluster/ClusterCron.d.ts +1 -2
  448. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  449. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  450. package/dist/unstable/cluster/ClusterMetrics.d.ts +5 -0
  451. package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
  452. package/dist/unstable/cluster/ClusterMetrics.js +5 -0
  453. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  454. package/dist/unstable/cluster/ClusterSchema.d.ts +3 -3
  455. package/dist/unstable/cluster/ClusterSchema.js +3 -3
  456. package/dist/unstable/cluster/ClusterWorkflowEngine.js +15 -15
  457. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  458. package/dist/unstable/cluster/EntityResource.d.ts +10 -0
  459. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  460. package/dist/unstable/cluster/EntityResource.js +10 -0
  461. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  462. package/dist/unstable/cluster/Envelope.d.ts +2 -2
  463. package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
  464. package/dist/unstable/cluster/Envelope.js +2 -2
  465. package/dist/unstable/cluster/Envelope.js.map +1 -1
  466. package/dist/unstable/cluster/Reply.d.ts +2 -2
  467. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  468. package/dist/unstable/cluster/Reply.js +12 -12
  469. package/dist/unstable/cluster/Reply.js.map +1 -1
  470. package/dist/unstable/cluster/RunnerHealth.d.ts +2 -1
  471. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  472. package/dist/unstable/cluster/RunnerHealth.js +2 -1
  473. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  474. package/dist/unstable/cluster/RunnerServer.d.ts +2 -2
  475. package/dist/unstable/cluster/RunnerServer.js +2 -2
  476. package/dist/unstable/cluster/Runners.d.ts +3 -3
  477. package/dist/unstable/cluster/Runners.js +3 -3
  478. package/dist/unstable/cluster/ShardId.js +3 -3
  479. package/dist/unstable/cluster/ShardId.js.map +1 -1
  480. package/dist/unstable/cluster/Sharding.d.ts +3 -3
  481. package/dist/unstable/cluster/Sharding.js +3 -3
  482. package/dist/unstable/cluster/ShardingConfig.d.ts +4 -4
  483. package/dist/unstable/cluster/ShardingConfig.js +4 -4
  484. package/dist/unstable/cluster/Snowflake.d.ts +1 -1
  485. package/dist/unstable/cluster/Snowflake.js +3 -3
  486. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  487. package/dist/unstable/cluster/internal/entityManager.js +2 -2
  488. package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
  489. package/dist/unstable/encoding/Msgpack.d.ts +2 -2
  490. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  491. package/dist/unstable/encoding/Msgpack.js +5 -5
  492. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  493. package/dist/unstable/encoding/Ndjson.d.ts +5 -0
  494. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  495. package/dist/unstable/encoding/Ndjson.js +5 -0
  496. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  497. package/dist/unstable/encoding/Sse.d.ts +2 -2
  498. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  499. package/dist/unstable/encoding/Sse.js +2 -2
  500. package/dist/unstable/encoding/Sse.js.map +1 -1
  501. package/dist/unstable/eventlog/EventGroup.d.ts +2 -1
  502. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  503. package/dist/unstable/eventlog/EventGroup.js +2 -1
  504. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  505. package/dist/unstable/eventlog/EventJournal.d.ts +10 -0
  506. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  507. package/dist/unstable/eventlog/EventJournal.js +10 -0
  508. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  509. package/dist/unstable/eventlog/EventLog.d.ts +3 -3
  510. package/dist/unstable/eventlog/EventLog.js +3 -3
  511. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +2 -3
  512. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  513. package/dist/unstable/eventlog/EventLogServerEncrypted.js +2 -3
  514. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  515. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +5 -7
  516. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  517. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +5 -7
  518. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  519. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +4 -4
  520. package/dist/unstable/eventlog/EventLogSessionAuth.js +4 -4
  521. package/dist/unstable/http/Cookies.js +4 -4
  522. package/dist/unstable/http/Cookies.js.map +1 -1
  523. package/dist/unstable/http/Etag.d.ts +2 -3
  524. package/dist/unstable/http/Etag.d.ts.map +1 -1
  525. package/dist/unstable/http/Etag.js +2 -3
  526. package/dist/unstable/http/Etag.js.map +1 -1
  527. package/dist/unstable/http/Headers.js +2 -2
  528. package/dist/unstable/http/Headers.js.map +1 -1
  529. package/dist/unstable/http/HttpBody.js +2 -2
  530. package/dist/unstable/http/HttpBody.js.map +1 -1
  531. package/dist/unstable/http/HttpClient.d.ts +2 -2
  532. package/dist/unstable/http/HttpClient.js +2 -2
  533. package/dist/unstable/http/HttpClientRequest.d.ts +30 -3
  534. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  535. package/dist/unstable/http/HttpClientRequest.js +10 -1
  536. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  537. package/dist/unstable/http/HttpRouter.d.ts +1 -1
  538. package/dist/unstable/http/HttpRouter.js +1 -1
  539. package/dist/unstable/http/HttpServerResponse.d.ts +25 -20
  540. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  541. package/dist/unstable/http/HttpServerResponse.js +13 -8
  542. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  543. package/dist/unstable/http/Multipart.js +3 -3
  544. package/dist/unstable/http/Multipart.js.map +1 -1
  545. package/dist/unstable/http/UrlParams.d.ts +30 -0
  546. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  547. package/dist/unstable/http/UrlParams.js +16 -6
  548. package/dist/unstable/http/UrlParams.js.map +1 -1
  549. package/dist/unstable/httpapi/HttpApi.d.ts +3 -2
  550. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  551. package/dist/unstable/httpapi/HttpApi.js +3 -2
  552. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  553. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  554. package/dist/unstable/httpapi/HttpApiBuilder.js +10 -8
  555. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  556. package/dist/unstable/httpapi/HttpApiClient.js +15 -15
  557. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  558. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +3 -3
  559. package/dist/unstable/httpapi/HttpApiMiddleware.js +3 -3
  560. package/dist/unstable/httpapi/HttpApiSchema.d.ts +2 -2
  561. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  562. package/dist/unstable/httpapi/HttpApiSchema.js +9 -9
  563. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  564. package/dist/unstable/httpapi/OpenApi.js +11 -11
  565. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  566. package/dist/unstable/observability/OtlpResource.d.ts +5 -0
  567. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  568. package/dist/unstable/observability/OtlpResource.js +5 -0
  569. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  570. package/dist/unstable/observability/PrometheusMetrics.d.ts +4 -2
  571. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  572. package/dist/unstable/observability/PrometheusMetrics.js +4 -2
  573. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  574. package/dist/unstable/reactivity/Atom.d.ts +3 -3
  575. package/dist/unstable/reactivity/Atom.js +3 -3
  576. package/dist/unstable/rpc/RpcSchema.d.ts +2 -2
  577. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  578. package/dist/unstable/rpc/RpcSerialization.d.ts +2 -2
  579. package/dist/unstable/rpc/RpcSerialization.js +2 -2
  580. package/dist/unstable/schema/Model.js +5 -5
  581. package/dist/unstable/schema/Model.js.map +1 -1
  582. package/dist/unstable/schema/VariantSchema.d.ts +2 -2
  583. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  584. package/dist/unstable/sql/SqlSchema.d.ts +4 -4
  585. package/dist/unstable/sql/SqlSchema.js +4 -4
  586. package/dist/unstable/workers/Transferable.d.ts +2 -2
  587. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  588. package/dist/unstable/workers/Transferable.js +5 -5
  589. package/dist/unstable/workers/Transferable.js.map +1 -1
  590. package/dist/unstable/workflow/DurableDeferred.js +7 -7
  591. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  592. package/dist/unstable/workflow/DurableQueue.d.ts +1 -2
  593. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  594. package/dist/unstable/workflow/DurableQueue.js +1 -2
  595. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  596. package/dist/unstable/workflow/Workflow.d.ts +35 -15
  597. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  598. package/dist/unstable/workflow/Workflow.js +94 -72
  599. package/dist/unstable/workflow/Workflow.js.map +1 -1
  600. package/dist/unstable/workflow/WorkflowEngine.d.ts +10 -2
  601. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  602. package/dist/unstable/workflow/WorkflowEngine.js +16 -8
  603. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  604. package/dist/unstable/workflow/WorkflowProxy.d.ts +2 -4
  605. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  606. package/dist/unstable/workflow/WorkflowProxy.js +9 -11
  607. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  608. package/dist/unstable/workflow/WorkflowProxyServer.js +7 -7
  609. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  610. package/package.json +1 -1
  611. package/src/Array.ts +729 -611
  612. package/src/BigDecimal.ts +37 -30
  613. package/src/BigInt.ts +34 -40
  614. package/src/Boolean.ts +8 -8
  615. package/src/Brand.ts +16 -14
  616. package/src/Cause.ts +21 -23
  617. package/src/Channel.ts +249 -9
  618. package/src/ChannelSchema.ts +11 -11
  619. package/src/Chunk.ts +69 -16
  620. package/src/Clock.ts +3 -3
  621. package/src/Combiner.ts +9 -13
  622. package/src/Config.ts +60 -67
  623. package/src/ConfigProvider.ts +34 -44
  624. package/src/Console.ts +2 -2
  625. package/src/Context.ts +60 -72
  626. package/src/Cron.ts +2 -2
  627. package/src/Crypto.ts +4 -4
  628. package/src/Data.ts +21 -15
  629. package/src/DateTime.ts +35 -16
  630. package/src/Deferred.ts +24 -15
  631. package/src/Duration.ts +44 -31
  632. package/src/Effect.ts +516 -416
  633. package/src/Encoding.ts +5 -0
  634. package/src/Equal.ts +26 -39
  635. package/src/Equivalence.ts +71 -99
  636. package/src/ErrorReporter.ts +1 -1
  637. package/src/Exit.ts +79 -96
  638. package/src/Fiber.ts +8 -6
  639. package/src/FiberHandle.ts +25 -0
  640. package/src/FiberMap.ts +35 -0
  641. package/src/FiberSet.ts +20 -0
  642. package/src/Filter.ts +4 -4
  643. package/src/Formatter.ts +14 -19
  644. package/src/Function.ts +15 -16
  645. package/src/Graph.ts +2 -2
  646. package/src/HKT.ts +2 -2
  647. package/src/Hash.ts +2 -1
  648. package/src/HashMap.ts +15 -0
  649. package/src/HashRing.ts +9 -9
  650. package/src/Iterable.ts +24 -12
  651. package/src/JsonPatch.ts +2 -3
  652. package/src/JsonPointer.ts +2 -6
  653. package/src/JsonSchema.ts +17 -13
  654. package/src/Latch.ts +4 -3
  655. package/src/Layer.ts +92 -114
  656. package/src/Logger.ts +15 -18
  657. package/src/Match.ts +2 -2
  658. package/src/Metric.ts +109 -137
  659. package/src/MutableHashMap.ts +35 -20
  660. package/src/MutableList.ts +15 -0
  661. package/src/MutableRef.ts +56 -42
  662. package/src/Newtype.ts +10 -7
  663. package/src/Number.ts +23 -11
  664. package/src/Optic.ts +25 -22
  665. package/src/Option.ts +196 -168
  666. package/src/Order.ts +118 -179
  667. package/src/PartitionedSemaphore.ts +14 -14
  668. package/src/Path.ts +2 -2
  669. package/src/Pipeable.ts +2 -2
  670. package/src/PlatformError.ts +4 -4
  671. package/src/Pool.ts +7 -11
  672. package/src/Predicate.ts +274 -263
  673. package/src/PubSub.ts +24 -14
  674. package/src/Pull.ts +4 -4
  675. package/src/Queue.ts +46 -7
  676. package/src/RcRef.ts +0 -4
  677. package/src/Redactable.ts +2 -2
  678. package/src/Redacted.ts +3 -3
  679. package/src/Reducer.ts +2 -3
  680. package/src/Ref.ts +43 -40
  681. package/src/References.ts +4 -4
  682. package/src/Request.ts +18 -18
  683. package/src/Resource.ts +2 -2
  684. package/src/Result.ts +87 -33
  685. package/src/Runtime.ts +11 -8
  686. package/src/Schedule.ts +112 -45
  687. package/src/Scheduler.ts +6 -4
  688. package/src/Schema.ts +843 -649
  689. package/src/SchemaAST.ts +148 -117
  690. package/src/SchemaGetter.ts +142 -121
  691. package/src/SchemaIssue.ts +39 -41
  692. package/src/SchemaParser.ts +173 -229
  693. package/src/SchemaRepresentation.ts +38 -28
  694. package/src/SchemaTransformation.ts +233 -207
  695. package/src/SchemaUtils.ts +2 -2
  696. package/src/Scope.ts +15 -0
  697. package/src/ScopedCache.ts +1 -1
  698. package/src/ScopedRef.ts +14 -18
  699. package/src/Semaphore.ts +9 -9
  700. package/src/Sink.ts +13 -13
  701. package/src/Stdio.ts +4 -5
  702. package/src/Stream.ts +354 -57
  703. package/src/String.ts +6 -9
  704. package/src/Struct.ts +15 -13
  705. package/src/SubscriptionRef.ts +24 -19
  706. package/src/SynchronizedRef.ts +88 -63
  707. package/src/Tracer.ts +4 -4
  708. package/src/Trie.ts +15 -0
  709. package/src/Tuple.ts +25 -19
  710. package/src/TxReentrantLock.ts +6 -3
  711. package/src/TxRef.ts +16 -16
  712. package/src/TxSubscriptionRef.ts +43 -27
  713. package/src/Types.ts +12 -39
  714. package/src/UndefinedOr.ts +15 -14
  715. package/src/Unify.ts +2 -2
  716. package/src/internal/schema/annotations.ts +4 -4
  717. package/src/internal/schema/arbitrary.ts +16 -16
  718. package/src/internal/schema/equivalence.ts +11 -11
  719. package/src/internal/schema/representation.ts +23 -23
  720. package/src/internal/schema/schema.ts +17 -17
  721. package/src/testing/TestSchema.ts +20 -20
  722. package/src/unstable/ai/AiError.ts +4 -2
  723. package/src/unstable/ai/AnthropicStructuredOutput.ts +59 -56
  724. package/src/unstable/ai/Chat.ts +4 -5
  725. package/src/unstable/ai/EmbeddingModel.ts +4 -4
  726. package/src/unstable/ai/IdGenerator.ts +2 -3
  727. package/src/unstable/ai/LanguageModel.ts +5 -4
  728. package/src/unstable/ai/McpSchema.ts +19 -17
  729. package/src/unstable/ai/McpServer.ts +14 -7
  730. package/src/unstable/ai/OpenAiStructuredOutput.ts +72 -61
  731. package/src/unstable/ai/Prompt.ts +5 -5
  732. package/src/unstable/ai/ResponseIdTracker.ts +3 -2
  733. package/src/unstable/ai/Telemetry.ts +21 -6
  734. package/src/unstable/ai/Tool.ts +11 -10
  735. package/src/unstable/ai/Toolkit.ts +2 -2
  736. package/src/unstable/cli/Command.ts +37 -16
  737. package/src/unstable/cli/Completions.ts +1 -1
  738. package/src/unstable/cli/Flag.ts +7 -6
  739. package/src/unstable/cli/GlobalFlag.ts +7 -1
  740. package/src/unstable/cli/Param.ts +23 -18
  741. package/src/unstable/cli/Primitive.ts +3 -2
  742. package/src/unstable/cluster/ClusterCron.ts +1 -2
  743. package/src/unstable/cluster/ClusterMetrics.ts +5 -0
  744. package/src/unstable/cluster/ClusterSchema.ts +3 -3
  745. package/src/unstable/cluster/ClusterWorkflowEngine.ts +15 -15
  746. package/src/unstable/cluster/EntityResource.ts +10 -0
  747. package/src/unstable/cluster/Envelope.ts +3 -3
  748. package/src/unstable/cluster/Reply.ts +14 -12
  749. package/src/unstable/cluster/RunnerHealth.ts +2 -1
  750. package/src/unstable/cluster/RunnerServer.ts +2 -2
  751. package/src/unstable/cluster/Runners.ts +3 -3
  752. package/src/unstable/cluster/ShardId.ts +3 -3
  753. package/src/unstable/cluster/Sharding.ts +3 -3
  754. package/src/unstable/cluster/ShardingConfig.ts +4 -4
  755. package/src/unstable/cluster/Snowflake.ts +3 -3
  756. package/src/unstable/cluster/internal/entityManager.ts +2 -2
  757. package/src/unstable/encoding/Msgpack.ts +6 -6
  758. package/src/unstable/encoding/Ndjson.ts +5 -0
  759. package/src/unstable/encoding/Sse.ts +2 -2
  760. package/src/unstable/eventlog/EventGroup.ts +2 -1
  761. package/src/unstable/eventlog/EventJournal.ts +10 -0
  762. package/src/unstable/eventlog/EventLog.ts +3 -3
  763. package/src/unstable/eventlog/EventLogServerEncrypted.ts +2 -3
  764. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +5 -7
  765. package/src/unstable/eventlog/EventLogSessionAuth.ts +4 -4
  766. package/src/unstable/http/Cookies.ts +4 -4
  767. package/src/unstable/http/Etag.ts +2 -3
  768. package/src/unstable/http/Headers.ts +2 -2
  769. package/src/unstable/http/HttpBody.ts +2 -2
  770. package/src/unstable/http/HttpClient.ts +2 -2
  771. package/src/unstable/http/HttpClientRequest.ts +30 -3
  772. package/src/unstable/http/HttpRouter.ts +1 -1
  773. package/src/unstable/http/HttpServerResponse.ts +25 -20
  774. package/src/unstable/http/Multipart.ts +3 -3
  775. package/src/unstable/http/UrlParams.ts +36 -6
  776. package/src/unstable/httpapi/HttpApi.ts +5 -4
  777. package/src/unstable/httpapi/HttpApiBuilder.ts +14 -13
  778. package/src/unstable/httpapi/HttpApiClient.ts +16 -16
  779. package/src/unstable/httpapi/HttpApiMiddleware.ts +3 -3
  780. package/src/unstable/httpapi/HttpApiSchema.ts +15 -15
  781. package/src/unstable/httpapi/OpenApi.ts +18 -18
  782. package/src/unstable/observability/OtlpResource.ts +5 -0
  783. package/src/unstable/observability/PrometheusMetrics.ts +4 -2
  784. package/src/unstable/reactivity/Atom.ts +3 -3
  785. package/src/unstable/rpc/RpcSchema.ts +2 -2
  786. package/src/unstable/rpc/RpcSerialization.ts +2 -2
  787. package/src/unstable/schema/Model.ts +5 -5
  788. package/src/unstable/schema/VariantSchema.ts +2 -2
  789. package/src/unstable/sql/SqlSchema.ts +4 -4
  790. package/src/unstable/workers/Transferable.ts +6 -6
  791. package/src/unstable/workflow/DurableDeferred.ts +7 -7
  792. package/src/unstable/workflow/DurableQueue.ts +1 -2
  793. package/src/unstable/workflow/Workflow.ts +159 -114
  794. package/src/unstable/workflow/WorkflowEngine.ts +16 -8
  795. package/src/unstable/workflow/WorkflowProxy.ts +9 -11
  796. package/src/unstable/workflow/WorkflowProxyServer.ts +7 -7
package/dist/Array.js CHANGED
@@ -122,9 +122,12 @@ export const Array = globalThis.Array;
122
122
  *
123
123
  * **When to use**
124
124
  *
125
- * Use when you have literal values and want a typed non-empty array.
126
- * - The element type is inferred as the union of all arguments.
127
- * - Always returns a `NonEmptyArray` since at least one argument is required.
125
+ * Use when you need to create a typed non-empty array from literal values.
126
+ *
127
+ * **Details**
128
+ *
129
+ * The element type is inferred as the union of all arguments. Because at least
130
+ * one argument is required, this always returns a `NonEmptyArray`.
128
131
  *
129
132
  * **Example** (Creating an array from values)
130
133
  *
@@ -147,9 +150,11 @@ export const make = (...elements) => elements;
147
150
  *
148
151
  * **When to use**
149
152
  *
150
- * Use when you need a pre-sized array and will fill it imperatively.
151
- * - Elements are typed as `A | undefined` since slots are empty.
152
- * - Prefer {@link makeBy} when you can compute each element from its index.
153
+ * Use when you need a pre-sized array that will be filled imperatively.
154
+ *
155
+ * **Details**
156
+ *
157
+ * Elements are typed as `A | undefined` because the slots are empty.
153
158
  *
154
159
  * **Example** (Allocating a fixed-size array)
155
160
  *
@@ -171,9 +176,13 @@ export const allocate = n => new Array(n);
171
176
  *
172
177
  * **When to use**
173
178
  *
174
- * Use when you need an array whose values depend on the index.
175
- * - `n` is normalized to an integer >= 1 — always returns at least one element.
176
- * - Dual: `Array.makeBy(5, f)` or `pipe(5, Array.makeBy(f))`.
179
+ * Use when you need to compute each array element from its index.
180
+ *
181
+ * **Details**
182
+ *
183
+ * `n` is normalized to an integer greater than or equal to 1, so this function
184
+ * always returns at least one element. Supports both data-first and data-last
185
+ * usage.
177
186
  *
178
187
  * **Example** (Generating values from indices)
179
188
  *
@@ -204,9 +213,11 @@ export const makeBy = /*#__PURE__*/dual(2, (n, f) => {
204
213
  *
205
214
  * **When to use**
206
215
  *
207
- * Use when you need a sequence of consecutive integers.
208
- * - If `start > end`, returns `[start]`.
209
- * - Always returns a `NonEmptyArray`.
216
+ * Use when you need a non-empty sequence of consecutive integers.
217
+ *
218
+ * **Details**
219
+ *
220
+ * If `start > end`, returns `[start]`.
210
221
  *
211
222
  * **Example** (Creating a range)
212
223
  *
@@ -228,9 +239,13 @@ export const range = (start, end) => start <= end ? makeBy(end - start + 1, i =>
228
239
  *
229
240
  * **When to use**
230
241
  *
231
- * Use when you need multiple copies of the same value.
232
- * - `n` is normalized to an integer >= 1 — always returns at least one element.
233
- * - Dual: `Array.replicate("a", 3)` or `pipe("a", Array.replicate(3))`.
242
+ * Use when you need a non-empty array containing repeated copies of one value.
243
+ *
244
+ * **Details**
245
+ *
246
+ * `n` is normalized to an integer greater than or equal to 1, so this function
247
+ * always returns at least one element. Supports both data-first and data-last
248
+ * usage.
234
249
  *
235
250
  * **Example** (Repeating a value)
236
251
  *
@@ -256,10 +271,9 @@ export const replicate = /*#__PURE__*/dual(2, (a, n) => makeBy(n, () => a));
256
271
  *
257
272
  * **Details**
258
273
  *
259
- * - If the input is already an array, returns it **by reference** (no copy).
260
- * - Otherwise, creates a new array from the iterable.
261
- * - Use {@link copy} if you need a fresh array even when the input is already
262
- * an array.
274
+ * If the input is already an array, this returns it by reference without
275
+ * copying. Otherwise, it creates a new array from the iterable. Use `copy` if
276
+ * you need a fresh array even when the input is already an array.
263
277
  *
264
278
  * **Example** (Converting a Set to an array)
265
279
  *
@@ -287,9 +301,9 @@ export const fromIterable = collection => Array.isArray(collection) ? collection
287
301
  *
288
302
  * **Details**
289
303
  *
290
- * - If the input is already an array, returns it by reference.
291
- * - If the input is a single value, wraps it in a one-element array.
292
- * - Useful for APIs that accept `A | Array<A>`.
304
+ * If the input is already an array, this returns it by reference. If the input
305
+ * is a single value, this wraps it in a one-element array. This is useful for
306
+ * APIs that accept `A | Array<A>`.
293
307
  *
294
308
  * **Example** (Normalizing input)
295
309
  *
@@ -317,8 +331,8 @@ export const ensure = self => Array.isArray(self) ? self : [self];
317
331
  *
318
332
  * **Details**
319
333
  *
320
- * - Key order follows `Object.entries` semantics.
321
- * - Returns an empty array for an empty record.
334
+ * Key order follows `Object.entries` semantics. Empty records produce an empty
335
+ * array.
322
336
  *
323
337
  * **Example** (Record to entries)
324
338
  *
@@ -363,9 +377,12 @@ export const fromOption = Option.toArray;
363
377
  *
364
378
  * **When to use**
365
379
  *
366
- * Use when you need to branch on whether an array has elements.
367
- * - `onNonEmpty` receives a `NonEmptyReadonlyArray`.
368
- * - Dual: data-first or data-last.
380
+ * Use when you need to branch on whether an array is empty.
381
+ *
382
+ * **Details**
383
+ *
384
+ * `onNonEmpty` receives a `NonEmptyReadonlyArray`. Supports both data-first and
385
+ * data-last usage.
369
386
  *
370
387
  * **Example** (Branching on emptiness)
371
388
  *
@@ -396,8 +413,8 @@ export const match = /*#__PURE__*/dual(2, (self, {
396
413
  *
397
414
  * **When to use**
398
415
  *
399
- * Use to pattern-match when you need the first element and remaining elements as
400
- * separate values.
416
+ * Use when you need to branch on an array and handle the non-empty case as the
417
+ * first element plus the remaining elements.
401
418
  *
402
419
  * **Details**
403
420
  *
@@ -432,8 +449,8 @@ export const matchLeft = /*#__PURE__*/dual(2, (self, {
432
449
  *
433
450
  * **When to use**
434
451
  *
435
- * Use to pattern-match when you need all but the last element and the last element
436
- * as separate values.
452
+ * Use when you need to branch on an array and handle the non-empty case as the
453
+ * elements before the last plus the last element.
437
454
  *
438
455
  * **Details**
439
456
  *
@@ -467,11 +484,8 @@ export const matchRight = /*#__PURE__*/dual(2, (self, {
467
484
  *
468
485
  * **When to use**
469
486
  *
470
- * Use to add a single element at the start of an iterable and get a `NonEmptyArray`.
471
- *
472
- * **Details**
473
- *
474
- * - Always returns a non-empty array.
487
+ * Use when you need to guarantee a non-empty result after adding a required
488
+ * leading value.
475
489
  *
476
490
  * **Example** (Prepending an element)
477
491
  *
@@ -498,7 +512,7 @@ export const prepend = /*#__PURE__*/dual(2, (self, head) => [head, ...self]);
498
512
  *
499
513
  * **Details**
500
514
  *
501
- * - If either input is non-empty, the result is a `NonEmptyArray`.
515
+ * If either input is non-empty, the result is a `NonEmptyArray`.
502
516
  *
503
517
  * **Example** (Prepending multiple elements)
504
518
  *
@@ -521,12 +535,8 @@ export const prependAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(that
521
535
  *
522
536
  * **When to use**
523
537
  *
524
- * Use to add one element to the end of an iterable and get a new
525
- * `NonEmptyArray`.
526
- *
527
- * **Details**
528
- *
529
- * - Always returns a non-empty array.
538
+ * Use when you need to guarantee a non-empty result after adding a required
539
+ * trailing value.
530
540
  *
531
541
  * **Example** (Appending an element)
532
542
  *
@@ -554,7 +564,7 @@ export const append = /*#__PURE__*/dual(2, (self, last) => [...self, last]);
554
564
  *
555
565
  * **Details**
556
566
  *
557
- * - If either input is non-empty, the result is a `NonEmptyArray`.
567
+ * If either input is non-empty, the result is a `NonEmptyArray`.
558
568
  *
559
569
  * **Example** (Concatenating arrays)
560
570
  *
@@ -581,9 +591,9 @@ export const appendAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(self)
581
591
  *
582
592
  * **Details**
583
593
  *
584
- * - The output length is `input.length + 1` (starts with the initial value).
585
- * - Always returns a `NonEmptyArray` because the initial value is included.
586
- * - Use {@link reduce} if you only need the final accumulated value.
594
+ * The output length is `input.length + 1` because it starts with the initial
595
+ * value. The result is always a `NonEmptyArray`. Use `reduce` if you only need
596
+ * the final accumulated value.
587
597
  *
588
598
  * **Example** (Running totals)
589
599
  *
@@ -619,8 +629,8 @@ export const scan = /*#__PURE__*/dual(3, (self, b, f) => {
619
629
  *
620
630
  * **Details**
621
631
  *
622
- * - The output length is `input.length + 1` (ends with the initial value).
623
- * - Always returns a `NonEmptyArray`.
632
+ * The output length is `input.length + 1` because it ends with the initial
633
+ * value. The result is always a `NonEmptyArray`.
624
634
  *
625
635
  * **Example** (Reverse running totals)
626
636
  *
@@ -655,8 +665,8 @@ export const scanRight = /*#__PURE__*/dual(3, (self, b, f) => {
655
665
  *
656
666
  * **Details**
657
667
  *
658
- * - Acts as a type guard narrowing the input to `Array<unknown>`.
659
- * - Delegates to `globalThis.Array.isArray`.
668
+ * Acts as a type guard narrowing the input to `Array<unknown>` and delegates to
669
+ * `globalThis.Array.isArray`.
660
670
  *
661
671
  * **Example** (Type-guarding an unknown value)
662
672
  *
@@ -716,6 +726,11 @@ export const isReadonlyArrayEmpty = isArrayEmpty;
716
726
  * Checks whether a mutable `Array` is non-empty, narrowing the type to
717
727
  * `NonEmptyArray`.
718
728
  *
729
+ * **When to use**
730
+ *
731
+ * Use when you need the narrowed value to remain a mutable `Array` after proving
732
+ * it has at least one element.
733
+ *
719
734
  * **Example** (Checking for a non-empty array)
720
735
  *
721
736
  * ```ts
@@ -736,6 +751,11 @@ export const isArrayNonEmpty = internalArray.isArrayNonEmpty;
736
751
  * Checks whether a `ReadonlyArray` is non-empty, narrowing the type to
737
752
  * `NonEmptyReadonlyArray`.
738
753
  *
754
+ * **When to use**
755
+ *
756
+ * Use when you need to prove a readonly array has at least one element without
757
+ * requiring mutable array methods afterward.
758
+ *
739
759
  * **Example** (Checking for a non-empty readonly array)
740
760
  *
741
761
  * ```ts
@@ -787,8 +807,7 @@ const clamp = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length));
787
807
  *
788
808
  * **Details**
789
809
  *
790
- * - The index is floored to an integer.
791
- * - Never throws.
810
+ * The index is floored to an integer. This never throws.
792
811
  *
793
812
  * **Example** (Safe index access)
794
813
  *
@@ -815,13 +834,13 @@ export const get = /*#__PURE__*/dual(2, (self, index) => {
815
834
  *
816
835
  * **When to use**
817
836
  *
818
- * Use to read an element at a known valid index when out-of-bounds would be a
819
- * programming error.
837
+ * Use to read an array element at a known valid index when out-of-bounds would
838
+ * be a programming error.
820
839
  *
821
840
  * **Details**
822
841
  *
823
- * - Throws an `Error` with the message `"Index out of bounds: <i>"`.
824
- * - Prefer {@link get} for safe access.
842
+ * Throws an `Error` with the message `"Index out of bounds: <i>"`. Prefer
843
+ * `get` for safe access.
825
844
  *
826
845
  * **Example** (Unsafe index access)
827
846
  *
@@ -854,8 +873,7 @@ export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
854
873
  *
855
874
  * **Details**
856
875
  *
857
- * - Returns a tuple `[head, tail]`.
858
- * - Requires a `NonEmptyReadonlyArray`.
876
+ * Returns a tuple `[head, tail]` and requires a `NonEmptyReadonlyArray`.
859
877
  *
860
878
  * **Example** (Destructuring head and tail)
861
879
  *
@@ -880,13 +898,12 @@ export const unprepend = self => [headNonEmpty(self), tailNonEmpty(self)];
880
898
  *
881
899
  * **When to use**
882
900
  *
883
- * Use to split a non-empty array from the end when you need both the elements
884
- * before the last element and the last element.
901
+ * Use when you need to split a non-empty array into the elements before the
902
+ * last element and the last element.
885
903
  *
886
904
  * **Details**
887
905
  *
888
- * - Returns a tuple `[init, last]`.
889
- * - Requires a `NonEmptyReadonlyArray`.
906
+ * Returns a tuple `[init, last]` and requires a `NonEmptyReadonlyArray`.
890
907
  *
891
908
  * **Example** (Destructuring init and last)
892
909
  *
@@ -1008,8 +1025,7 @@ export const lastNonEmpty = self => self[self.length - 1];
1008
1025
  *
1009
1026
  * **Details**
1010
1027
  *
1011
- * - Allocates a new array via `slice(1)`.
1012
- * - Returns `Option.none()` for empty inputs.
1028
+ * Allocates a new array via `slice(1)`. Empty inputs return `Option.none()`.
1013
1029
  *
1014
1030
  * **Example** (Getting the tail)
1015
1031
  *
@@ -1061,8 +1077,8 @@ export const tailNonEmpty = self => self.slice(1);
1061
1077
  *
1062
1078
  * **Details**
1063
1079
  *
1064
- * - Allocates a new array via `slice(0, -1)`.
1065
- * - Returns `Option.none()` for empty inputs.
1080
+ * Allocates a new array via `slice(0, -1)`. Empty inputs return
1081
+ * `Option.none()`.
1066
1082
  *
1067
1083
  * **Example** (Getting init)
1068
1084
  *
@@ -1114,8 +1130,7 @@ export const initNonEmpty = self => self.slice(0, -1);
1114
1130
  *
1115
1131
  * **Details**
1116
1132
  *
1117
- * - `n` is clamped to `[0, length]`.
1118
- * - Returns an empty array when `n <= 0`.
1133
+ * `n` is clamped to `[0, length]`. Returns an empty array when `n <= 0`.
1119
1134
  *
1120
1135
  * **Example** (Taking from the start)
1121
1136
  *
@@ -1145,8 +1160,7 @@ export const take = /*#__PURE__*/dual(2, (self, n) => {
1145
1160
  *
1146
1161
  * **Details**
1147
1162
  *
1148
- * - `n` is clamped to `[0, length]`.
1149
- * - Returns an empty array when `n <= 0`.
1163
+ * `n` is clamped to `[0, length]`. Returns an empty array when `n <= 0`.
1150
1164
  *
1151
1165
  * **Example** (Taking from the end)
1152
1166
  *
@@ -1178,8 +1192,8 @@ export const takeRight = /*#__PURE__*/dual(2, (self, n) => {
1178
1192
  *
1179
1193
  * **Details**
1180
1194
  *
1181
- * - Supports refinements for type narrowing.
1182
- * - The predicate receives `(element, index)`.
1195
+ * Supports refinements for type narrowing. The predicate receives
1196
+ * `(element, index)`.
1183
1197
  *
1184
1198
  * **Example** (Taking while condition holds)
1185
1199
  *
@@ -1213,14 +1227,14 @@ export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1213
1227
  *
1214
1228
  * **When to use**
1215
1229
  *
1216
- * Use when you need to take a prefix of elements while a function can
1217
- * successfully extract or transform them, stopping at the first element
1230
+ * Use when you need to take a prefix from an iterable while a function can
1231
+ * successfully extract or transform elements, stopping at the first element
1218
1232
  * that produces a failure result.
1219
1233
  *
1220
1234
  * **Details**
1221
1235
  *
1222
- * - The filter receives `(element, index)`.
1223
- * - Stops at the first filter failure.
1236
+ * The filter receives `(element, index)` and processing stops at the first
1237
+ * filter failure.
1224
1238
  *
1225
1239
  * @see {@link takeWhile} for taking a prefix based on a boolean predicate
1226
1240
  *
@@ -1256,14 +1270,14 @@ const spanIndex = (self, predicate) => {
1256
1270
  *
1257
1271
  * **When to use**
1258
1272
  *
1259
- * Use to split an iterable into the longest prefix that satisfies a predicate
1260
- * and the elements after that prefix when you need both parts.
1273
+ * Use when you need both the longest predicate-matching prefix and the
1274
+ * remaining elements.
1261
1275
  *
1262
1276
  * **Details**
1263
1277
  *
1264
- * - Equivalent to `[takeWhile(pred), dropWhile(pred)]` but more efficient
1265
- * (single pass).
1266
- * - Supports refinements for type narrowing of the prefix.
1278
+ * Equivalent to `[takeWhile(pred), dropWhile(pred)]`, but more efficient
1279
+ * because it runs in a single pass. Supports refinements for type narrowing of
1280
+ * the prefix.
1267
1281
  *
1268
1282
  * **Example** (Splitting at predicate boundary)
1269
1283
  *
@@ -1294,8 +1308,8 @@ export const span = /*#__PURE__*/dual(2, (self, predicate) => {
1294
1308
  *
1295
1309
  * **Details**
1296
1310
  *
1297
- * - `n` is clamped to `[0, length]`.
1298
- * - Returns a copy of the full array when `n <= 0`.
1311
+ * `n` is clamped to `[0, length]`. When `n <= 0`, this returns a copy of the
1312
+ * full array.
1299
1313
  *
1300
1314
  * **Example** (Dropping from the start)
1301
1315
  *
@@ -1386,13 +1400,13 @@ export const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1386
1400
  *
1387
1401
  * **When to use**
1388
1402
  *
1389
- * Use when dropping a prefix requires computing a `Result` per element instead
1390
- * of a simple boolean predicate.
1403
+ * Use when you need to drop a prefix from an iterable by computing a `Result`
1404
+ * per element instead of using a simple boolean predicate.
1391
1405
  *
1392
1406
  * **Details**
1393
1407
  *
1394
- * - The filter receives `(element, index)`.
1395
- * - Returns the remaining original elements after the first filter failure.
1408
+ * The filter receives `(element, index)`. The result contains the remaining
1409
+ * original elements after the first filter failure.
1396
1410
  *
1397
1411
  * @see {@link dropWhile} for dropping a prefix with a simple boolean predicate
1398
1412
  * @see {@link takeWhileFilter} for keeping only the matching prefix
@@ -1486,9 +1500,9 @@ export const findLastIndex = /*#__PURE__*/dual(2, (self, predicate) => {
1486
1500
  *
1487
1501
  * **Details**
1488
1502
  *
1489
- * - Accepts a predicate `(a, i) => boolean`, a refinement, or a function
1490
- * `(a, i) => Option<B>` for simultaneous find-and-transform.
1491
- * - Returns `Option.none()` if no element matches.
1503
+ * Accepts a predicate `(a, i) => boolean`, a refinement, or a function
1504
+ * `(a, i) => Option<B>` for simultaneous find-and-transform. If no element
1505
+ * matches, this returns `Option.none()`.
1492
1506
  *
1493
1507
  * **Example** (Finding the first match)
1494
1508
  *
@@ -1561,8 +1575,8 @@ export const findFirstWithIndex = /*#__PURE__*/dual(2, (self, f) => {
1561
1575
  *
1562
1576
  * **Details**
1563
1577
  *
1564
- * - Searches from the end of the array.
1565
- * - Returns `Option.none()` if no element matches.
1578
+ * Searches from the end of the array. If no element matches, this returns
1579
+ * `Option.none()`.
1566
1580
  *
1567
1581
  * **Example** (Finding the last match)
1568
1582
  *
@@ -1605,7 +1619,7 @@ export const findLast = /*#__PURE__*/dual(2, (self, f) => {
1605
1619
  *
1606
1620
  * **Details**
1607
1621
  *
1608
- * - Valid indices: `0` to `length` (inclusive inserting at `length` appends).
1622
+ * Valid indices are `0` to `length`, inclusive. Inserting at `length` appends.
1609
1623
  *
1610
1624
  * **Example** (Inserting at an index)
1611
1625
  *
@@ -1639,7 +1653,7 @@ export const insertAt = /*#__PURE__*/dual(3, (self, i, b) => {
1639
1653
  *
1640
1654
  * **Details**
1641
1655
  *
1642
- * - Returns `Option.none()` when the index is out of bounds.
1656
+ * Returns `Option.none()` when the index is out of bounds.
1643
1657
  *
1644
1658
  * **Example** (Replacing an element)
1645
1659
  *
@@ -1662,12 +1676,12 @@ export const replace = /*#__PURE__*/dual(3, (self, i, b) => modify(self, i, () =
1662
1676
  *
1663
1677
  * **When to use**
1664
1678
  *
1665
- * Use to derive a replacement value from the current element at a specific
1666
- * index while leaving the other elements unchanged.
1679
+ * Use to derive a replacement value from an array element at a specific index
1680
+ * while leaving the other elements unchanged.
1667
1681
  *
1668
1682
  * **Details**
1669
1683
  *
1670
- * - Returns `Option.none()` when the index is out of bounds.
1684
+ * Returns `Option.none()` when the index is out of bounds.
1671
1685
  *
1672
1686
  * **Example** (Modifying an element)
1673
1687
  *
@@ -1701,7 +1715,8 @@ export const modify = /*#__PURE__*/dual(3, (self, i, f) => {
1701
1715
  *
1702
1716
  * **When to use**
1703
1717
  *
1704
- * Use to remove a single element at a known index.
1718
+ * Use when you want a missing index to be a no-op and need a fresh array result
1719
+ * instead of an optional failure.
1705
1720
  *
1706
1721
  * **Example** (Removing an element)
1707
1722
  *
@@ -1731,11 +1746,12 @@ export const remove = /*#__PURE__*/dual(2, (self, i) => {
1731
1746
  *
1732
1747
  * **When to use**
1733
1748
  *
1734
- * Use to reverse the order of elements without mutating the original input.
1749
+ * Use to reverse an iterable into a new array without mutating the original
1750
+ * input.
1735
1751
  *
1736
1752
  * **Details**
1737
1753
  *
1738
- * - Preserves `NonEmptyArray` in the return type.
1754
+ * Preserves `NonEmptyArray` in the return type.
1739
1755
  *
1740
1756
  * **Example** (Reversing an array)
1741
1757
  *
@@ -1758,9 +1774,8 @@ export const reverse = self => Array.from(self).reverse();
1758
1774
  *
1759
1775
  * **Details**
1760
1776
  *
1761
- * - Preserves `NonEmptyArray` in the return type.
1762
- * - Use {@link sortWith} to sort by a derived key, or {@link sortBy} for
1763
- * multi-key sorting.
1777
+ * Preserves `NonEmptyArray` in the return type. Use `sortWith` to sort by a
1778
+ * derived key, or `sortBy` for multi-key sorting.
1764
1779
  *
1765
1780
  * **Example** (Sorting numbers)
1766
1781
  *
@@ -1787,12 +1802,12 @@ export const sort = /*#__PURE__*/dual(2, (self, O) => {
1787
1802
  *
1788
1803
  * **When to use**
1789
1804
  *
1790
- * Use when values need to be sorted by a derived key, such as a string length
1791
- * or object field, while the output should keep the original values.
1805
+ * Use when you need to sort values by a derived key, such as a string length or
1806
+ * object field, while keeping the original values.
1792
1807
  *
1793
1808
  * **Details**
1794
1809
  *
1795
- * - Equivalent to `sort(Order.mapInput(order, f))` but more convenient.
1810
+ * Equivalent to `sort(Order.mapInput(order, f))`, but more convenient.
1796
1811
  *
1797
1812
  * **Example** (Sorting strings by length)
1798
1813
  *
@@ -1821,8 +1836,8 @@ export const sortWith = /*#__PURE__*/dual(3, (self, f, order) => Array.from(self
1821
1836
  *
1822
1837
  * **Details**
1823
1838
  *
1824
- * - Data-last only (returns a function).
1825
- * - Preserves `NonEmptyArray` in the return type.
1839
+ * This is data-last only and returns a function. The return type preserves
1840
+ * `NonEmptyArray`.
1826
1841
  *
1827
1842
  * **Example** (Multi-key sorting)
1828
1843
  *
@@ -1868,11 +1883,11 @@ export const sortBy = (...orders) => {
1868
1883
  *
1869
1884
  * **When to use**
1870
1885
  *
1871
- * Use to pair corresponding elements from two iterables when you need simple pairs without a custom combiner.
1886
+ * Use when you need simple pairs of corresponding elements from two iterables.
1872
1887
  *
1873
1888
  * **Details**
1874
1889
  *
1875
- * - Returns `NonEmptyArray` when both inputs are non-empty.
1890
+ * Returns `NonEmptyArray` when both inputs are non-empty.
1876
1891
  *
1877
1892
  * **Example** (Zipping two arrays)
1878
1893
  *
@@ -1893,6 +1908,11 @@ export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, Tupl
1893
1908
  * Combines elements from two iterables pairwise using a function. If the
1894
1909
  * iterables differ in length, extra elements are discarded.
1895
1910
  *
1911
+ * **When to use**
1912
+ *
1913
+ * Use when zipping two iterables in an array pipeline and each pair should
1914
+ * become a computed array element instead of a tuple.
1915
+ *
1896
1916
  * **Example** (Zipping with addition)
1897
1917
  *
1898
1918
  * ```ts
@@ -1957,8 +1977,8 @@ export const unzip = self => {
1957
1977
  *
1958
1978
  * **Details**
1959
1979
  *
1960
- * - Preserves `NonEmptyArray` in the return type.
1961
- * - An empty input produces an empty result.
1980
+ * The return type preserves `NonEmptyArray`. Empty inputs produce an empty
1981
+ * result.
1962
1982
  *
1963
1983
  * **Example** (Interspersing a separator)
1964
1984
  *
@@ -2014,6 +2034,11 @@ export const modifyHeadNonEmpty = /*#__PURE__*/dual(2, (self, f) => [f(headNonEm
2014
2034
  /**
2015
2035
  * Replaces the first element of a non-empty array with a new value.
2016
2036
  *
2037
+ * **When to use**
2038
+ *
2039
+ * Use when you already know the array is non-empty and the replacement value
2040
+ * does not depend on the current first element.
2041
+ *
2017
2042
  * **Example** (Setting the head)
2018
2043
  *
2019
2044
  * ```ts
@@ -2033,6 +2058,11 @@ export const setHeadNonEmpty = /*#__PURE__*/dual(2, (self, b) => modifyHeadNonEm
2033
2058
  * Applies a function to the last element of a non-empty array, returning a
2034
2059
  * new array.
2035
2060
  *
2061
+ * **When to use**
2062
+ *
2063
+ * Use when you already know the array is non-empty and the new last element
2064
+ * depends on the current last element.
2065
+ *
2036
2066
  * **Example** (Modifying the last element)
2037
2067
  *
2038
2068
  * ```ts
@@ -2051,6 +2081,11 @@ export const modifyLastNonEmpty = /*#__PURE__*/dual(2, (self, f) => append(initN
2051
2081
  /**
2052
2082
  * Replaces the last element of a non-empty array with a new value.
2053
2083
  *
2084
+ * **When to use**
2085
+ *
2086
+ * Use when you already know the array is non-empty and the replacement value
2087
+ * does not depend on the current last element.
2088
+ *
2054
2089
  * **Example** (Setting the last element)
2055
2090
  *
2056
2091
  * ```ts
@@ -2077,9 +2112,9 @@ export const setLastNonEmpty = /*#__PURE__*/dual(2, (self, b) => modifyLastNonEm
2077
2112
  *
2078
2113
  * **Details**
2079
2114
  *
2080
- * - `n` is rounded to the nearest integer before rotating.
2081
- * - Preserves `NonEmptyArray` in the return type.
2082
- * - Returns a copy for empty arrays or when the normalized rotation is `0`.
2115
+ * `n` is rounded to the nearest integer before rotating. The return type
2116
+ * preserves `NonEmptyArray`. Empty arrays, or rotations normalized to `0`,
2117
+ * return a copy.
2083
2118
  *
2084
2119
  * **Example** (Rotating elements)
2085
2120
  *
@@ -2148,8 +2183,8 @@ export const containsWith = isEquivalent => dual(2, (self, a) => {
2148
2183
  *
2149
2184
  * **When to use**
2150
2185
  *
2151
- * Use to check membership with Effect's default equality instead of providing a
2152
- * comparison function.
2186
+ * Use to check whether an iterable contains a value using Effect's default
2187
+ * equality instead of providing a comparison function.
2153
2188
  *
2154
2189
  * **Example** (Checking membership)
2155
2190
  *
@@ -2171,15 +2206,13 @@ export const contains = /*#__PURE__*/containsWith(/*#__PURE__*/Equal.asEquivalen
2171
2206
  *
2172
2207
  * **When to use**
2173
2208
  *
2174
- * Use when the grouping logic is custom and each step needs to return both a
2175
- * value and the remaining input.
2209
+ * Use when you need custom grouping logic where each step returns both a value
2210
+ * and the remaining input.
2176
2211
  *
2177
2212
  * **Details**
2178
2213
  *
2179
- * - The function receives a `NonEmptyReadonlyArray` and returns
2180
- * `[value, rest]`.
2181
- * - Continues until the remaining array is empty.
2182
- * - Useful for custom splitting/grouping logic.
2214
+ * The function receives a `NonEmptyReadonlyArray` and returns `[value, rest]`.
2215
+ * Processing continues until the remaining array is empty.
2183
2216
  *
2184
2217
  * **Example** (Chopping an array)
2185
2218
  *
@@ -2223,8 +2256,8 @@ export const chop = /*#__PURE__*/dual(2, (self, f) => {
2223
2256
  *
2224
2257
  * **Details**
2225
2258
  *
2226
- * - `n` can be `0` (all elements in the second array).
2227
- * - `n` is floored to an integer.
2259
+ * `n` can be `0`, in which case all elements are placed in the second array.
2260
+ * The index is floored to an integer.
2228
2261
  *
2229
2262
  * **Example** (Splitting at an index)
2230
2263
  *
@@ -2255,6 +2288,11 @@ export const splitAt = /*#__PURE__*/dual(2, (self, n) => {
2255
2288
  * Splits a non-empty array into two parts at the given index. The first part
2256
2289
  * is guaranteed to be non-empty (`n` is clamped to >= 1).
2257
2290
  *
2291
+ * **When to use**
2292
+ *
2293
+ * Use when downstream code requires the left side of the split to contain at
2294
+ * least one element.
2295
+ *
2258
2296
  * **Example** (Splitting a non-empty array)
2259
2297
  *
2260
2298
  * ```ts
@@ -2282,8 +2320,7 @@ export const splitAtNonEmpty = /*#__PURE__*/dual(2, (self, n) => {
2282
2320
  *
2283
2321
  * **Details**
2284
2322
  *
2285
- * - Uses `chunksOf(ceil(length / n))` internally.
2286
- * - The last chunk may be shorter.
2323
+ * Uses `chunksOf(ceil(length / n))` internally. The last chunk may be shorter.
2287
2324
  *
2288
2325
  * **Example** (Splitting into groups)
2289
2326
  *
@@ -2308,7 +2345,8 @@ export const split = /*#__PURE__*/dual(2, (self, n) => {
2308
2345
  *
2309
2346
  * **When to use**
2310
2347
  *
2311
- * Use to split an array at a condition boundary when you know which element marks the transition point.
2348
+ * Use when you need to split an array at the first element that marks a
2349
+ * condition boundary.
2312
2350
  *
2313
2351
  * **Example** (Splitting at a condition)
2314
2352
  *
@@ -2335,8 +2373,8 @@ export const splitWhere = /*#__PURE__*/dual(2, (self, predicate) => span(self, (
2335
2373
  *
2336
2374
  * **Details**
2337
2375
  *
2338
- * - Preserves `NonEmptyArray` in the return type.
2339
- * - Useful when you need a distinct reference (e.g. before mutating).
2376
+ * The return type preserves `NonEmptyArray`. Use this when you need a distinct
2377
+ * reference, for example before mutating the returned array.
2340
2378
  *
2341
2379
  * **Example** (Copying an array)
2342
2380
  *
@@ -2365,7 +2403,7 @@ export const copy = self => self.slice();
2365
2403
  *
2366
2404
  * **Details**
2367
2405
  *
2368
- * - Returns an empty array when `n <= 0`.
2406
+ * Returns an empty array when `n <= 0`.
2369
2407
  *
2370
2408
  * **Example** (Padding an array)
2371
2409
  *
@@ -2393,14 +2431,13 @@ export const pad = /*#__PURE__*/dual(3, (self, n, fill) => {
2393
2431
  *
2394
2432
  * **When to use**
2395
2433
  *
2396
- * Use to divide an iterable into non-overlapping chunks with a maximum chunk
2397
- * size.
2434
+ * Use to divide an iterable into a new array of non-overlapping chunks with a
2435
+ * maximum chunk size.
2398
2436
  *
2399
2437
  * **Details**
2400
2438
  *
2401
- * - `chunksOf(n)([])` is `[]`, not `[[]]`.
2402
- * - Each chunk is a `NonEmptyArray`.
2403
- * - Preserves `NonEmptyArray` in the outer return type.
2439
+ * `chunksOf(n)([])` is `[]`, not `[[]]`. Each chunk is a `NonEmptyArray`, and
2440
+ * the outer return type preserves `NonEmptyArray`.
2404
2441
  *
2405
2442
  * **Example** (Chunking an array)
2406
2443
  *
@@ -2432,8 +2469,8 @@ export const chunksOf = /*#__PURE__*/dual(2, (self, n) => {
2432
2469
  *
2433
2470
  * **Details**
2434
2471
  *
2435
- * - Returns an empty array if `n <= 0` or the array has fewer than `n` elements.
2436
- * - Each window is a tuple of exactly `n` elements.
2472
+ * Returns an empty array if `n <= 0` or the array has fewer than `n` elements.
2473
+ * Each window is a tuple of exactly `n` elements.
2437
2474
  *
2438
2475
  * **Example** (Sliding windows)
2439
2476
  *
@@ -2463,13 +2500,13 @@ export const window = /*#__PURE__*/dual(2, (self, n) => {
2463
2500
  *
2464
2501
  * **When to use**
2465
2502
  *
2466
- * Use when a non-empty array is already arranged so matching elements are
2467
- * adjacent and you need a custom equivalence function.
2503
+ * Use when you already have a non-empty array arranged so matching elements are
2504
+ * adjacent and need a custom equivalence function.
2468
2505
  *
2469
2506
  * **Details**
2470
2507
  *
2471
- * - Only groups **adjacent** elements non-adjacent duplicates stay separate.
2472
- * - Requires a `NonEmptyReadonlyArray`.
2508
+ * Only adjacent elements are grouped. Non-adjacent duplicates stay separate.
2509
+ * Requires a `NonEmptyReadonlyArray`.
2473
2510
  *
2474
2511
  * **Example** (Grouping consecutive equal elements)
2475
2512
  *
@@ -2505,12 +2542,12 @@ export const groupWith = /*#__PURE__*/dual(2, (self, isEquivalent) => chop(self,
2505
2542
  *
2506
2543
  * **When to use**
2507
2544
  *
2508
- * Use when equal values are already adjacent and Effect's default equality is
2509
- * the right comparison.
2545
+ * Use when you already have adjacent equal values and Effect's default equality
2546
+ * is the right comparison.
2510
2547
  *
2511
2548
  * **Details**
2512
2549
  *
2513
- * - Only groups **adjacent** elements.
2550
+ * Only adjacent elements are grouped.
2514
2551
  *
2515
2552
  * **Example** (Grouping adjacent equal elements)
2516
2553
  *
@@ -2537,9 +2574,8 @@ export const group = /*#__PURE__*/groupWith(/*#__PURE__*/Equal.asEquivalence());
2537
2574
  *
2538
2575
  * **Details**
2539
2576
  *
2540
- * - Unlike {@link group}/{@link groupWith}, elements do not need to be
2541
- * adjacent to be grouped together.
2542
- * - Key function must return a `string` or `symbol`.
2577
+ * Unlike `group` and `groupWith`, elements do not need to be adjacent to be
2578
+ * grouped together. The key function must return a `string` or `symbol`.
2543
2579
  *
2544
2580
  * **Example** (Grouping by a property)
2545
2581
  *
@@ -2637,8 +2673,8 @@ export const union = /*#__PURE__*/dual(2, (self, that) => unionWith(self, that,
2637
2673
  *
2638
2674
  * **When to use**
2639
2675
  *
2640
- * Use when keeping only values present in both arrays and equality must be
2641
- * defined by a custom comparator, such as matching objects by id.
2676
+ * Use when you need to keep only values present in both arrays and equality
2677
+ * must be defined by a custom comparator, such as matching objects by id.
2642
2678
  *
2643
2679
  * **Example** (Intersection with custom equality)
2644
2680
  *
@@ -2669,6 +2705,11 @@ export const intersectionWith = isEquivalent => {
2669
2705
  * Computes the intersection of two arrays using `Equal.equivalence()`. Order is
2670
2706
  * determined by the first array.
2671
2707
  *
2708
+ * **When to use**
2709
+ *
2710
+ * Use when Effect equality is the right membership test and you want to keep
2711
+ * values present in both inputs while preserving the first input's order.
2712
+ *
2672
2713
  * **Example** (Array intersection)
2673
2714
  *
2674
2715
  * ```ts
@@ -2691,8 +2732,8 @@ export const intersection = /*#__PURE__*/intersectionWith(/*#__PURE__*/Equal.asE
2691
2732
  *
2692
2733
  * **When to use**
2693
2734
  *
2694
- * Use when keeping only values from the first array and equality must be
2695
- * defined by a custom comparator, such as matching objects by id.
2735
+ * Use when you need to keep only values from the first array and equality must
2736
+ * be defined by a custom comparator, such as matching objects by id.
2696
2737
  *
2697
2738
  * **Example** (Difference with custom equality)
2698
2739
  *
@@ -2792,8 +2833,8 @@ export const of = a => [a];
2792
2833
  *
2793
2834
  * **Details**
2794
2835
  *
2795
- * - The function receives `(element, index)`.
2796
- * - Preserves `NonEmptyArray` in the return type.
2836
+ * The function receives `(element, index)`. The return type preserves
2837
+ * `NonEmptyArray`.
2797
2838
  *
2798
2839
  * **Example** (Doubling values)
2799
2840
  *
@@ -2814,13 +2855,13 @@ export const map = /*#__PURE__*/dual(2, (self, f) => self.map(f));
2814
2855
  *
2815
2856
  * **When to use**
2816
2857
  *
2817
- * Use to map each element to zero or more values and concatenate the results in
2818
- * one pass.
2858
+ * Use to map each array element to zero or more values and concatenate the
2859
+ * results in one pass.
2819
2860
  *
2820
2861
  * **Details**
2821
2862
  *
2822
- * - The function receives `(element, index)`.
2823
- * - Returns `NonEmptyArray` when both input and mapped arrays are non-empty.
2863
+ * The function receives `(element, index)`. This returns `NonEmptyArray` when
2864
+ * both the input and mapped arrays are non-empty.
2824
2865
  *
2825
2866
  * **Example** (FlatMapping an array)
2826
2867
  *
@@ -2876,8 +2917,8 @@ export const flatten = /*#__PURE__*/flatMap(identity);
2876
2917
  *
2877
2918
  * **When to use**
2878
2919
  *
2879
- * Use to collect only present values from `Option` values while discarding
2880
- * `None` values.
2920
+ * Use to collect only present values from an iterable of `Option` values while
2921
+ * discarding `None` values.
2881
2922
  *
2882
2923
  * **Example** (Extracting Some values)
2883
2924
  *
@@ -2908,8 +2949,8 @@ export const getSomes = self => {
2908
2949
  *
2909
2950
  * **When to use**
2910
2951
  *
2911
- * Use to collect only failure values from `Result` values while discarding
2912
- * successes.
2952
+ * Use when you can drop the success channel and only need the failure
2953
+ * payloads, not the original result wrappers.
2913
2954
  *
2914
2955
  * **Example** (Extracting failures)
2915
2956
  *
@@ -2941,8 +2982,8 @@ export const getFailures = self => {
2941
2982
  *
2942
2983
  * **When to use**
2943
2984
  *
2944
- * Use to collect only success values from `Result` values while discarding
2945
- * failures.
2985
+ * Use when you can drop the failure channel and only need the success
2986
+ * payloads, not the original result wrappers.
2946
2987
  *
2947
2988
  * **Example** (Extracting successes)
2948
2989
  *
@@ -2973,13 +3014,12 @@ export const getSuccesses = self => {
2973
3014
  *
2974
3015
  * **When to use**
2975
3016
  *
2976
- * Use to transform elements with a `Result`-returning filter while discarding
2977
- * failures.
3017
+ * Use to filter an iterable with a `Result`-returning transformation while
3018
+ * discarding failures.
2978
3019
  *
2979
3020
  * **Details**
2980
3021
  *
2981
- * - The filter receives `(element, index)`.
2982
- * - Failures are discarded.
3022
+ * The filter receives `(element, index)`. Failures are discarded.
2983
3023
  *
2984
3024
  * **Example** (Filter and transform)
2985
3025
  *
@@ -3012,12 +3052,13 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
3012
3052
  *
3013
3053
  * **When to use**
3014
3054
  *
3015
- * Use to keep original elements that satisfy a boolean predicate or refinement.
3055
+ * Use to filter an iterable into a new array of original elements that satisfy
3056
+ * a boolean predicate or refinement.
3016
3057
  *
3017
3058
  * **Details**
3018
3059
  *
3019
- * - The predicate receives `(element, index)`.
3020
- * - Supports refinements for type narrowing.
3060
+ * The predicate receives `(element, index)`. Refinements are supported for type
3061
+ * narrowing.
3021
3062
  *
3022
3063
  * **Example** (Filtering even numbers)
3023
3064
  *
@@ -3048,13 +3089,12 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => {
3048
3089
  *
3049
3090
  * **When to use**
3050
3091
  *
3051
- * Use to evaluate each element with a `Result`-returning filter and keep both
3052
- * failure and success values.
3092
+ * Use to partition an iterable by evaluating each element with a
3093
+ * `Result`-returning filter and keeping both failure and success values.
3053
3094
  *
3054
3095
  * **Details**
3055
3096
  *
3056
- * - Returns `[excluded, satisfying]`.
3057
- * - The filter receives `(element, index)`.
3097
+ * Returns `[excluded, satisfying]`. The filter receives `(element, index)`.
3058
3098
  *
3059
3099
  * **Example** (Partitioning with a filter)
3060
3100
  *
@@ -3093,12 +3133,12 @@ export const partition = /*#__PURE__*/dual(2, (self, f) => {
3093
3133
  *
3094
3134
  * **When to use**
3095
3135
  *
3096
- * Use to split existing `Result` values into failure and success arrays.
3136
+ * Use to split an iterable of `Result` values into failure and success arrays.
3097
3137
  *
3098
3138
  * **Details**
3099
3139
  *
3100
- * - Returns `[failures, successes]`.
3101
- * - Equivalent to `partition(identity)`.
3140
+ * Returns `[failures, successes]`. This is equivalent to
3141
+ * `partition(identity)`.
3102
3142
  *
3103
3143
  * **Example** (Separating Results)
3104
3144
  *
@@ -3129,7 +3169,7 @@ export const separate = /*#__PURE__*/partition(identity);
3129
3169
  *
3130
3170
  * **Details**
3131
3171
  *
3132
- * - The function receives `(accumulator, element, index)`.
3172
+ * The function receives `(accumulator, element, index)`.
3133
3173
  *
3134
3174
  * **Example** (Summing an array)
3135
3175
  *
@@ -3151,12 +3191,11 @@ export const reduce = /*#__PURE__*/dual(3, (self, b, f) => fromIterable(self).re
3151
3191
  *
3152
3192
  * **When to use**
3153
3193
  *
3154
- * Use when folding order matters and values must be combined from right to
3155
- * left.
3194
+ * Use when you need to fold values from right to left.
3156
3195
  *
3157
3196
  * **Details**
3158
3197
  *
3159
- * - The function receives `(accumulator, element, index)`.
3198
+ * The function receives `(accumulator, element, index)`.
3160
3199
  *
3161
3200
  * **Example** (Right-to-left fold)
3162
3201
  *
@@ -3198,6 +3237,11 @@ export const liftPredicate = predicate => b => predicate(b) ? [b] : [];
3198
3237
  * Lifts an `Option`-returning function into one that returns an array:
3199
3238
  * `Some(a)` becomes `[a]`, `None` becomes `[]`.
3200
3239
  *
3240
+ * **When to use**
3241
+ *
3242
+ * Use when an optional parser or lookup should participate in array pipelines
3243
+ * as zero-or-one results.
3244
+ *
3201
3245
  * **Example** (Lifting an Option function)
3202
3246
  *
3203
3247
  * ```ts
@@ -3273,7 +3317,7 @@ export const liftNullishOr = f => (...a) => fromNullishOr(f(...a));
3273
3317
  *
3274
3318
  * **When to use**
3275
3319
  *
3276
- * Use when mapping and filtering in one step, where the mapper can return
3320
+ * Use when you need to map and filter in one step, where the mapper can return
3277
3321
  * `null` or `undefined` to skip elements.
3278
3322
  *
3279
3323
  * **Example** (FlatMapping with nullable)
@@ -3296,6 +3340,11 @@ export const flatMapNullishOr = /*#__PURE__*/dual(2, (self, f) => flatMap(self,
3296
3340
  * Lifts a `Result`-returning function into one that returns an array: failures
3297
3341
  * produce `[]`, successes produce `[value]`.
3298
3342
  *
3343
+ * **When to use**
3344
+ *
3345
+ * Use when a fallible parser or lookup should participate in array pipelines as
3346
+ * zero-or-one results and the failure value should be discarded.
3347
+ *
3299
3348
  * **Example** (Lifting a Result function)
3300
3349
  *
3301
3350
  * ```ts
@@ -3327,7 +3376,7 @@ export const liftResult = f => (...a) => {
3327
3376
  *
3328
3377
  * **When to use**
3329
3378
  *
3330
- * Use to check that all elements satisfy a predicate, including
3379
+ * Use to check whether every array element satisfies a predicate, including
3331
3380
  * refinement-based type narrowing.
3332
3381
  *
3333
3382
  * **Example** (Testing all elements)
@@ -3371,12 +3420,12 @@ export const some = /*#__PURE__*/dual(2, (self, predicate) => self.some(predicat
3371
3420
  *
3372
3421
  * **When to use**
3373
3422
  *
3374
- * Use when a computation depends on every suffix of an array, such as
3423
+ * Use when you need to compute a result from every suffix of an array, such as
3375
3424
  * cumulative aggregations from each position.
3376
3425
  *
3377
3426
  * **Details**
3378
3427
  *
3379
- * - For index `i`, the function receives `self.slice(i)`.
3428
+ * For index `i`, the function receives `self.slice(i)`.
3380
3429
  *
3381
3430
  * **Example** (Suffix lengths)
3382
3431
  *
@@ -3598,7 +3647,7 @@ export const dedupe = self => dedupeWith(self, Equal.asEquivalence());
3598
3647
  *
3599
3648
  * **Details**
3600
3649
  *
3601
- * - Non-adjacent duplicates are preserved.
3650
+ * Non-adjacent duplicates are preserved.
3602
3651
  *
3603
3652
  * **Example** (Deduplicating adjacent elements)
3604
3653
  *
@@ -3671,15 +3720,15 @@ export const join = /*#__PURE__*/dual(2, (self, sep) => fromIterable(self).join(
3671
3720
  *
3672
3721
  * **When to use**
3673
3722
  *
3674
- * Use when mapping needs state threaded through each element and the final state
3675
- * is also needed.
3723
+ * Use when you need to map while threading state through each element and keep
3724
+ * the final state.
3676
3725
  *
3677
3726
  * **Details**
3678
3727
  *
3679
- * - Combines `map` and `reduce` in a single pass.
3680
- * - The callback receives the current state, element, and index, and returns `[nextState, mappedValue]`.
3681
- * - Returns `[finalState, mappedArray]`.
3682
- * - Dual: can be used in both data-first and data-last style.
3728
+ * Combines `map` and `reduce` in a single pass. The callback receives the
3729
+ * current state, element, and index, and returns `[nextState, mappedValue]`.
3730
+ * The result is `[finalState, mappedArray]`. This can be used in both
3731
+ * data-first and data-last style.
3683
3732
  *
3684
3733
  * **Example** (Running sum alongside mapped values)
3685
3734
  *
@@ -3718,9 +3767,9 @@ export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
3718
3767
  *
3719
3768
  * **Details**
3720
3769
  *
3721
- * - Produces every combination of an element from `self` with an element from `that`.
3722
- * - Result length is `self.length * that.length`.
3723
- * - Order: iterates `that` for each element of `self`.
3770
+ * Produces every combination of an element from `self` with an element from
3771
+ * `that`, so the result length is `self.length * that.length`. Iteration visits
3772
+ * every element of `that` for each element of `self`.
3724
3773
  *
3725
3774
  * **Example** (Combining numbers and letters)
3726
3775
  *
@@ -3746,8 +3795,8 @@ export const cartesianWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(sel
3746
3795
  *
3747
3796
  * **Details**
3748
3797
  *
3749
- * - Produces every `[a, b]` combination of an element from `self` with an element from `that`.
3750
- * - Result length is `self.length * that.length`.
3798
+ * Produces every `[a, b]` combination of an element from `self` with an element
3799
+ * from `that`, so the result length is `self.length * that.length`.
3751
3800
  *
3752
3801
  * **Example** (All pairs of two arrays)
3753
3802
  *
@@ -3772,9 +3821,14 @@ export const cartesian = /*#__PURE__*/dual(2, (self, that) => cartesianWith(self
3772
3821
  *
3773
3822
  * **When to use**
3774
3823
  *
3775
- * Use when begin a pipeline with `Do`, then use {@link bind} to introduce array variables and {@link let_ let} for plain values.
3776
- * - Each `bind` produces the cartesian product of all bound variables (like nested loops).
3777
- * - Use `filter` and `map` in the pipeline to add conditions and transformations.
3824
+ * Use when you want array-comprehension style code with do notation.
3825
+ *
3826
+ * **Details**
3827
+ *
3828
+ * Use {@link bind} to introduce array variables and {@link let_ let} for plain
3829
+ * values. Each `bind` produces the cartesian product of all bound variables,
3830
+ * like nested loops. Use `filter` and `map` in the pipeline to add conditions
3831
+ * and transformations.
3778
3832
  *
3779
3833
  * **Example** (Array comprehension with do notation)
3780
3834
  *
@@ -3809,9 +3863,9 @@ export const Do = /*#__PURE__*/of({});
3809
3863
  *
3810
3864
  * **Details**
3811
3865
  *
3812
- * - Each `bind` call adds a named property to the accumulated object.
3813
- * - The callback receives the current scope and must return an array.
3814
- * - Equivalent to `flatMap` + merging the new value into the scope object.
3866
+ * Each `bind` call adds a named property to the accumulated object. The
3867
+ * callback receives the current scope and must return an array. This is
3868
+ * equivalent to `flatMap` plus merging the new value into the scope object.
3815
3869
  *
3816
3870
  * **Example** (Binding two arrays)
3817
3871
  *
@@ -3845,8 +3899,8 @@ export const bind = /*#__PURE__*/internalDoNotation.bind(map, flatMap);
3845
3899
  *
3846
3900
  * **Details**
3847
3901
  *
3848
- * - Equivalent to `Array.map(self, (a) => ({ [tag]: a }))`.
3849
- * - Alternative to starting with `Do` + `bind`; useful when you already have an array.
3902
+ * Equivalent to `Array.map(self, (a) => ({ [tag]: a }))`. This is an
3903
+ * alternative to starting with `Do` plus `bind` when you already have an array.
3850
3904
  *
3851
3905
  * **Example** (Naming an existing array)
3852
3906
  *
@@ -3872,10 +3926,16 @@ export {
3872
3926
  /**
3873
3927
  * Adds a computed plain value to the do-notation scope without introducing a new array dimension.
3874
3928
  *
3929
+ * **When to use**
3930
+ *
3931
+ * Use when each do-notation branch needs a derived field from the current
3932
+ * bindings without multiplying the number of branches.
3933
+ *
3875
3934
  * **Details**
3876
3935
  *
3877
- * - Unlike {@link bind}, the callback returns a single value (not an array), so no cartesian product occurs.
3878
- * - Useful for derived or intermediate values that depend on previously bound variables.
3936
+ * Unlike `bind`, the callback returns a single value instead of an array, so
3937
+ * no cartesian product occurs. Use this for derived or intermediate values
3938
+ * that depend on previously bound variables.
3879
3939
  *
3880
3940
  * **Example** (Adding a computed value)
3881
3941
  *
@@ -3926,13 +3986,13 @@ export function makeReducerConcat() {
3926
3986
  *
3927
3987
  * **When to use**
3928
3988
  *
3929
- * Use to count how many elements satisfy a predicate when you only need the
3930
- * number of matches instead of the matching elements.
3989
+ * Use when you need to count how many elements of an iterable satisfy a
3990
+ * predicate.
3931
3991
  *
3932
3992
  * **Details**
3933
3993
  *
3934
- * - The predicate receives both the element and its index.
3935
- * - Returns `0` for an empty iterable.
3994
+ * The predicate receives both the element and its index. Empty iterables return
3995
+ * `0`.
3936
3996
  *
3937
3997
  * **Example** (Counting even numbers)
3938
3998
  *