effect 4.0.0-beta.82 → 4.0.0-beta.84

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 (199) hide show
  1. package/dist/Array.d.ts +64 -64
  2. package/dist/Array.js +26 -26
  3. package/dist/Cache.d.ts +1 -1
  4. package/dist/Cache.js +1 -1
  5. package/dist/Cause.d.ts +68 -68
  6. package/dist/Cause.js +47 -47
  7. package/dist/Channel.d.ts +5 -5
  8. package/dist/Channel.js +3 -3
  9. package/dist/Clock.d.ts +1 -1
  10. package/dist/Clock.js +1 -1
  11. package/dist/Combiner.d.ts +9 -9
  12. package/dist/Combiner.js +8 -8
  13. package/dist/Config.d.ts +15 -94
  14. package/dist/Config.d.ts.map +1 -1
  15. package/dist/Config.js +22 -70
  16. package/dist/Config.js.map +1 -1
  17. package/dist/ConfigProvider.d.ts +58 -74
  18. package/dist/ConfigProvider.d.ts.map +1 -1
  19. package/dist/ConfigProvider.js +66 -41
  20. package/dist/ConfigProvider.js.map +1 -1
  21. package/dist/Console.d.ts +1 -1
  22. package/dist/Console.js +1 -1
  23. package/dist/Data.d.ts +15 -15
  24. package/dist/Data.js +3 -3
  25. package/dist/DateTime.d.ts +6 -6
  26. package/dist/DateTime.js +2 -2
  27. package/dist/Duration.d.ts +3 -3
  28. package/dist/Duration.js +3 -3
  29. package/dist/Effect.d.ts +84 -45
  30. package/dist/Effect.d.ts.map +1 -1
  31. package/dist/Effect.js +72 -33
  32. package/dist/Effect.js.map +1 -1
  33. package/dist/Equal.d.ts +7 -7
  34. package/dist/Equal.js +5 -5
  35. package/dist/Equivalence.d.ts +17 -17
  36. package/dist/Equivalence.js +13 -13
  37. package/dist/Exit.d.ts +3 -3
  38. package/dist/Exit.js +3 -3
  39. package/dist/Formatter.d.ts +5 -5
  40. package/dist/Formatter.js +4 -4
  41. package/dist/Function.d.ts +10 -10
  42. package/dist/Function.js +3 -3
  43. package/dist/HashMap.d.ts +3 -3
  44. package/dist/HashMap.js +1 -1
  45. package/dist/Iterable.d.ts +6 -6
  46. package/dist/Iterable.js +2 -2
  47. package/dist/JsonPatch.d.ts +2 -2
  48. package/dist/Layer.d.ts +1 -1
  49. package/dist/Layer.js +1 -1
  50. package/dist/Logger.d.ts +1 -1
  51. package/dist/Logger.js +1 -1
  52. package/dist/Match.d.ts +8 -8
  53. package/dist/Match.js +8 -8
  54. package/dist/Metric.d.ts +3 -3
  55. package/dist/Metric.js +3 -3
  56. package/dist/Optic.d.ts +30 -30
  57. package/dist/Optic.js +12 -12
  58. package/dist/Option.d.ts +7 -7
  59. package/dist/Option.js +7 -7
  60. package/dist/Order.d.ts +23 -23
  61. package/dist/Order.js +20 -20
  62. package/dist/Pool.d.ts +1 -1
  63. package/dist/Pool.js +1 -1
  64. package/dist/Predicate.d.ts +88 -88
  65. package/dist/Predicate.js +47 -47
  66. package/dist/PubSub.d.ts +3 -3
  67. package/dist/PubSub.js +3 -3
  68. package/dist/Reducer.d.ts +1 -1
  69. package/dist/Reducer.js +1 -1
  70. package/dist/Result.d.ts +18 -18
  71. package/dist/Result.js +8 -8
  72. package/dist/Runtime.d.ts +1 -1
  73. package/dist/Runtime.js +1 -1
  74. package/dist/Schema.d.ts +265 -120
  75. package/dist/Schema.d.ts.map +1 -1
  76. package/dist/Schema.js +285 -116
  77. package/dist/Schema.js.map +1 -1
  78. package/dist/SchemaAST.d.ts +1 -1
  79. package/dist/SchemaAST.d.ts.map +1 -1
  80. package/dist/SchemaAST.js +13 -9
  81. package/dist/SchemaAST.js.map +1 -1
  82. package/dist/SchemaGetter.d.ts +48 -48
  83. package/dist/SchemaGetter.js +44 -44
  84. package/dist/SchemaIssue.d.ts +3 -3
  85. package/dist/SchemaIssue.js +3 -3
  86. package/dist/SchemaParser.d.ts +122 -22
  87. package/dist/SchemaParser.d.ts.map +1 -1
  88. package/dist/SchemaParser.js +186 -50
  89. package/dist/SchemaParser.js.map +1 -1
  90. package/dist/SchemaRepresentation.d.ts +1 -1
  91. package/dist/SchemaRepresentation.d.ts.map +1 -1
  92. package/dist/SchemaRepresentation.js +96 -2
  93. package/dist/SchemaRepresentation.js.map +1 -1
  94. package/dist/SchemaTransformation.d.ts +20 -20
  95. package/dist/SchemaTransformation.js +18 -18
  96. package/dist/Stream.d.ts +3 -3
  97. package/dist/Stream.js +2 -2
  98. package/dist/Stream.js.map +1 -1
  99. package/dist/String.d.ts +1 -1
  100. package/dist/String.js +1 -1
  101. package/dist/Struct.d.ts +1 -1
  102. package/dist/Struct.js +1 -1
  103. package/dist/Types.d.ts +13 -13
  104. package/dist/internal/effect.js +23 -10
  105. package/dist/internal/effect.js.map +1 -1
  106. package/dist/internal/schema/cause.d.ts +2 -0
  107. package/dist/internal/schema/cause.d.ts.map +1 -0
  108. package/dist/internal/schema/cause.js +24 -0
  109. package/dist/internal/schema/cause.js.map +1 -0
  110. package/dist/internal/schema/schema.d.ts +8 -4
  111. package/dist/internal/schema/schema.d.ts.map +1 -1
  112. package/dist/internal/schema/schema.js +21 -8
  113. package/dist/internal/schema/schema.js.map +1 -1
  114. package/dist/testing/TestSchema.d.ts +3 -3
  115. package/dist/testing/TestSchema.js +1 -1
  116. package/dist/unstable/ai/AiError.d.ts +1 -1
  117. package/dist/unstable/ai/AiError.js +1 -1
  118. package/dist/unstable/ai/Chat.d.ts +1 -1
  119. package/dist/unstable/ai/Chat.js +1 -1
  120. package/dist/unstable/cli/Prompt.js +2 -2
  121. package/dist/unstable/cli/Prompt.js.map +1 -1
  122. package/dist/unstable/httpapi/HttpApiScalar.d.ts +2 -2
  123. package/dist/unstable/httpapi/HttpApiSchema.d.ts +39 -0
  124. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  125. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  126. package/dist/unstable/rpc/Rpc.d.ts +1 -1
  127. package/dist/unstable/rpc/Rpc.js +1 -1
  128. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  129. package/dist/unstable/rpc/RpcGroup.js +3 -4
  130. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  131. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  132. package/dist/unstable/sql/SqlResolver.js +15 -2
  133. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  134. package/dist/unstable/workflow/Activity.d.ts +1 -0
  135. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  136. package/dist/unstable/workflow/Activity.js +1 -0
  137. package/dist/unstable/workflow/Activity.js.map +1 -1
  138. package/dist/unstable/workflow/WorkflowEngine.js +1 -1
  139. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  140. package/package.json +1 -1
  141. package/src/Array.ts +65 -65
  142. package/src/Cache.ts +1 -1
  143. package/src/Cause.ts +68 -68
  144. package/src/Channel.ts +5 -5
  145. package/src/Clock.ts +1 -1
  146. package/src/Combiner.ts +9 -9
  147. package/src/Config.ts +40 -108
  148. package/src/ConfigProvider.ts +139 -100
  149. package/src/Console.ts +1 -1
  150. package/src/Data.ts +15 -15
  151. package/src/DateTime.ts +6 -6
  152. package/src/Duration.ts +3 -3
  153. package/src/Effect.ts +89 -45
  154. package/src/Equal.ts +7 -7
  155. package/src/Equivalence.ts +17 -17
  156. package/src/Exit.ts +3 -3
  157. package/src/Formatter.ts +5 -5
  158. package/src/Function.ts +10 -10
  159. package/src/HashMap.ts +3 -3
  160. package/src/Iterable.ts +6 -6
  161. package/src/JsonPatch.ts +2 -2
  162. package/src/Layer.ts +1 -1
  163. package/src/Logger.ts +1 -1
  164. package/src/Match.ts +8 -8
  165. package/src/Metric.ts +3 -3
  166. package/src/Optic.ts +30 -30
  167. package/src/Option.ts +7 -7
  168. package/src/Order.ts +23 -23
  169. package/src/Pool.ts +1 -1
  170. package/src/Predicate.ts +88 -88
  171. package/src/PubSub.ts +3 -3
  172. package/src/Reducer.ts +1 -1
  173. package/src/Result.ts +20 -20
  174. package/src/Runtime.ts +1 -1
  175. package/src/Schema.ts +314 -131
  176. package/src/SchemaAST.ts +20 -11
  177. package/src/SchemaGetter.ts +48 -48
  178. package/src/SchemaIssue.ts +3 -3
  179. package/src/SchemaParser.ts +197 -58
  180. package/src/SchemaRepresentation.ts +73 -3
  181. package/src/SchemaTransformation.ts +20 -20
  182. package/src/Stream.ts +4 -4
  183. package/src/String.ts +1 -1
  184. package/src/Struct.ts +1 -1
  185. package/src/Types.ts +13 -13
  186. package/src/internal/effect.ts +29 -10
  187. package/src/internal/schema/cause.ts +26 -0
  188. package/src/internal/schema/schema.ts +36 -10
  189. package/src/testing/TestSchema.ts +3 -3
  190. package/src/unstable/ai/AiError.ts +1 -1
  191. package/src/unstable/ai/Chat.ts +1 -1
  192. package/src/unstable/cli/Prompt.ts +1 -1
  193. package/src/unstable/httpapi/HttpApiScalar.ts +2 -2
  194. package/src/unstable/httpapi/HttpApiSchema.ts +18 -6
  195. package/src/unstable/rpc/Rpc.ts +1 -1
  196. package/src/unstable/rpc/RpcGroup.ts +3 -4
  197. package/src/unstable/sql/SqlResolver.ts +15 -2
  198. package/src/unstable/workflow/Activity.ts +2 -0
  199. package/src/unstable/workflow/WorkflowEngine.ts +1 -1
