diff --git a/.changeset/loud-otters-share.md b/.changeset/loud-otters-share.md
new file mode 100644
index 00000000..2986f4c1
--- /dev/null
+++ b/.changeset/loud-otters-share.md
@@ -0,0 +1,6 @@
+---
+"@tsplus/runtime": patch
+"@tsplus/stdlib": patch
+---
+
+Removed Not Needed Lazy and Update TS+
diff --git a/package.json b/package.json
index d41613f6..8a5e7473 100644
--- a/package.json
+++ b/package.json
@@ -39,11 +39,11 @@
"@effect-ts/build-utils": "0.40.3",
"@effect-ts/core": "^0.60.2",
"@repo-tooling/eslint-plugin-dprint": "^0.0.4",
- "@tsplus/installer": "0.0.132",
- "@types/node": "^18.6.4",
+ "@tsplus/installer": "0.0.133",
+ "@types/node": "^18.6.5",
"@types/rimraf": "^3.0.2",
- "@typescript-eslint/eslint-plugin": "^5.32.0",
- "@typescript-eslint/parser": "^5.32.0",
+ "@typescript-eslint/eslint-plugin": "^5.33.0",
+ "@typescript-eslint/parser": "^5.33.0",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"babel-plugin-replace-import-extension": "^1.1.3",
"c8": "^7.12.0",
@@ -60,8 +60,8 @@
"rimraf": "^3.0.2",
"typescript": "^4.7.4",
"ultra-runner": "^3.10.5",
- "vite": "^3.0.4",
- "vitest": "0.20.3"
+ "vite": "^3.0.5",
+ "vitest": "0.21.1"
},
"resolutions": {
"eslint-plugin-codegen": "patch:eslint-plugin-codegen@npm:0.16.1#.yarn/patches/eslint-plugin-codegen-npm-0.16.1-87770191cd"
diff --git a/packages/runtime/_src/Brand.ts b/packages/runtime/_src/Brand.ts
index bf08e83d..fd5cab24 100644
--- a/packages/runtime/_src/Brand.ts
+++ b/packages/runtime/_src/Brand.ts
@@ -34,7 +34,8 @@ export declare namespace Brand {
export type Brands
= P extends Valid ? TypeLevel.UnionToIntersection<
{
- [k in keyof P[Brand.valid]]: P extends P[Brand.valid][k] ? k extends string ? Valid : never
+ [k in keyof P[Brand.valid]]: P extends P[Brand.valid][k]
+ ? k extends string ? Valid
: never
: never
}[keyof P[Brand.valid]]
>
@@ -79,18 +80,23 @@ export declare namespace Brand {
readonly validate: (a: A) => a is A & Brand.Valid
}
- export type ValidatedWith> = X extends Validation ? Validated
+ export type ValidatedWith> = X extends Validation
+ ? Validated
: never
/**
* @tsplus type Brand/Ops
*/
export interface Ops {
- readonly validation: (predicate: (a: A) => boolean) => Brand.Validation
+ readonly validation: (
+ predicate: (a: A) => boolean
+ ) => Brand.Validation
}
}
-export function validation(predicate: (a: A) => boolean): Brand.Validation {
+export function validation(
+ predicate: (a: A) => boolean
+): Brand.Validation {
return {
validate: (value): value is Brand.Validated => predicate(value)
}
diff --git a/packages/runtime/_src/Decoder.ts b/packages/runtime/_src/Decoder.ts
index 879480fa..7a421151 100644
--- a/packages/runtime/_src/Decoder.ts
+++ b/packages/runtime/_src/Decoder.ts
@@ -24,7 +24,9 @@ export const Decoder: DecoderOps = {}
/**
* @tsplus static Decoder/Ops __call
*/
-export function make(decodeResult: (u: unknown) => Result): Decoder {
+export function make(
+ decodeResult: (u: unknown) => Result
+): Decoder {
return {
decodeResult
}
@@ -82,7 +84,10 @@ export class DecoderErrorPrimitive implements Decoder.Error {
readonly expectedType: string
) {}
render = () => {
- return Tree(`Expected a value of type "${this.expectedType}" but received one of type "${typeof this.value}"`)
+ return Tree(
+ `Expected a value of type "${this.expectedType}" but received one of type "${typeof this
+ .value}"`
+ )
}
}
@@ -100,7 +105,10 @@ export class DecoderErrorIsoDateMalformed implements Decoder.Error {
readonly value: unknown
) {}
render = () => {
- return Tree(`Expected a Date represented as an iso string instead received one of type "${typeof this.value}"`)
+ return Tree(
+ `Expected a Date represented as an iso string instead received one of type "${typeof this
+ .value}"`
+ )
}
}
@@ -116,7 +124,9 @@ export class DecoderErrorLiteral implements Decoder.Error {
` of type "${typeof this.expected}"` :
""
} instead received ${
- typeof this.value === typeof this.expected ? `"${this.value}"` : `one of type "${typeof this.value}"`
+ typeof this.value === typeof this.expected ?
+ `"${this.value}"` :
+ `one of type "${typeof this.value}"`
}`
)
}
@@ -138,18 +148,24 @@ export class DecoderErrorStruct implements Decoder.Error {
constructor(
readonly fields: Chunk
) {}
- render = () => Tree(`Encountered while parsing an object structure`, this.fields.map((d) => d.render()))
+ render = () =>
+ Tree(`Encountered while parsing an object structure`, this.fields.map((d) => d.render()))
}
export class DecoderErrorTaggedMalformed implements Decoder.Error {
constructor(readonly keys: string[]) {}
render = () =>
- Tree(`Expected a tagged object of the form "{ _tag: ${this.keys.sort().map(k => `"${k}"`).join(" | ")} }"`)
+ Tree(
+ `Expected a tagged object of the form "{ _tag: ${
+ this.keys.sort().map(k => `"${k}"`).join(" | ")
+ } }"`
+ )
}
export class DecoderErrorTaggedInner implements Decoder.Error {
constructor(readonly tag: string, readonly error: Decoder.Error) {}
- render = () => Tree(`Encountered while processing tagged object "${this.tag}"`, Chunk(this.error.render()))
+ render = () =>
+ Tree(`Encountered while processing tagged object "${this.tag}"`, Chunk(this.error.render()))
}
export class DecoderErrorUnionMember implements Decoder.Error {
@@ -171,7 +187,9 @@ export class DecoderErrorArray implements Decoder.Error {
render = () =>
Tree(
`Encountered while processing an Array of elements`,
- this.errors.map(([n, err]) => Tree(`Encountered while processing element "${n}"`, Chunk(err.render())))
+ this.errors.map(([n, err]) =>
+ Tree(`Encountered while processing element "${n}"`, Chunk(err.render()))
+ )
)
}
@@ -191,35 +209,45 @@ export class DecoderErrorValidation implements Decoder.Error {
* @tsplus implicit
*/
export const _true: Decoder = Decoder((u) =>
- Derive>().is(u) ? Result.success(u) : Result.fail(new DecoderErrorPrimitive(u, "true"))
+ Derive>().is(u) ?
+ Result.success(u) :
+ Result.fail(new DecoderErrorPrimitive(u, "true"))
)
/**
* @tsplus implicit
*/
export const _false: Decoder = Decoder((u) =>
- Derive>().is(u) ? Result.success(u) : Result.fail(new DecoderErrorPrimitive(u, "false"))
+ Derive>().is(u) ?
+ Result.success(u) :
+ Result.fail(new DecoderErrorPrimitive(u, "false"))
)
/**
* @tsplus implicit
*/
export const boolean: Decoder = Decoder((u) =>
- Derive>().is(u) ? Result.success(u) : Result.fail(new DecoderErrorPrimitive(u, "boolean"))
+ Derive>().is(u) ?
+ Result.success(u) :
+ Result.fail(new DecoderErrorPrimitive(u, "boolean"))
)
/**
* @tsplus implicit
*/
export const string: Decoder = Decoder((u) =>
- Derive>().is(u) ? Result.success(u) : Result.fail(new DecoderErrorPrimitive(u, "string"))
+ Derive>().is(u) ?
+ Result.success(u) :
+ Result.fail(new DecoderErrorPrimitive(u, "string"))
)
/**
* @tsplus implicit
*/
export const number: Decoder = Decoder((u) =>
- Derive>().is(u) ? Result.success(u) : Result.fail(new DecoderErrorPrimitive(u, "number"))
+ Derive>().is(u) ?
+ Result.success(u) :
+ Result.fail(new DecoderErrorPrimitive(u, "number"))
)
/**
@@ -374,7 +402,10 @@ export function deriveArray>(
if (hasFailed) {
return Result.fail(new DecoderErrorArray(errors))
}
- return Result.success(out as A, errors.isEmpty ? Maybe.none : Maybe.some(new DecoderErrorArray(errors)))
+ return Result.success(
+ out as A,
+ errors.isEmpty ? Maybe.none : Maybe.some(new DecoderErrorArray(errors))
+ )
}
return Result.fail(new DecoderErrorPrimitive(u, "Array"))
})
@@ -382,7 +413,10 @@ export function deriveArray>(
type EitherStructural = { _tag: "Left"; left: E } | { _tag: "Right"; right: A }
-function deriveEitherInternal(left: Decoder, right: Decoder): Decoder> {
+function deriveEitherInternal(
+ left: Decoder,
+ right: Decoder
+): Decoder> {
return Derive()
}
@@ -390,11 +424,15 @@ function deriveEitherInternal(left: Decoder, right: Decoder): Decode
* @tsplus derive Decoder[Either]<_> 10
*/
export function deriveEither>(
- ...[left, right]: [A] extends [Either] ? [left: Decoder<_E>, right: Decoder<_A>] : never
+ ...[left, right]: [A] extends [Either]
+ ? [left: Decoder<_E>, right: Decoder<_A>]
+ : never
): Decoder {
const structural = deriveEitherInternal(left, right)
return Decoder((u) =>
- structural.decodeResult(u).map((e) => e._tag === "Left" ? Either.left(e.left) as A : Either.right(e.right) as A)
+ structural.decodeResult(u).map((e) =>
+ e._tag === "Left" ? Either.left(e.left) as A : Either.right(e.right) as A
+ )
)
}
@@ -415,7 +453,9 @@ export function deriveMaybe>(
): Decoder {
const structural = deriveMaybeInternal(value)
return Decoder((u) =>
- structural.decodeResult(u).map((e) => e._tag === "Some" ? Maybe.some(e.value) as A : Maybe.none as A)
+ structural.decodeResult(u).map((e) =>
+ e._tag === "Some" ? Maybe.some(e.value) as A : Maybe.none as A
+ )
)
}
@@ -424,14 +464,16 @@ export class DecoderErrorRecordValue implements Decoder.Error {
readonly key: string,
readonly error: Decoder.Error
) {}
- render = () => Tree(`Encountered while parsing a record value at "${this.key}"`, Chunk(this.error.render()))
+ render = () =>
+ Tree(`Encountered while parsing a record value at "${this.key}"`, Chunk(this.error.render()))
}
export class DecoderErrorRecordFields implements Decoder.Error {
constructor(
readonly fields: Chunk
) {}
- render = () => Tree(`Encountered while parsing a record structure`, this.fields.map((d) => d.render()))
+ render = () =>
+ Tree(`Encountered while parsing a record structure`, this.fields.map((d) => d.render()))
}
export class DecoderErrorRecordMissingKeys implements Decoder.Error {
@@ -440,7 +482,9 @@ export class DecoderErrorRecordMissingKeys implements Decoder.Error {
) {}
render = () =>
Tree(
- `Encountered while parsing a record structure, missing keys: ${this.missing.map((k) => `"${k}"`).join(", ")}`
+ `Encountered while parsing a record structure, missing keys: ${
+ this.missing.map((k) => `"${k}"`).join(", ")
+ }`
)
}
@@ -452,7 +496,9 @@ export function deriveEmptyRecord(
): Decoder {
const record = Derive>()
// @ts-expect-error
- return Decoder((u) => record.is(u) ? Result.success(u) : Result.fail(new DecoderErrorPrimitive(u, "{}")))
+ return Decoder((u) =>
+ record.is(u) ? Result.success(u) : Result.fail(new DecoderErrorPrimitive(u, "{}"))
+ )
}
/**
@@ -553,9 +599,13 @@ export function deriveRecord>(
* @tsplus derive Decoder<_> 20
*/
export function deriveLiteral(
- ...[value]: Check & Check.Not>> extends Check.True ? [value: A] : never
+ ...[value]: Check & Check.Not>> extends Check.True
+ ? [value: A]
+ : never
): Decoder {
- return Decoder((u) => u === value ? Result.success(u as A) : Result.fail(new DecoderErrorLiteral(value, u)))
+ return Decoder((u) =>
+ u === value ? Result.success(u as A) : Result.fail(new DecoderErrorLiteral(value, u))
+ )
}
/**
diff --git a/packages/runtime/_src/Encoder.ts b/packages/runtime/_src/Encoder.ts
index f931b4bb..f0cc5534 100644
--- a/packages/runtime/_src/Encoder.ts
+++ b/packages/runtime/_src/Encoder.ts
@@ -91,7 +91,8 @@ export function deriveNamed>(
* @tsplus derive Encoder<_> 10
*/
export function deriveValidation>(
- ...[base]: Check> extends Check.True ? [base: Encoder>] : never
+ ...[base]: Check> extends Check.True ? [base: Encoder>]
+ : never
): Encoder {
return Encoder((a) => base.encode(a as Brand.Unbranded))
}
@@ -112,7 +113,10 @@ export function deriveLazy(fn: (_: Encoder) => Encoder): Encoder {
type EitherStructural = { _tag: "Left"; left: E } | { _tag: "Right"; right: A }
-function deriveEitherInternal(left: Encoder, right: Encoder): Encoder> {
+function deriveEitherInternal(
+ left: Encoder,
+ right: Encoder
+): Encoder> {
return Derive()
}
@@ -120,7 +124,9 @@ function deriveEitherInternal(left: Encoder, right: Encoder): Encode
* @tsplus derive Encoder[Either]<_> 10
*/
export function deriveEither>(
- ...[left, right]: [A] extends [Either] ? [left: Encoder<_E>, right: Encoder<_A>] : never
+ ...[left, right]: [A] extends [Either]
+ ? [left: Encoder<_E>, right: Encoder<_A>]
+ : never
): Encoder {
const structural = deriveEitherInternal(left, right)
return Encoder((u) => structural.encode(u))
@@ -250,7 +256,9 @@ export function deriveRecord>(
* @tsplus derive Encoder<_> 20
*/
export function deriveLiteral(
- ...[value]: Check & Check.Not>> extends Check.True ? [value: A] : never
+ ...[value]: Check & Check.Not>> extends Check.True
+ ? [value: A]
+ : never
): Encoder {
return Encoder(() => value)
}
diff --git a/packages/runtime/_src/Guard.ts b/packages/runtime/_src/Guard.ts
index 8c1cbca4..b5865042 100644
--- a/packages/runtime/_src/Guard.ts
+++ b/packages/runtime/_src/Guard.ts
@@ -125,14 +125,18 @@ export function deriveValidation>(
: never
): Guard {
const validateBrands = Object.keys(brands).map((k) => brands[k]!)
- return Guard((u): u is A => base.is(u) && validateBrands.every((brand) => brand.validate(u as any)))
+ return Guard((u): u is A =>
+ base.is(u) && validateBrands.every((brand) => brand.validate(u as any))
+ )
}
/**
* @tsplus derive Guard<_> 20
*/
export function deriveLiteral(
- ...[value]: Check & Check.Not>> extends Check.True ? [value: A] : never
+ ...[value]: Check & Check.Not>> extends Check.True
+ ? [value: A]
+ : never
): Guard {
return Guard((u): u is A => u === value)
}
@@ -305,7 +309,10 @@ export function deriveStruct>(
}
if (optionalFields) {
for (const field of Object.keys(optionalFields)) {
- if (field in u && typeof u[field] !== "undefined" && !(optionalFields[field] as Guard).is(u[field])) {
+ if (
+ field in u && typeof u[field] !== "undefined" &&
+ !(optionalFields[field] as Guard).is(u[field])
+ ) {
return false
}
}
@@ -320,7 +327,8 @@ export function deriveStruct>(
* @tsplus derive Guard<_> 15
*/
export function deriveDictionary>(
- ...[valueGuard]: Check> extends Check.True ? [value: Guard] : never
+ ...[valueGuard]: Check> extends Check.True ? [value: Guard]
+ : never
): Guard {
return Guard((u): u is A => {
if (Derive>().is(u)) {
diff --git a/packages/runtime/_src/Result.ts b/packages/runtime/_src/Result.ts
index 766701cf..ad681a50 100644
--- a/packages/runtime/_src/Result.ts
+++ b/packages/runtime/_src/Result.ts
@@ -9,10 +9,18 @@ export type Result = Success | SuccessWithWarning | Failure
export interface ResultOps {}
export const Result: ResultOps = {}
+export const _T = Symbol.for("@tsplus/runtime/Result/_T")
+export type _T = typeof _T
+
/**
* @tsplus type Result/Success
*/
export interface Success {
+ readonly [_T]?: {
+ _W: (_: never) => never
+ _E: (_: never) => never
+ _A: (_: never) => A
+ }
readonly _tag: "Success"
readonly success: A
}
@@ -21,6 +29,11 @@ export interface Success {
* @tsplus type Result/SuccessWithWarning
*/
export interface SuccessWithWarning {
+ readonly [_T]?: {
+ _W: (_: never) => W
+ _E: (_: never) => never
+ _A: (_: never) => A
+ }
readonly _tag: "SuccessWithWarning"
readonly success: A
readonly warning: W
@@ -30,12 +43,16 @@ export interface SuccessWithWarning {
* @tsplus type Result/Failure
*/
export interface Failure {
+ readonly [_T]?: {
+ _W: (_: never) => never
+ _E: (_: never) => E
+ _A: (_: never) => never
+ }
readonly _tag: "Failure"
readonly failure: E
}
/**
- * @tsplus unify Result
* @tsplus unify Result/Success
* @tsplus unify Result/SuccessWithWarning
* @tsplus unify Result/Failure
@@ -43,9 +60,30 @@ export interface Failure {
export function unifyResult>(
self: X
): Result<
- [X] extends [Result] ? W : never,
- [X] extends [Result] ? E : never,
- [X] extends [Result] ? A : never
+ [X] extends [{
+ readonly [_T]?: {
+ _W: (_: never) => infer W
+ _E: (_: never) => infer E
+ _A: (_: never) => infer A
+ }
+ }] ? W
+ : never,
+ [X] extends [{
+ readonly [_T]?: {
+ _W: (_: never) => infer W
+ _E: (_: never) => infer E
+ _A: (_: never) => infer A
+ }
+ }] ? E
+ : never,
+ [X] extends [{
+ readonly [_T]?: {
+ _W: (_: never) => infer W
+ _E: (_: never) => infer E
+ _A: (_: never) => infer A
+ }
+ }] ? A
+ : never
> {
return self
}
@@ -128,7 +166,9 @@ export function isFailure(self: Result): self is Failure {
/**
* @tsplus fluent Result isSuccessWihWarning
*/
-export function isSuccessWihWarning(self: Result): self is SuccessWithWarning {
+export function isSuccessWihWarning(
+ self: Result
+): self is SuccessWithWarning {
return self._tag === "SuccessWithWarning"
}
diff --git a/packages/runtime/_test/Decoder.test.ts b/packages/runtime/_test/Decoder.test.ts
index a8bf939e..9bfe6baa 100644
--- a/packages/runtime/_test/Decoder.test.ts
+++ b/packages/runtime/_test/Decoder.test.ts
@@ -108,7 +108,8 @@ describe.concurrent("Decoder", () => {
{ firstName: "Michael", lastName: "Arnaldi", age: 30 }
)
assert.isTrue(
- decoder.decode({ firstName: "Michael", lastName: "Arnaldi", age: "30" }).left.value?.message ===
+ decoder.decode({ firstName: "Michael", lastName: "Arnaldi", age: "30" }).left.value
+ ?.message ===
(
"Encountered while parsing an object structure\n" +
"└─ Field \"age\"\n" +
@@ -141,7 +142,10 @@ describe.concurrent("Decoder", () => {
const decoder: Decoder = Derive()
assert.deepEqual(decoder.decode({ _tag: "A" }).right.value, { _tag: "A" })
assert.deepEqual(decoder.decode({ _tag: "B" }).right.value, { _tag: "B" })
- assert.deepEqual(decoder.decode({ _tag: "C", field: "F" }).right.value, { _tag: "C", field: "F" })
+ assert.deepEqual(decoder.decode({ _tag: "C", field: "F" }).right.value, {
+ _tag: "C",
+ field: "F"
+ })
assert.isTrue(
decoder.decode({ _tag: "D" }).left.value?.message ===
"Expected a tagged object of the form \"{ _tag: \"A\" | \"B\" | \"C\" }\""
@@ -211,13 +215,16 @@ describe.concurrent("Decoder", () => {
decoder.decode(["a", "b", "c"]) == Either.right(ImmutableArray("a", "b", "c"))
)
assert.isTrue(
- decoder.decode(0).left.value?.message === "Expected a value of type \"Array\" but received one of type \"number\""
+ decoder.decode(0).left.value?.message ===
+ "Expected a value of type \"Array\" but received one of type \"number\""
)
})
it("either", () => {
const decoder: Decoder> = Derive()
assert.isTrue(decoder.decode({ _tag: "Left", left: 0 }) == Either.right(Either.left(0)))
- assert.isTrue(decoder.decode({ _tag: "Right", right: "ok" }) == Either.right(Either.right("ok")))
+ assert.isTrue(
+ decoder.decode({ _tag: "Right", right: "ok" }) == Either.right(Either.right("ok"))
+ )
assert.isTrue(
decoder.decode({ _tag: "Left", left: "ok" }).left.value?.message ==
(
@@ -244,7 +251,8 @@ describe.concurrent("Decoder", () => {
assert.isTrue(
decoder.decode({
_tag: "Left"
- }).left.value?.message === "Expected a tagged object of the form \"{ _tag: \"None\" | \"Some\" }\""
+ }).left.value?.message ===
+ "Expected a tagged object of the form \"{ _tag: \"None\" | \"Some\" }\""
)
})
it("validated", () => {
@@ -266,15 +274,20 @@ describe.concurrent("Decoder", () => {
assert.isTrue(decoderPositive.decode(1) == Either.right(1))
assert.isTrue(
- decoderPositive.decode(-1).left.value?.message === "Encountered while processing validations: Positive"
+ decoderPositive.decode(-1).left.value?.message ===
+ "Encountered while processing validations: Positive"
)
const positiveInt: Decoder = Derive()
assert.isTrue(
- positiveInt.decode(-1.5).left.value?.message === "Encountered while processing validations: Int, Positive"
+ positiveInt.decode(-1.5).left.value?.message ===
+ "Encountered while processing validations: Int, Positive"
+ )
+ assert.isTrue(
+ positiveInt.decode(-1).left.value?.message ===
+ "Encountered while processing validations: Positive"
)
- assert.isTrue(positiveInt.decode(-1).left.value?.message === "Encountered while processing validations: Positive")
})
it("record", () => {
const decoder: Decoder> = Derive()
diff --git a/packages/stdlib/_src/collections/Chunk/definition.ts b/packages/stdlib/_src/collections/Chunk/definition.ts
index 92bc2f5f..3f5640de 100644
--- a/packages/stdlib/_src/collections/Chunk/definition.ts
+++ b/packages/stdlib/_src/collections/Chunk/definition.ts
@@ -233,7 +233,9 @@ export abstract class ChunkInternal implements Chunk, Equals {
return this.start._concat(chunk)._concat(that)
}
if (that._typeId === PrependNTypeId) {
- const chunk = array_(that.bufferUsed === 0 ? [] : (that.buffer as A1[]).slice(-that.bufferUsed))
+ const chunk = array_(
+ that.bufferUsed === 0 ? [] : (that.buffer as A1[]).slice(-that.bufferUsed)
+ )
return this._concat(chunk)._concat(that.end)
}
const diff = that.depth - this.depth
diff --git a/packages/stdlib/_src/collections/Chunk/operations/collectWhile.ts b/packages/stdlib/_src/collections/Chunk/operations/collectWhile.ts
index 1388ce56..32d59758 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/collectWhile.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/collectWhile.ts
@@ -1,4 +1,8 @@
-import { ArrTypeId, concreteChunk, SingletonTypeId } from "@tsplus/stdlib/collections/Chunk/definition"
+import {
+ ArrTypeId,
+ concreteChunk,
+ SingletonTypeId
+} from "@tsplus/stdlib/collections/Chunk/definition"
/**
* Transforms all elements of the chunk for as long as the specified partial
diff --git a/packages/stdlib/_src/collections/Chunk/operations/compactWithIndexF.ts b/packages/stdlib/_src/collections/Chunk/operations/compactWithIndexF.ts
index 6abb0eac..8bf20de4 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/compactWithIndexF.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/compactWithIndexF.ts
@@ -1,7 +1,10 @@
/**
* @tsplus static Chunk.Ops compactWithIndexF
*/
-export const compactWithIndexF = WitherableWithIndex.implementCompactWithIndexF()(
+export const compactWithIndexF = WitherableWithIndex.implementCompactWithIndexF<
+ number,
+ Chunk.HKT
+>()(
(_: {
A: A
B: B
diff --git a/packages/stdlib/_src/collections/Chunk/operations/extend.ts b/packages/stdlib/_src/collections/Chunk/operations/extend.ts
index c7ae8b11..2f2f8e6d 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/extend.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/extend.ts
@@ -3,5 +3,6 @@
* @tsplus pipeable Chunk extend
*/
export function extend(f: (chunk: Chunk) => B) {
- return (self: Chunk): Chunk => Chunk.from(self.mapWithIndex((i, _) => f(Chunk.from(self.skip(i)))))
+ return (self: Chunk): Chunk =>
+ Chunk.from(self.mapWithIndex((i, _) => f(Chunk.from(self.skip(i)))))
}
diff --git a/packages/stdlib/_src/collections/Chunk/operations/forEachF.ts b/packages/stdlib/_src/collections/Chunk/operations/forEachF.ts
index 757cac99..4ae2661f 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/forEachF.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/forEachF.ts
@@ -1,4 +1,5 @@
/**
* @tsplus static Chunk.Ops forEachF
*/
-export const forEachF: ForEach.Fn = (G) => (f) => Chunk.forEachWithIndexF(G)((_, a) => f(a))
+export const forEachF: ForEach.Fn = (G) =>
+ (f) => Chunk.forEachWithIndexF(G)((_, a) => f(a))
diff --git a/packages/stdlib/_src/collections/Chunk/operations/join.ts b/packages/stdlib/_src/collections/Chunk/operations/join.ts
index 575daac1..14f87f52 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/join.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/join.ts
@@ -5,5 +5,6 @@
* @tsplus pipeable Chunk join
*/
export function join(sep: string) {
- return (self: Chunk): string => self.reduce("", (s, a) => (s.length > 0 ? `${s}${sep}${a}` : a))
+ return (self: Chunk): string =>
+ self.reduce("", (s, a) => (s.length > 0 ? `${s}${sep}${a}` : a))
}
diff --git a/packages/stdlib/_src/collections/Chunk/operations/map.ts b/packages/stdlib/_src/collections/Chunk/operations/map.ts
index 84c97359..e0b45304 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/map.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/map.ts
@@ -1,4 +1,9 @@
-import { Chunk, concreteChunk, Singleton, SingletonTypeId } from "@tsplus/stdlib/collections/Chunk/definition"
+import {
+ Chunk,
+ concreteChunk,
+ Singleton,
+ SingletonTypeId
+} from "@tsplus/stdlib/collections/Chunk/definition"
/**
* Returns a chunk with the elements mapped by the specified function.
diff --git a/packages/stdlib/_src/collections/Chunk/operations/mapWithIndex.ts b/packages/stdlib/_src/collections/Chunk/operations/mapWithIndex.ts
index 3e7a2d9a..21feb990 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/mapWithIndex.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/mapWithIndex.ts
@@ -1,4 +1,9 @@
-import { Chunk, concreteChunk, Singleton, SingletonTypeId } from "@tsplus/stdlib/collections/Chunk/definition"
+import {
+ Chunk,
+ concreteChunk,
+ Singleton,
+ SingletonTypeId
+} from "@tsplus/stdlib/collections/Chunk/definition"
/**
* Returns a chunk with the elements mapped by the specified function.
diff --git a/packages/stdlib/_src/collections/Chunk/operations/reduce.ts b/packages/stdlib/_src/collections/Chunk/operations/reduce.ts
index 6eb671d7..087c389d 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/reduce.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/reduce.ts
@@ -1,4 +1,8 @@
-import { ArrTypeId, concreteChunk, SingletonTypeId } from "@tsplus/stdlib/collections/Chunk/definition"
+import {
+ ArrTypeId,
+ concreteChunk,
+ SingletonTypeId
+} from "@tsplus/stdlib/collections/Chunk/definition"
/**
* Folds over the elements in this chunk from the left.
diff --git a/packages/stdlib/_src/collections/Chunk/operations/reduceRight.ts b/packages/stdlib/_src/collections/Chunk/operations/reduceRight.ts
index ae4338b4..cb831219 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/reduceRight.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/reduceRight.ts
@@ -1,4 +1,8 @@
-import { ArrTypeId, concreteChunk, SingletonTypeId } from "@tsplus/stdlib/collections/Chunk/definition"
+import {
+ ArrTypeId,
+ concreteChunk,
+ SingletonTypeId
+} from "@tsplus/stdlib/collections/Chunk/definition"
/**
* Folds over the elements in this chunk from the right.
diff --git a/packages/stdlib/_src/collections/Chunk/operations/reduceRightWithIndex.ts b/packages/stdlib/_src/collections/Chunk/operations/reduceRightWithIndex.ts
index c2328b30..16d7e39e 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/reduceRightWithIndex.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/reduceRightWithIndex.ts
@@ -1,4 +1,8 @@
-import { ArrTypeId, concreteChunk, SingletonTypeId } from "@tsplus/stdlib/collections/Chunk/definition"
+import {
+ ArrTypeId,
+ concreteChunk,
+ SingletonTypeId
+} from "@tsplus/stdlib/collections/Chunk/definition"
/**
* Folds over the elements in this chunk from the right.
diff --git a/packages/stdlib/_src/collections/Chunk/operations/reduceWithIndex.ts b/packages/stdlib/_src/collections/Chunk/operations/reduceWithIndex.ts
index e376960e..035b7d05 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/reduceWithIndex.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/reduceWithIndex.ts
@@ -1,4 +1,8 @@
-import { ArrTypeId, concreteChunk, SingletonTypeId } from "@tsplus/stdlib/collections/Chunk/definition"
+import {
+ ArrTypeId,
+ concreteChunk,
+ SingletonTypeId
+} from "@tsplus/stdlib/collections/Chunk/definition"
/**
* Folds over the elements in this chunk from the left.
diff --git a/packages/stdlib/_src/collections/Chunk/operations/separateWithIndexF.ts b/packages/stdlib/_src/collections/Chunk/operations/separateWithIndexF.ts
index 4c1f7be2..a2ca234a 100644
--- a/packages/stdlib/_src/collections/Chunk/operations/separateWithIndexF.ts
+++ b/packages/stdlib/_src/collections/Chunk/operations/separateWithIndexF.ts
@@ -1,7 +1,10 @@
/**
* @tsplus static Chunk.Ops separateWithIndexF
*/
-export const separateWithIndexF = WiltableWithIndex.implementSeparateWithIndexF()(
+export const separateWithIndexF = WiltableWithIndex.implementSeparateWithIndexF<
+ number,
+ Chunk.HKT
+>()(
(_: {
A: A
B: B
diff --git a/packages/stdlib/_src/collections/HashMap/_internal/hashMap.ts b/packages/stdlib/_src/collections/HashMap/_internal/hashMap.ts
index f653f6df..131e1ae0 100644
--- a/packages/stdlib/_src/collections/HashMap/_internal/hashMap.ts
+++ b/packages/stdlib/_src/collections/HashMap/_internal/hashMap.ts
@@ -1,4 +1,8 @@
-import { fromBitmap, hashFragment, toBitmap } from "@tsplus/stdlib/collections/HashMap/_internal/bitwise"
+import {
+ fromBitmap,
+ hashFragment,
+ toBitmap
+} from "@tsplus/stdlib/collections/HashMap/_internal/bitwise"
import { SIZE } from "@tsplus/stdlib/collections/HashMap/_internal/config"
import type { Node } from "@tsplus/stdlib/collections/HashMap/_internal/node"
import { isEmptyNode } from "@tsplus/stdlib/collections/HashMap/_internal/node"
diff --git a/packages/stdlib/_src/collections/HashMap/_internal/node.ts b/packages/stdlib/_src/collections/HashMap/_internal/node.ts
index ff576d55..64b4d285 100644
--- a/packages/stdlib/_src/collections/HashMap/_internal/node.ts
+++ b/packages/stdlib/_src/collections/HashMap/_internal/node.ts
@@ -1,6 +1,18 @@
-import { arraySpliceIn, arraySpliceOut, arrayUpdate } from "@tsplus/stdlib/collections/HashMap/_internal/array"
-import { fromBitmap, hashFragment, toBitmap } from "@tsplus/stdlib/collections/HashMap/_internal/bitwise"
-import { MAX_INDEX_NODE, MIN_ARRAY_NODE, SIZE } from "@tsplus/stdlib/collections/HashMap/_internal/config"
+import {
+ arraySpliceIn,
+ arraySpliceOut,
+ arrayUpdate
+} from "@tsplus/stdlib/collections/HashMap/_internal/array"
+import {
+ fromBitmap,
+ hashFragment,
+ toBitmap
+} from "@tsplus/stdlib/collections/HashMap/_internal/bitwise"
+import {
+ MAX_INDEX_NODE,
+ MIN_ARRAY_NODE,
+ SIZE
+} from "@tsplus/stdlib/collections/HashMap/_internal/config"
/**
* @tsplus type HashMap.Node
diff --git a/packages/stdlib/_src/collections/HashMap/operations/filter.ts b/packages/stdlib/_src/collections/HashMap/operations/filter.ts
index b381dff6..d18ee209 100644
--- a/packages/stdlib/_src/collections/HashMap/operations/filter.ts
+++ b/packages/stdlib/_src/collections/HashMap/operations/filter.ts
@@ -4,7 +4,9 @@
* @tsplus static HashMap.Aspects filter
* @tsplus pipeable HashMap filter
*/
-export function filter(f: Refinement): (self: HashMap) => HashMap
+export function filter(
+ f: Refinement
+): (self: HashMap) => HashMap
export function filter(f: Predicate): (self: HashMap) => HashMap
export function filter(f: Predicate) {
return (self: HashMap): HashMap => self.filterWithIndex((_, a) => f(a))
diff --git a/packages/stdlib/_src/collections/HashMap/operations/forEachWithIndex.ts b/packages/stdlib/_src/collections/HashMap/operations/forEachWithIndex.ts
index 16ebf09e..fc4d4d23 100644
--- a/packages/stdlib/_src/collections/HashMap/operations/forEachWithIndex.ts
+++ b/packages/stdlib/_src/collections/HashMap/operations/forEachWithIndex.ts
@@ -5,5 +5,6 @@
* @tsplus pipeable HashMap forEachWithIndex
*/
export function forEachWithIndex(f: (k: K, v: V) => void) {
- return (self: HashMap): void => self.reduceWithIndex(undefined as void, (_, key, value) => f(key, value))
+ return (self: HashMap): void =>
+ self.reduceWithIndex(undefined as void, (_, key, value) => f(key, value))
}
diff --git a/packages/stdlib/_src/collections/HashMap/operations/node.ts b/packages/stdlib/_src/collections/HashMap/operations/node.ts
index 8aef2415..d86aaeaf 100644
--- a/packages/stdlib/_src/collections/HashMap/operations/node.ts
+++ b/packages/stdlib/_src/collections/HashMap/operations/node.ts
@@ -1,4 +1,8 @@
-import type { Cont, TraversalFn, VisitResult } from "@tsplus/stdlib/collections/HashMap/_internal/hashMap"
+import type {
+ Cont,
+ TraversalFn,
+ VisitResult
+} from "@tsplus/stdlib/collections/HashMap/_internal/hashMap"
import {
visitLazy as visitLazyInternal,
visitLazyChildren as visitLazyChildrenInternal
diff --git a/packages/stdlib/_src/collections/ImmutableArray/compactWithIndexF.ts b/packages/stdlib/_src/collections/ImmutableArray/compactWithIndexF.ts
index 821f7f36..9f51c0e7 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/compactWithIndexF.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/compactWithIndexF.ts
@@ -1,7 +1,10 @@
/**
* @tsplus static ImmutableArray.Ops compactWithIndexF
*/
-export const compactWithIndexF = WitherableWithIndex.implementCompactWithIndexF()(
+export const compactWithIndexF = WitherableWithIndex.implementCompactWithIndexF<
+ number,
+ ImmutableArray.HKT
+>()(
(_: {
A: A
B: B
@@ -12,5 +15,7 @@ export const compactWithIndexF = WitherableWithIndex.implementCompactWithIndexF<
(G: Applicative) =>
(f: (k: number, a: A) => HKT.Kind>) =>
(fa: ImmutableArray): HKT.Kind> =>
- G.map((self: ImmutableArray>) => self.compact)(ImmutableArray.forEachWithIndexF(G)(f)(fa))
+ G.map((self: ImmutableArray>) => self.compact)(
+ ImmutableArray.forEachWithIndexF(G)(f)(fa)
+ )
)
diff --git a/packages/stdlib/_src/collections/ImmutableArray/concat.ts b/packages/stdlib/_src/collections/ImmutableArray/concat.ts
index 705e706b..3bcb0e0b 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/concat.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/concat.ts
@@ -4,7 +4,8 @@
* @tsplus pipeable ImmutableArray concat
*/
export function concat(that: ImmutableArray) {
- return (self: ImmutableArray): ImmutableArray => new ImmutableArray([...self.array, ...that.array])
+ return (self: ImmutableArray): ImmutableArray =>
+ new ImmutableArray([...self.array, ...that.array])
}
/**
diff --git a/packages/stdlib/_src/collections/ImmutableArray/filter.ts b/packages/stdlib/_src/collections/ImmutableArray/filter.ts
index e0e90c7c..db1b6e85 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/filter.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/filter.ts
@@ -4,8 +4,11 @@
* @tsplus static ImmutableArray.Aspects filter
* @tsplus pipeable ImmutableArray filter
*/
-export function filter(f: Refinement): (self: ImmutableArray) => ImmutableArray
+export function filter(
+ f: Refinement
+): (self: ImmutableArray) => ImmutableArray
export function filter(f: Predicate): (self: ImmutableArray) => ImmutableArray
export function filter(f: Predicate) {
- return (self: ImmutableArray): ImmutableArray => new ImmutableArray(self.array.filter((a) => f(a)))
+ return (self: ImmutableArray): ImmutableArray =>
+ new ImmutableArray(self.array.filter((a) => f(a)))
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/filterWithIndex.ts b/packages/stdlib/_src/collections/ImmutableArray/filterWithIndex.ts
index 8ce6eb5e..03237ee7 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/filterWithIndex.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/filterWithIndex.ts
@@ -7,7 +7,10 @@
export function filterWithIndex(
f: (i: number, a: A) => a is B
): (self: ImmutableArray) => ImmutableArray
-export function filterWithIndex(f: (i: number, a: A) => boolean): (self: ImmutableArray) => ImmutableArray
+export function filterWithIndex(
+ f: (i: number, a: A) => boolean
+): (self: ImmutableArray) => ImmutableArray
export function filterWithIndex(f: (i: number, a: A) => boolean) {
- return (self: ImmutableArray): ImmutableArray => new ImmutableArray(self.array.filter((a, i) => f(i, a)))
+ return (self: ImmutableArray): ImmutableArray =>
+ new ImmutableArray(self.array.filter((a, i) => f(i, a)))
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/flatMap.ts b/packages/stdlib/_src/collections/ImmutableArray/flatMap.ts
index 4bb8b85d..60b9c2e5 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/flatMap.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/flatMap.ts
@@ -3,5 +3,6 @@
* @tsplus pipeable ImmutableArray flatMap
*/
export function flatMap(f: (a: A) => ImmutableArray) {
- return (self: ImmutableArray): ImmutableArray => new ImmutableArray(self.array.flatMap(x => f(x).array))
+ return (self: ImmutableArray): ImmutableArray =>
+ new ImmutableArray(self.array.flatMap(x => f(x).array))
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/forEachWithIndexF.ts b/packages/stdlib/_src/collections/ImmutableArray/forEachWithIndexF.ts
index ef1f6581..37850d07 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/forEachWithIndexF.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/forEachWithIndexF.ts
@@ -1,13 +1,18 @@
/**
* @tsplus static ImmutableArray.Ops forEachWithIndexF
*/
-export const forEachWithIndexF = ForEachWithIndex.implementForEachWithIndexF()(
+export const forEachWithIndexF = ForEachWithIndex.implementForEachWithIndexF<
+ number,
+ ImmutableArray.HKT
+>()(
(_) =>
(G) =>
(f) =>
(fa) => {
const succeed = DSL.succeedF(G)
- let base = succeed, typeof _.R, typeof _.E>(ImmutableArray.empty())
+ let base = succeed, typeof _.R, typeof _.E>(
+ ImmutableArray.empty()
+ )
for (let i = 0; i < fa.array.length; i = i + 1) {
base = G.map(
({ tuple: [bs, b] }: Tuple<[ImmutableArray, typeof _.B]>) => bs.append(b)
diff --git a/packages/stdlib/_src/collections/ImmutableArray/get.ts b/packages/stdlib/_src/collections/ImmutableArray/get.ts
index 598227d2..325fed96 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/get.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/get.ts
@@ -4,5 +4,6 @@
* @tsplus pipeable ImmutableArray get
*/
export function get(index: number) {
- return (self: ImmutableArray): Maybe> => Maybe.fromNullable(self.array[index])
+ return (self: ImmutableArray): Maybe> =>
+ Maybe.fromNullable(self.array[index])
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/getEquivalence.ts b/packages/stdlib/_src/collections/ImmutableArray/getEquivalence.ts
index 4b07cb0c..15bdfd74 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/getEquivalence.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/getEquivalence.ts
@@ -9,6 +9,7 @@
*/
export function getEquivalnce(E: Equivalence): Equivalence> {
return Equivalence((xs, ys) =>
- xs === ys || (xs.array.length === ys.array.length && xs.array.every((x, i) => E.equals(x, ys.array[i]!)))
+ xs === ys ||
+ (xs.array.length === ys.array.length && xs.array.every((x, i) => E.equals(x, ys.array[i]!)))
)
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/instances/ChainRec.ts b/packages/stdlib/_src/collections/ImmutableArray/instances/ChainRec.ts
index 181301e2..958ef5e1 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/instances/ChainRec.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/instances/ChainRec.ts
@@ -3,7 +3,10 @@ import type * as P from "@tsplus/stdlib/prelude/ChainRec"
/**
* @tsplus static ImmutableArray.Ops depthFirstChainRec
*/
-export function depthFirstChainRec(a: A, f: (a: A) => ImmutableArray>): ImmutableArray {
+export function depthFirstChainRec(
+ a: A,
+ f: (a: A) => ImmutableArray>
+): ImmutableArray {
const todo: Array> = [...f(a)]
const result: Array = []
@@ -29,7 +32,10 @@ export const DepthFirstChainRec = HKT.instance>({
/**
* @tsplus static ImmutableArray.Ops breadthFirstChainRec
*/
-export function breadthFirstChainRec(a: A, f: (a: A) => ImmutableArray>): ImmutableArray {
+export function breadthFirstChainRec(
+ a: A,
+ f: (a: A) => ImmutableArray>
+): ImmutableArray {
const initial = f(a)
const todo: Array> = []
const result: Array = []
diff --git a/packages/stdlib/_src/collections/ImmutableArray/instances/PartitionMapWithIndex.ts b/packages/stdlib/_src/collections/ImmutableArray/instances/PartitionMapWithIndex.ts
index 39eaea1e..49c303dc 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/instances/PartitionMapWithIndex.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/instances/PartitionMapWithIndex.ts
@@ -3,6 +3,8 @@ import type * as P from "@tsplus/stdlib/prelude/PartitionMapWithIndex"
/**
* @tsplus static ImmutableArray.Ops PartitionMapWithIndex
*/
-export const PartitionMapWithIndex = HKT.instance>({
+export const PartitionMapWithIndex = HKT.instance<
+ P.PartitionMapWithIndex
+>({
partitionMapWithIndex: ImmutableArray.$.partitionMapWithIndex
})
diff --git a/packages/stdlib/_src/collections/ImmutableArray/instances/ReduceRightWithIndex.ts b/packages/stdlib/_src/collections/ImmutableArray/instances/ReduceRightWithIndex.ts
index cd9e7bdb..44a0d298 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/instances/ReduceRightWithIndex.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/instances/ReduceRightWithIndex.ts
@@ -3,6 +3,8 @@ import type * as P from "@tsplus/stdlib/prelude/ReduceRightWithIndex"
/**
* @tsplus static ImmutableArray.Ops ReduceRightWithIndex
*/
-export const ReduceRightWithIndex = HKT.instance>({
+export const ReduceRightWithIndex = HKT.instance<
+ P.ReduceRightWithIndex
+>({
reduceRightWithIndex: (b, f) => (fa) => fa.array.reduceRight((b, a, i) => f(i, a, b), b)
})
diff --git a/packages/stdlib/_src/collections/ImmutableArray/map.ts b/packages/stdlib/_src/collections/ImmutableArray/map.ts
index ab3d114c..da8f2d04 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/map.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/map.ts
@@ -3,5 +3,6 @@
* @tsplus pipeable ImmutableArray map
*/
export function map(f: (a: A, k: number) => B) {
- return (self: ImmutableArray): ImmutableArray => new ImmutableArray(self.array.map((a, i) => f(a, i)))
+ return (self: ImmutableArray): ImmutableArray =>
+ new ImmutableArray(self.array.map((a, i) => f(a, i)))
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/prepend.ts b/packages/stdlib/_src/collections/ImmutableArray/prepend.ts
index fee23f4f..fdcbdb5a 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/prepend.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/prepend.ts
@@ -12,7 +12,10 @@ export function prependOperatorStrict(a: A, self: ImmutableArray): NonEmpt
*
* @tsplus operator ImmutableArray >
*/
-export function prependOperator(a: A, self: ImmutableArray): NonEmptyImmutableArray {
+export function prependOperator(
+ a: A,
+ self: ImmutableArray
+): NonEmptyImmutableArray {
return new ImmutableArray([a, ...self.array] as any) as NonEmptyImmutableArray
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/separate.ts b/packages/stdlib/_src/collections/ImmutableArray/separate.ts
index 282b13c6..40007e70 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/separate.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/separate.ts
@@ -1,7 +1,9 @@
/**
* @tsplus getter ImmutableArray separate
*/
-export function separate(self: ImmutableArray>): Tuple<[ImmutableArray, ImmutableArray]> {
+export function separate(
+ self: ImmutableArray>
+): Tuple<[ImmutableArray, ImmutableArray]> {
const left: Array = []
const right: Array = []
for (const element of self) {
diff --git a/packages/stdlib/_src/collections/ImmutableArray/separateF.ts b/packages/stdlib/_src/collections/ImmutableArray/separateF.ts
index 14ef751c..3ce7795d 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/separateF.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/separateF.ts
@@ -11,6 +11,10 @@ export const separateF = Wiltable.implementSeparateF()(
}) =>
(G: Applicative) =>
(f: (a: A) => HKT.Kind>) =>
- (fa: ImmutableArray): HKT.Kind, ImmutableArray]>> =>
- G.map((self: ImmutableArray>) => self.separate)(ImmutableArray.forEachF(G)(f)(fa))
+ (
+ fa: ImmutableArray
+ ): HKT.Kind, ImmutableArray]>> =>
+ G.map((self: ImmutableArray>) => self.separate)(
+ ImmutableArray.forEachF(G)(f)(fa)
+ )
)
diff --git a/packages/stdlib/_src/collections/ImmutableArray/separateWithIndexF.ts b/packages/stdlib/_src/collections/ImmutableArray/separateWithIndexF.ts
index 181098d8..62a18498 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/separateWithIndexF.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/separateWithIndexF.ts
@@ -1,7 +1,10 @@
/**
* @tsplus static ImmutableArray.Ops separateWithIndexF
*/
-export const separateWithIndexF = WiltableWithIndex.implementSeparateWithIndexF()(
+export const separateWithIndexF = WiltableWithIndex.implementSeparateWithIndexF<
+ number,
+ ImmutableArray.HKT
+>()(
(_: {
A: A
B: B
@@ -11,6 +14,10 @@ export const separateWithIndexF = WiltableWithIndex.implementSeparateWithIndexF<
}) =>
(G: Applicative) =>
(f: (k: number, a: A) => HKT.Kind>) =>
- (fa: ImmutableArray): HKT.Kind, ImmutableArray]>> =>
- G.map((self: ImmutableArray>) => self.separate)(ImmutableArray.forEachWithIndexF(G)(f)(fa))
+ (
+ fa: ImmutableArray
+ ): HKT.Kind, ImmutableArray]>> =>
+ G.map((self: ImmutableArray>) => self.separate)(
+ ImmutableArray.forEachWithIndexF(G)(f)(fa)
+ )
)
diff --git a/packages/stdlib/_src/collections/ImmutableArray/sort.ts b/packages/stdlib/_src/collections/ImmutableArray/sort.ts
index 55d47e14..2316be1b 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/sort.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/sort.ts
@@ -5,5 +5,6 @@
* @tsplus pipeable ImmutableArray sort
*/
export function sort(O: Ord) {
- return (self: ImmutableArray): ImmutableArray => new ImmutableArray([...self].sort((x, y) => O.compare(x, y)))
+ return (self: ImmutableArray): ImmutableArray =>
+ new ImmutableArray([...self].sort((x, y) => O.compare(x, y)))
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/union.ts b/packages/stdlib/_src/collections/ImmutableArray/union.ts
index e101d10d..13917f86 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/union.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/union.ts
@@ -6,5 +6,6 @@
* @tsplus pipeable ImmutableArray union
*/
export function union(E: Equivalence, that: ImmutableArray) {
- return (self: ImmutableArray): ImmutableArray => self.concat(that.filter((a) => !self.elem(E, a)))
+ return (self: ImmutableArray): ImmutableArray =>
+ self.concat(that.filter((a) => !self.elem(E, a)))
}
diff --git a/packages/stdlib/_src/collections/ImmutableArray/zip.ts b/packages/stdlib/_src/collections/ImmutableArray/zip.ts
index 4823cbf7..9cf222b3 100644
--- a/packages/stdlib/_src/collections/ImmutableArray/zip.ts
+++ b/packages/stdlib/_src/collections/ImmutableArray/zip.ts
@@ -6,5 +6,6 @@
* @tsplus pipeable ImmutableArray zip
*/
export function zip(that: ImmutableArray) {
- return (self: ImmutableArray): ImmutableArray> => self.zipWith(that, (a, b) => Tuple(a, b))
+ return (self: ImmutableArray): ImmutableArray> =>
+ self.zipWith(that, (a, b) => Tuple(a, b))
}
diff --git a/packages/stdlib/_src/collections/ImmutableMap/filterMap.ts b/packages/stdlib/_src/collections/ImmutableMap/filterMap.ts
index 0f753cf8..a8a8edae 100644
--- a/packages/stdlib/_src/collections/ImmutableMap/filterMap.ts
+++ b/packages/stdlib/_src/collections/ImmutableMap/filterMap.ts
@@ -6,5 +6,6 @@
* @tsplus pipeable ImmutableMap filterMap
*/
export function filterMap(pf: (value: V) => Maybe) {
- return (self: ImmutableMap): ImmutableMap