package/src/Array.ts CHANGED
@@ -34,7 +34,7 @@ import type { NoInfer, TupleOf } from "./Types.ts"
34
34
  * Use to access native JavaScript array constructor methods such as `isArray`
35
35
  * or `from` from the Effect module namespace.
36
36
  *
37
- * **Example** (Using the Array constructor)
37
+ * **Example** (Accessing the Array constructor)
38
38
  *
39
39
  * ```ts
40
40
  * import { Array } from "effect"
@@ -458,7 +458,7 @@ export const ensure = <A>(self: ReadonlyArray<A> | A): Array<A> => Array.isArray
458
458
  * Key order follows `Object.entries` semantics. Empty records produce an empty
459
459
  * array.
460
460
  *
461
- * **Example** (Record to entries)
461
+ * **Example** (Converting a record to entries)
462
462
  *
463
463
  * ```ts
464
464
  * import { Array } from "effect"
@@ -482,7 +482,7 @@ export const fromRecord: <K extends string, A>(self: Readonly<Record<K, A>>) =>
482
482
  *
483
483
  * Use to convert a single `Option` into an array for downstream array operations.
484
484
  *
485
- * **Example** (Option to array)
485
+ * **Example** (Converting an Option to an array)
486
486
  *
487
487
  * ```ts
488
488
  * import { Array, Option } from "effect"
@@ -626,7 +626,7 @@ export const match: {
626
626
  *
627
627
  * `onNonEmpty` receives `(head, tail)` where `tail` is the rest of the array.
628
628
  *
629
- * **Example** (Head and tail destructuring)
629
+ * **Example** (Destructuring head and tail)
630
630
  *
631
631
  * ```ts
632
632
  * import { Array } from "effect"
@@ -659,7 +659,7 @@ export const matchLeft: {
659
659
  *
660
660
  * `onNonEmpty` receives `(head, tail)` where `tail` is the rest of the array.
661
661
  *
662
- * **Example** (Head and tail destructuring)
662
+ * **Example** (Destructuring head and tail)
663
663
  *
664
664
  * ```ts
665
665
  * import { Array } from "effect"
@@ -697,7 +697,7 @@ export const matchLeft: {
697
697
  *
698
698
  * `onNonEmpty` receives `(head, tail)` where `tail` is the rest of the array.
699
699
  *
700
- * **Example** (Head and tail destructuring)
700
+ * **Example** (Destructuring head and tail)
701
701
  *
702
702
  * ```ts
703
703
  * import { Array } from "effect"
@@ -744,7 +744,7 @@ export const matchLeft: {
744
744
  *
745
745
  * `onNonEmpty` receives `(init, last)` where `init` is everything but the last element.
746
746
  *
747
- * **Example** (Init and last destructuring)
747
+ * **Example** (Destructuring init and last)
748
748
  *
749
749
  * ```ts
750
750
  * import { Array } from "effect"
@@ -777,7 +777,7 @@ export const matchRight: {
777
777
  *
778
778
  * `onNonEmpty` receives `(init, last)` where `init` is everything but the last element.
779
779
  *
780
- * **Example** (Init and last destructuring)
780
+ * **Example** (Destructuring init and last)
781
781
  *
782
782
  * ```ts
783
783
  * import { Array } from "effect"
@@ -815,7 +815,7 @@ export const matchRight: {
815
815
  *
816
816
  * `onNonEmpty` receives `(init, last)` where `init` is everything but the last element.
817
817
  *
818
- * **Example** (Init and last destructuring)
818
+ * **Example** (Destructuring init and last)
819
819
  *
820
820
  * ```ts
821
821
  * import { Array } from "effect"
@@ -1395,7 +1395,7 @@ export const scan: {
1395
1395
  * The output length is `input.length + 1` because it ends with the initial
1396
1396
  * value. The result is always a `NonEmptyArray`.
1397
1397
  *
1398
- * **Example** (Reverse running totals)
1398
+ * **Example** (Scanning running totals in reverse)
1399
1399
  *
1400
1400
  * ```ts
1401
1401
  * import { Array } from "effect"
@@ -1424,7 +1424,7 @@ export const scanRight: {
1424
1424
  * The output length is `input.length + 1` because it ends with the initial
1425
1425
  * value. The result is always a `NonEmptyArray`.
1426
1426
  *
1427
- * **Example** (Reverse running totals)
1427
+ * **Example** (Scanning running totals in reverse)
1428
1428
  *
1429
1429
  * ```ts
1430
1430
  * import { Array } from "effect"
@@ -1453,7 +1453,7 @@ export const scanRight: {
1453
1453
  * The output length is `input.length + 1` because it ends with the initial
1454
1454
  * value. The result is always a `NonEmptyArray`.
1455
1455
  *
1456
- * **Example** (Reverse running totals)
1456
+ * **Example** (Scanning running totals in reverse)
1457
1457
  *
1458
1458
  * ```ts
1459
1459
  * import { Array } from "effect"
@@ -1698,7 +1698,7 @@ const clamp = <A>(i: number, as: ReadonlyArray<A>): number => Math.floor(Math.mi
1698
1698
  *
1699
1699
  * The index is floored to an integer. This never throws.
1700
1700
  *
1701
- * **Example** (Safe index access)
1701
+ * **Example** (Accessing indexes safely)
1702
1702
  *
1703
1703
  * ```ts
1704
1704
  * import { Array } from "effect"
@@ -1728,7 +1728,7 @@ export const get: {
1728
1728
  *
1729
1729
  * The index is floored to an integer. This never throws.
1730
1730
  *
1731
- * **Example** (Safe index access)
1731
+ * **Example** (Accessing indexes safely)
1732
1732
  *
1733
1733
  * ```ts
1734
1734
  * import { Array } from "effect"
@@ -1758,7 +1758,7 @@ export const get: {
1758
1758
  *
1759
1759
  * The index is floored to an integer. This never throws.
1760
1760
  *
1761
- * **Example** (Safe index access)
1761
+ * **Example** (Accessing indexes safely)
1762
1762
  *
1763
1763
  * ```ts
1764
1764
  * import { Array } from "effect"
@@ -1793,7 +1793,7 @@ export const get: {
1793
1793
  * Throws an `Error` with the message `"Index out of bounds: <i>"`. Prefer
1794
1794
  * `get` for safe access.
1795
1795
  *
1796
- * **Example** (Unsafe index access)
1796
+ * **Example** (Accessing indexes unsafely)
1797
1797
  *
1798
1798
  * ```ts
1799
1799
  * import { Array } from "effect"
@@ -1821,7 +1821,7 @@ export const getUnsafe: {
1821
1821
  * Throws an `Error` with the message `"Index out of bounds: <i>"`. Prefer
1822
1822
  * `get` for safe access.
1823
1823
  *
1824
- * **Example** (Unsafe index access)
1824
+ * **Example** (Accessing indexes unsafely)
1825
1825
  *
1826
1826
  * ```ts
1827
1827
  * import { Array } from "effect"
@@ -1849,7 +1849,7 @@ export const getUnsafe: {
1849
1849
  * Throws an `Error` with the message `"Index out of bounds: <i>"`. Prefer
1850
1850
  * `get` for safe access.
1851
1851
  *
1852
- * **Example** (Unsafe index access)
1852
+ * **Example** (Accessing indexes unsafely)
1853
1853
  *
1854
1854
  * ```ts
1855
1855
  * import { Array } from "effect"
@@ -4538,7 +4538,7 @@ export const sortWith: {
4538
4538
  * This is data-last only and returns a function. The return type preserves
4539
4539
  * `NonEmptyArray`.
4540
4540
  *
4541
- * **Example** (Multi-key sorting)
4541
+ * **Example** (Sorting by multiple keys)
4542
4542
  *
4543
4543
  * ```ts
4544
4544
  * import { Array, Order, pipe } from "effect"
@@ -5457,7 +5457,7 @@ export const rotate: {
5457
5457
  * Use when checking membership with caller-provided equality instead of
5458
5458
  * `Equal.equivalence()`.
5459
5459
  *
5460
- * **Example** (Custom equality check)
5460
+ * **Example** (Checking with custom equality)
5461
5461
  *
5462
5462
  * ```ts
5463
5463
  * import { Array, pipe } from "effect"
@@ -6367,7 +6367,7 @@ export const chunksOf: {
6367
6367
  * Returns an empty array if `n <= 0` or the array has fewer than `n` elements.
6368
6368
  * Each window is a tuple of exactly `n` elements.
6369
6369
  *
6370
- * **Example** (Sliding windows)
6370
+ * **Example** (Creating sliding windows)
6371
6371
  *
6372
6372
  * ```ts
6373
6373
  * import { Array } from "effect"
@@ -6394,7 +6394,7 @@ export const window: {
6394
6394
  * Returns an empty array if `n <= 0` or the array has fewer than `n` elements.
6395
6395
  * Each window is a tuple of exactly `n` elements.
6396
6396
  *
6397
- * **Example** (Sliding windows)
6397
+ * **Example** (Creating sliding windows)
6398
6398
  *
6399
6399
  * ```ts
6400
6400
  * import { Array } from "effect"
@@ -6421,7 +6421,7 @@ export const window: {
6421
6421
  * Returns an empty array if `n <= 0` or the array has fewer than `n` elements.
6422
6422
  * Each window is a tuple of exactly `n` elements.
6423
6423
  *
6424
- * **Example** (Sliding windows)
6424
+ * **Example** (Creating sliding windows)
6425
6425
  *
6426
6426
  * ```ts
6427
6427
  * import { Array } from "effect"
@@ -6719,7 +6719,7 @@ export const groupBy: {
6719
6719
  * Use when you need the union of two arrays but duplicate detection must use a
6720
6720
  * custom equivalence instead of the default `Equal.equivalence()`.
6721
6721
  *
6722
- * **Example** (Union with custom equality)
6722
+ * **Example** (Computing unions with custom equality)
6723
6723
  *
6724
6724
  * ```ts
6725
6725
  * import { Array } from "effect"
@@ -6744,7 +6744,7 @@ export const unionWith: {
6744
6744
  * Use when you need the union of two arrays but duplicate detection must use a
6745
6745
  * custom equivalence instead of the default `Equal.equivalence()`.
6746
6746
  *
6747
- * **Example** (Union with custom equality)
6747
+ * **Example** (Computing unions with custom equality)
6748
6748
  *
6749
6749
  * ```ts
6750
6750
  * import { Array } from "effect"
@@ -6772,7 +6772,7 @@ export const unionWith: {
6772
6772
  * Use when you need the union of two arrays but duplicate detection must use a
6773
6773
  * custom equivalence instead of the default `Equal.equivalence()`.
6774
6774
  *
6775
- * **Example** (Union with custom equality)
6775
+ * **Example** (Computing unions with custom equality)
6776
6776
  *
6777
6777
  * ```ts
6778
6778
  * import { Array } from "effect"
@@ -6801,7 +6801,7 @@ export const unionWith: {
6801
6801
  * Use when you need the union of two arrays but duplicate detection must use a
6802
6802
  * custom equivalence instead of the default `Equal.equivalence()`.
6803
6803
  *
6804
- * **Example** (Union with custom equality)
6804
+ * **Example** (Computing unions with custom equality)
6805
6805
  *
6806
6806
  * ```ts
6807
6807
  * import { Array } from "effect"
@@ -6830,7 +6830,7 @@ export const unionWith: {
6830
6830
  * Use when you need the union of two arrays but duplicate detection must use a
6831
6831
  * custom equivalence instead of the default `Equal.equivalence()`.
6832
6832
  *
6833
- * **Example** (Union with custom equality)
6833
+ * **Example** (Computing unions with custom equality)
6834
6834
  *
6835
6835
  * ```ts
6836
6836
  * import { Array } from "effect"
@@ -6867,7 +6867,7 @@ export const unionWith: {
6867
6867
  * Computes the union of two arrays, removing duplicates using
6868
6868
  * `Equal.equivalence()`.
6869
6869
  *
6870
- * **Example** (Array union)
6870
+ * **Example** (Computing array unions)
6871
6871
  *
6872
6872
  * ```ts
6873
6873
  * import { Array } from "effect"
@@ -6887,7 +6887,7 @@ export const union: {
6887
6887
  * Computes the union of two arrays, removing duplicates using
6888
6888
  * `Equal.equivalence()`.
6889
6889
  *
6890
- * **Example** (Array union)
6890
+ * **Example** (Computing array unions)
6891
6891
  *
6892
6892
  * ```ts
6893
6893
  * import { Array } from "effect"
@@ -6909,7 +6909,7 @@ export const union: {
6909
6909
  * Computes the union of two arrays, removing duplicates using
6910
6910
  * `Equal.equivalence()`.
6911
6911
  *
6912
- * **Example** (Array union)
6912
+ * **Example** (Computing array unions)
6913
6913
  *
6914
6914
  * ```ts
6915
6915
  * import { Array } from "effect"
@@ -6929,7 +6929,7 @@ export const union: {
6929
6929
  * Computes the union of two arrays, removing duplicates using
6930
6930
  * `Equal.equivalence()`.
6931
6931
  *
6932
- * **Example** (Array union)
6932
+ * **Example** (Computing array unions)
6933
6933
  *
6934
6934
  * ```ts
6935
6935
  * import { Array } from "effect"
@@ -6949,7 +6949,7 @@ export const union: {
6949
6949
  * Computes the union of two arrays, removing duplicates using
6950
6950
  * `Equal.equivalence()`.
6951
6951
  *
6952
- * **Example** (Array union)
6952
+ * **Example** (Computing array unions)
6953
6953
  *
6954
6954
  * ```ts
6955
6955
  * import { Array } from "effect"
@@ -6971,7 +6971,7 @@ export const union: {
6971
6971
  * Computes the union of two arrays, removing duplicates using
6972
6972
  * `Equal.equivalence()`.
6973
6973
  *
6974
- * **Example** (Array union)
6974
+ * **Example** (Computing array unions)
6975
6975
  *
6976
6976
  * ```ts
6977
6977
  * import { Array } from "effect"
@@ -6998,7 +6998,7 @@ export const union: {
6998
6998
  * Use when you need to keep only values present in both arrays and equality
6999
6999
  * must be defined by a custom comparator, such as matching objects by id.
7000
7000
  *
7001
- * **Example** (Intersection with custom equality)
7001
+ * **Example** (Computing intersections with custom equality)
7002
7002
  *
7003
7003
  * ```ts
7004
7004
  * import { Array } from "effect"
@@ -7039,7 +7039,7 @@ export const intersectionWith = <A>(isEquivalent: (self: A, that: A) => boolean)
7039
7039
  * Use when Effect equality is the right membership test and you want to keep
7040
7040
  * values present in both inputs while preserving the first input's order.
7041
7041
  *
7042
- * **Example** (Array intersection)
7042
+ * **Example** (Computing array intersections)
7043
7043
  *
7044
7044
  * ```ts
7045
7045
  * import { Array } from "effect"
@@ -7064,7 +7064,7 @@ export const intersection: {
7064
7064
  * Use when Effect equality is the right membership test and you want to keep
7065
7065
  * values present in both inputs while preserving the first input's order.
7066
7066
  *
7067
- * **Example** (Array intersection)
7067
+ * **Example** (Computing array intersections)
7068
7068
  *
7069
7069
  * ```ts
7070
7070
  * import { Array } from "effect"
@@ -7089,7 +7089,7 @@ export const intersection: {
7089
7089
  * Use when Effect equality is the right membership test and you want to keep
7090
7090
  * values present in both inputs while preserving the first input's order.
7091
7091
  *
7092
- * **Example** (Array intersection)
7092
+ * **Example** (Computing array intersections)
7093
7093
  *
7094
7094
  * ```ts
7095
7095
  * import { Array } from "effect"
@@ -7116,7 +7116,7 @@ export const intersection: {
7116
7116
  * Use when you need to keep only values from the first array and equality must
7117
7117
  * be defined by a custom comparator, such as matching objects by id.
7118
7118
  *
7119
- * **Example** (Difference with custom equality)
7119
+ * **Example** (Computing differences with custom equality)
7120
7120
  *
7121
7121
  * ```ts
7122
7122
  * import { Array } from "effect"
@@ -7155,7 +7155,7 @@ export const differenceWith = <A>(isEquivalent: (self: A, that: A) => boolean):
7155
7155
  * Use when you need to keep values from the first array that are absent from
7156
7156
  * the second and the default `Equal.equivalence()` comparison is appropriate.
7157
7157
  *
7158
- * **Example** (Array difference)
7158
+ * **Example** (Computing array differences)
7159
7159
  *
7160
7160
  * ```ts
7161
7161
  * import { Array } from "effect"
@@ -7180,7 +7180,7 @@ export const difference: {
7180
7180
  * Use when you need to keep values from the first array that are absent from
7181
7181
  * the second and the default `Equal.equivalence()` comparison is appropriate.
7182
7182
  *
7183
- * **Example** (Array difference)
7183
+ * **Example** (Computing array differences)
7184
7184
  *
7185
7185
  * ```ts
7186
7186
  * import { Array } from "effect"
@@ -7205,7 +7205,7 @@ export const difference: {
7205
7205
  * Use when you need to keep values from the first array that are absent from
7206
7206
  * the second and the default `Equal.equivalence()` comparison is appropriate.
7207
7207
  *
7208
- * **Example** (Array difference)
7208
+ * **Example** (Computing array differences)
7209
7209
  *
7210
7210
  * ```ts
7211
7211
  * import { Array } from "effect"
@@ -7478,7 +7478,7 @@ export const map: {
7478
7478
  * The function receives `(element, index)`. This returns `NonEmptyArray` when
7479
7479
  * both the input and mapped arrays are non-empty.
7480
7480
  *
7481
- * **Example** (FlatMapping an array)
7481
+ * **Example** (Flat mapping an array)
7482
7482
  *
7483
7483
  * ```ts
7484
7484
  * import { Array } from "effect"
@@ -7506,7 +7506,7 @@ export const flatMap: {
7506
7506
  * The function receives `(element, index)`. This returns `NonEmptyArray` when
7507
7507
  * both the input and mapped arrays are non-empty.
7508
7508
  *
7509
- * **Example** (FlatMapping an array)
7509
+ * **Example** (Flat mapping an array)
7510
7510
  *
7511
7511
  * ```ts
7512
7512
  * import { Array } from "effect"
@@ -7534,7 +7534,7 @@ export const flatMap: {
7534
7534
  * The function receives `(element, index)`. This returns `NonEmptyArray` when
7535
7535
  * both the input and mapped arrays are non-empty.
7536
7536
  *
7537
- * **Example** (FlatMapping an array)
7537
+ * **Example** (Flat mapping an array)
7538
7538
  *
7539
7539
  * ```ts
7540
7540
  * import { Array } from "effect"
@@ -7565,7 +7565,7 @@ export const flatMap: {
7565
7565
  * The function receives `(element, index)`. This returns `NonEmptyArray` when
7566
7566
  * both the input and mapped arrays are non-empty.
7567
7567
  *
7568
- * **Example** (FlatMapping an array)
7568
+ * **Example** (Flat mapping an array)
7569
7569
  *
7570
7570
  * ```ts
7571
7571
  * import { Array } from "effect"
@@ -7742,7 +7742,7 @@ export const getSuccesses = <T extends Iterable<Result.Result<any, any>>>(
7742
7742
  *
7743
7743
  * The filter receives `(element, index)`. Failures are discarded.
7744
7744
  *
7745
- * **Example** (Filter and transform)
7745
+ * **Example** (Filtering and transforming)
7746
7746
  *
7747
7747
  * ```ts
7748
7748
  * import { Array, Result } from "effect"
@@ -7770,7 +7770,7 @@ export const filterMap: {
7770
7770
  *
7771
7771
  * The filter receives `(element, index)`. Failures are discarded.
7772
7772
  *
7773
- * **Example** (Filter and transform)
7773
+ * **Example** (Filtering and transforming)
7774
7774
  *
7775
7775
  * ```ts
7776
7776
  * import { Array, Result } from "effect"
@@ -7798,7 +7798,7 @@ export const filterMap: {
7798
7798
  *
7799
7799
  * The filter receives `(element, index)`. Failures are discarded.
7800
7800
  *
7801
- * **Example** (Filter and transform)
7801
+ * **Example** (Filtering and transforming)
7802
7802
  *
7803
7803
  * ```ts
7804
7804
  * import { Array, Result } from "effect"
@@ -8227,7 +8227,7 @@ export const reduce: {
8227
8227
  *
8228
8228
  * The function receives `(accumulator, element, index)`.
8229
8229
  *
8230
- * **Example** (Right-to-left fold)
8230
+ * **Example** (Folding from right to left)
8231
8231
  *
8232
8232
  * ```ts
8233
8233
  * import { Array } from "effect"
@@ -8253,7 +8253,7 @@ export const reduceRight: {
8253
8253
  *
8254
8254
  * The function receives `(accumulator, element, index)`.
8255
8255
  *
8256
- * **Example** (Right-to-left fold)
8256
+ * **Example** (Folding from right to left)
8257
8257
  *
8258
8258
  * ```ts
8259
8259
  * import { Array } from "effect"
@@ -8279,7 +8279,7 @@ export const reduceRight: {
8279
8279
  *
8280
8280
  * The function receives `(accumulator, element, index)`.
8281
8281
  *
8282
- * **Example** (Right-to-left fold)
8282
+ * **Example** (Folding from right to left)
8283
8283
  *
8284
8284
  * ```ts
8285
8285
  * import { Array } from "effect"
@@ -8304,7 +8304,7 @@ export const reduceRight: {
8304
8304
  * Lifts a predicate into an array: returns `[value]` if the predicate holds,
8305
8305
  * `[]` otherwise.
8306
8306
  *
8307
- * **Example** (Conditional wrapping)
8307
+ * **Example** (Wrapping values conditionally)
8308
8308
  *
8309
8309
  * ```ts
8310
8310
  * import { Array } from "effect"
@@ -8326,7 +8326,7 @@ export const liftPredicate: { // Note: I intentionally avoid using the NoInfer p
8326
8326
  * Lifts a predicate into an array: returns `[value]` if the predicate holds,
8327
8327
  * `[]` otherwise.
8328
8328
  *
8329
- * **Example** (Conditional wrapping)
8329
+ * **Example** (Wrapping values conditionally)
8330
8330
  *
8331
8331
  * ```ts
8332
8332
  * import { Array } from "effect"
@@ -8386,7 +8386,7 @@ export const liftOption = <A extends Array<unknown>, B>(
8386
8386
  *
8387
8387
  * Use to treat a nullable single value as zero or one array element.
8388
8388
  *
8389
- * **Example** (Nullable to array)
8389
+ * **Example** (Converting nullable values to an array)
8390
8390
  *
8391
8391
  * ```ts
8392
8392
  * import { Array } from "effect"
@@ -8441,7 +8441,7 @@ export const liftNullishOr = <A extends Array<unknown>, B>(
8441
8441
  * Use when you need to map and filter in one step, where the mapper can return
8442
8442
  * `null` or `undefined` to skip elements.
8443
8443
  *
8444
- * **Example** (FlatMapping with nullable)
8444
+ * **Example** (Flat mapping with nullable values)
8445
8445
  *
8446
8446
  * ```ts
8447
8447
  * import { Array } from "effect"
@@ -8466,7 +8466,7 @@ export const flatMapNullishOr: {
8466
8466
  * Use when you need to map and filter in one step, where the mapper can return
8467
8467
  * `null` or `undefined` to skip elements.
8468
8468
  *
8469
- * **Example** (FlatMapping with nullable)
8469
+ * **Example** (Flat mapping with nullable values)
8470
8470
  *
8471
8471
  * ```ts
8472
8472
  * import { Array } from "effect"
@@ -8491,7 +8491,7 @@ export const flatMapNullishOr: {
8491
8491
  * Use when you need to map and filter in one step, where the mapper can return
8492
8492
  * `null` or `undefined` to skip elements.
8493
8493
  *
8494
- * **Example** (FlatMapping with nullable)
8494
+ * **Example** (Flat mapping with nullable values)
8495
8495
  *
8496
8496
  * ```ts
8497
8497
  * import { Array } from "effect"
@@ -8755,7 +8755,7 @@ export const some: {
8755
8755
  *
8756
8756
  * For index `i`, the function receives `self.slice(i)`.
8757
8757
  *
8758
- * **Example** (Suffix lengths)
8758
+ * **Example** (Computing suffix lengths)
8759
8759
  *
8760
8760
  * ```ts
8761
8761
  * import { Array } from "effect"
@@ -8782,7 +8782,7 @@ export const extend: {
8782
8782
  *
8783
8783
  * For index `i`, the function receives `self.slice(i)`.
8784
8784
  *
8785
- * **Example** (Suffix lengths)
8785
+ * **Example** (Computing suffix lengths)
8786
8786
  *
8787
8787
  * ```ts
8788
8788
  * import { Array } from "effect"
@@ -8809,7 +8809,7 @@ export const extend: {
8809
8809
  *
8810
8810
  * For index `i`, the function receives `self.slice(i)`.
8811
8811
  *
8812
- * **Example** (Suffix lengths)
8812
+ * **Example** (Computing suffix lengths)
8813
8813
  *
8814
8814
  * ```ts
8815
8815
  * import { Array } from "effect"
@@ -9634,7 +9634,7 @@ export const cartesianWith: {
9634
9634
  * Produces every `[a, b]` combination of an element from `self` with an element
9635
9635
  * from `that`, so the result length is `self.length * that.length`.
9636
9636
  *
9637
- * **Example** (All pairs of two arrays)
9637
+ * **Example** (Generating all pairs from two arrays)
9638
9638
  *
9639
9639
  * ```ts
9640
9640
  * import { Array } from "effect"
@@ -9661,7 +9661,7 @@ export const cartesian: {
9661
9661
  * Produces every `[a, b]` combination of an element from `self` with an element
9662
9662
  * from `that`, so the result length is `self.length * that.length`.
9663
9663
  *
9664
- * **Example** (All pairs of two arrays)
9664
+ * **Example** (Generating all pairs from two arrays)
9665
9665
  *
9666
9666
  * ```ts
9667
9667
  * import { Array } from "effect"
@@ -9688,7 +9688,7 @@ export const cartesian: {
9688
9688
  * Produces every `[a, b]` combination of an element from `self` with an element
9689
9689
  * from `that`, so the result length is `self.length * that.length`.
9690
9690
  *
9691
- * **Example** (All pairs of two arrays)
9691
+ * **Example** (Generating all pairs from two arrays)
9692
9692
  *
9693
9693
  * ```ts
9694
9694
  * import { Array } from "effect"
@@ -9726,7 +9726,7 @@ export const cartesian: {
9726
9726
  * like nested loops. Use `filter` and `map` in the pipeline to add conditions
9727
9727
  * and transformations.
9728
9728
  *
9729
- * **Example** (Array comprehension with do notation)
9729
+ * **Example** (Building array comprehensions with do notation)
9730
9730
  *
9731
9731
  * ```ts
9732
9732
  * import { Array, pipe } from "effect"
package/src/Cache.ts CHANGED
@@ -145,7 +145,7 @@ export interface Entry<A, E> {
145
145
  * The timeToLive function receives both the exit result and the key, allowing
146
146
  * for flexible TTL policies based on success/failure state and key characteristics.
147
147
  *
148
- * **Example** (Using dynamic time to live)
148
+ * **Example** (Configuring dynamic time to live)
149
149
  *
150
150
  * ```ts
151
151
  * import { Cache, Effect, Exit } from "effect"