Socket
Socket
Sign inDemoInstall

@effect/stm

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect/stm - npm Package Compare versions

Comparing version 0.11.0 to 0.12.0

33

internal_effect_untraced/stm.js

@@ -14,2 +14,3 @@ "use strict";

var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
var RA = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/ReadonlyArray"));
var Cause = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Cause"));

@@ -139,3 +140,3 @@ var Effect = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Effect"));

exports.fiberId = fiberId;
const filter = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (iterable, predicate) => core.map(Chunk.unsafeFromArray)(Array.from(iterable).reduce((acc, curr) => core.zipWith(restore(predicate)(curr), (as, p) => {
const filter = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (iterable, predicate) => Array.from(iterable).reduce((acc, curr) => core.zipWith(restore(predicate)(curr), (as, p) => {
if (p) {

@@ -146,3 +147,3 @@ as.push(curr);

return as;
})(acc), core.succeed([]))).traced(trace));
})(acc), core.succeed([])).traced(trace));
/** @internal */

@@ -186,6 +187,6 @@ exports.filter = filter;

exports.match = match;
const forEach = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (elements, f) => core.map(suspend(() => Array.from(elements).reduce((acc, curr) => core.zipWith(restore(f)(curr), (array, elem) => {
const forEach = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (elements, f) => suspend(() => Array.from(elements).reduce((acc, curr) => core.zipWith(restore(f)(curr), (array, elem) => {
array.push(elem);
return array;
})(acc), core.succeed([]))), Chunk.unsafeFromArray).traced(trace));
})(acc), core.succeed([]))).traced(trace));
/** @internal */

@@ -249,3 +250,11 @@ exports.forEach = forEach;

exports.gen = gen;
const head = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.matchSTM(e => core.fail(Option.some(e)), a => Option.match(() => core.fail(Option.none()), core.succeed)(Chunk.head(Chunk.fromIterable(a))))(self).traced(trace));
const head = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.matchSTM(e => core.fail(Option.some(e)), a => {
const i = a[Symbol.iterator]();
const res = i.next();
if (res.done) {
return core.fail(Option.none());
} else {
return core.succeed(res.value);
}
})(self).traced(trace));
/** @internal */

@@ -280,3 +289,3 @@ exports.head = head;

const loop = /*#__PURE__*/Debug.methodWithTrace((trace, restore) => (initial, cont, inc, body) => {
return loopLoop(initial, restore(cont), restore(inc), restore(body)).traced(trace);
return core.map(loopLoop(initial, restore(cont), restore(inc), restore(body)), a => Array.from(a)).traced(trace);
});

@@ -388,5 +397,5 @@ exports.loop = loop;

/** @internal */
const replicate = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => Chunk.unsafeFromArray(Array.from({
const replicate = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => Array.from({
length: n
}, () => self)));
}, () => self));
/** @internal */

@@ -431,4 +440,4 @@ exports.replicate = replicate;

return core.map(arguments[0], x => [x]);
} else if (Array.isArray(arguments[0])) {
return core.map(collectAll(arguments[0]), Chunk.toReadonlyArray).traced(trace);
} else if (Symbol.iterator in arguments[0]) {
return collectAll(arguments[0]).traced(trace);
} else {

@@ -445,3 +454,3 @@ return core.map(values => {

}
return core.map(collectAll(arguments), Chunk.toReadonlyArray).traced(trace);
return collectAll(arguments).traced(trace);
});

@@ -504,3 +513,3 @@ /** @internal */

exports.unsome = unsome;
const validateAll = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (elements, f) => core.flatMap(partition(elements, restore(f)), ([errors, values]) => Chunk.isNonEmpty(errors) ? core.fail(errors) : core.succeed(values)).traced(trace));
const validateAll = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (elements, f) => core.flatMap(partition(elements, restore(f)), ([errors, values]) => RA.isNonEmptyArray(errors) ? core.fail(errors) : core.succeed(values)).traced(trace));
/** @internal */

@@ -507,0 +516,0 @@ exports.validateAll = validateAll;

@@ -6,4 +6,3 @@ "use strict";

});
exports.updateSTM = exports.update = exports.transformSTM = exports.transform = exports.toChunk = exports.someSTM = exports.some = exports.size = exports.reduceSTM = exports.reduceOptionSTM = exports.reduceOption = exports.reduce = exports.minOption = exports.maxOption = exports.make = exports.lastOption = exports.headOption = exports.get = exports.fromIterable = exports.forEach = exports.findLastSTM = exports.findLastIndexFrom = exports.findLastIndex = exports.findLast = exports.findFirstSTM = exports.findFirstIndexWhereSTM = exports.findFirstIndexWhereFromSTM = exports.findFirstIndexWhereFrom = exports.findFirstIndexWhere = exports.findFirstIndexFrom = exports.findFirstIndex = exports.findFirst = exports.everySTM = exports.every = exports.empty = exports.countSTM = exports.count = exports.contains = exports.collectFirstSTM = exports.collectFirst = exports.TArrayTypeId = exports.TArrayImpl = void 0;
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));
exports.updateSTM = exports.update = exports.transformSTM = exports.transform = exports.toArray = exports.someSTM = exports.some = exports.size = exports.reduceSTM = exports.reduceOptionSTM = exports.reduceOption = exports.reduce = exports.minOption = exports.maxOption = exports.make = exports.lastOption = exports.headOption = exports.get = exports.fromIterable = exports.forEach = exports.findLastSTM = exports.findLastIndexFrom = exports.findLastIndex = exports.findLast = exports.findFirstSTM = exports.findFirstIndexWhereSTM = exports.findFirstIndexWhereFromSTM = exports.findFirstIndexWhereFrom = exports.findFirstIndexWhere = exports.findFirstIndexFrom = exports.findFirstIndex = exports.findFirst = exports.everySTM = exports.every = exports.empty = exports.countSTM = exports.count = exports.contains = exports.collectFirstSTM = exports.collectFirst = exports.TArrayTypeId = exports.TArrayImpl = void 0;
var Debug = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Debug"));

@@ -45,3 +44,3 @@ var Equal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Equal"));

while (Option.isNone(result) && index < self.chunk.length) {
const element = tRef.unsafeGet(runtime.journal)(Chunk.unsafeGet(index)(self.chunk));
const element = tRef.unsafeGet(runtime.journal)(self.chunk[index]);
const option = restore(pf)(element);

@@ -95,3 +94,3 @@ if (Option.isSome(option)) {

while (!found && index < self.chunk.length) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal);
const element = tRef.unsafeGet(self.chunk[index], journal);
found = restore(predicate)(element);

@@ -112,3 +111,3 @@ index = index + 1;

const findFirstIndexWhereFromSTM = /*#__PURE__*/Debug.dualWithTrace(3, (trace, restore) => (self, predicate, from) => {
const forIndex = index => index < self.chunk.length ? core.flatMap(bool => bool ? core.succeed(Option.some(index)) : forIndex(index + 1))(core.flatMap(restore(predicate))(tRef.get(Chunk.unsafeGet(self.chunk, index)))) : stm.succeedNone();
const forIndex = index => index < self.chunk.length ? core.flatMap(bool => bool ? core.succeed(Option.some(index)) : forIndex(index + 1))(core.flatMap(restore(predicate))(tRef.get(self.chunk[index]))) : stm.succeedNone();
return from < 0 ? stm.succeedNone().traced(trace) : forIndex(from).traced(trace);

@@ -123,3 +122,3 @@ });

const index = state[1];
return core.flatMap(value => core.map(restore(predicate)(value), bool => [bool ? Option.some(value) : Option.none(), index + 1]))(tRef.get(Chunk.unsafeGet(self.chunk, index)));
return core.flatMap(value => core.map(restore(predicate)(value), bool => [bool ? Option.some(value) : Option.none(), index + 1]))(tRef.get(self.chunk[index]));
}), state => state[0]).traced(trace);

@@ -133,3 +132,3 @@ });

while (Option.isNone(result) && index >= 0) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal);
const element = tRef.unsafeGet(self.chunk[index], journal);
if (restore(predicate)(element)) {

@@ -155,3 +154,3 @@ result = Option.some(element);

while (!found && index >= 0) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal);
const element = tRef.unsafeGet(self.chunk[index], journal);
found = Equal.equals(element)(value);

@@ -173,3 +172,3 @@ index = index - 1;

const index = state[1];
return core.flatMap(value => core.map(restore(predicate)(value), bool => [bool ? Option.some(value) : Option.none(), index - 1]))(tRef.get(Chunk.unsafeGet(self.chunk, index)));
return core.flatMap(value => core.map(restore(predicate)(value), bool => [bool ? Option.some(value) : Option.none(), index - 1]))(tRef.get(self.chunk[index]));
}), state => state[0]).traced(trace);

@@ -189,10 +188,10 @@ });

}
return tRef.get(Chunk.unsafeGet(self.chunk, index)).traced(trace);
return tRef.get(self.chunk[index]).traced(trace);
});
/** @internal */
exports.get = get;
const headOption = /*#__PURE__*/Debug.methodWithTrace(trace => self => Chunk.isEmpty(self.chunk) ? core.succeed(Option.none()).traced(trace) : core.map(tRef.get(Chunk.unsafeHead(self.chunk)), Option.some).traced(trace));
const headOption = /*#__PURE__*/Debug.methodWithTrace(trace => self => self.chunk.length === 0 ? core.succeed(Option.none()).traced(trace) : core.map(tRef.get(self.chunk[0]), Option.some).traced(trace));
/** @internal */
exports.headOption = headOption;
const lastOption = /*#__PURE__*/Debug.methodWithTrace(trace => self => Chunk.isEmpty(self.chunk) ? stm.succeedNone().traced(trace) : core.map(tRef.get(Chunk.unsafeLast(self.chunk)), Option.some).traced(trace));
const lastOption = /*#__PURE__*/Debug.methodWithTrace(trace => self => self.chunk.length === 0 ? stm.succeedNone().traced(trace) : core.map(tRef.get(self.chunk[self.chunk.length - 1]), Option.some).traced(trace));
/** @internal */

@@ -219,3 +218,3 @@ exports.lastOption = lastOption;

while (index < self.chunk.length) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal);
const element = tRef.unsafeGet(self.chunk[index], journal);
result = restore(f)(result, element);

@@ -232,3 +231,3 @@ index = index + 1;

while (index < self.chunk.length) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal);
const element = tRef.unsafeGet(self.chunk[index], journal);
result = result === undefined ? element : restore(f)(result, element);

@@ -244,3 +243,3 @@ index = index + 1;

exports.reduceOptionSTM = reduceOptionSTM;
const reduceSTM = /*#__PURE__*/Debug.dualWithTrace(3, (trace, restore) => (self, zero, f) => core.flatMap(toChunk(self), stm.reduce(zero, restore(f))).traced(trace));
const reduceSTM = /*#__PURE__*/Debug.dualWithTrace(3, (trace, restore) => (self, zero, f) => core.flatMap(toArray(self), stm.reduce(zero, restore(f))).traced(trace));
/** @internal */

@@ -257,9 +256,9 @@ exports.reduceSTM = reduceSTM;

exports.someSTM = someSTM;
const toChunk = /*#__PURE__*/Debug.methodWithTrace(trace => self => stm.forEach(self.chunk, tRef.get).traced(trace));
const toArray = /*#__PURE__*/Debug.methodWithTrace(trace => self => stm.forEach(self.chunk, tRef.get).traced(trace));
/** @internal */
exports.toChunk = toChunk;
exports.toArray = toArray;
const transform = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, f) => core.effect(journal => {
let index = 0;
while (index < self.chunk.length) {
const ref = Chunk.unsafeGet(index)(self.chunk);
const ref = self.chunk[index];
tRef.unsafeSet(ref, restore(f)(tRef.unsafeGet(ref, journal)), journal);

@@ -277,3 +276,3 @@ index = index + 1;

while ((next = iterator.next()) && !next.done) {
tRef.unsafeSet(Chunk.unsafeGet(self.chunk, index), next.value, journal);
tRef.unsafeSet(self.chunk[index], next.value, journal);
index = index + 1;

@@ -289,3 +288,3 @@ }

}
return tRef.update(Chunk.unsafeGet(self.chunk, index), restore(f)).traced(trace);
return tRef.update(self.chunk[index], restore(f)).traced(trace);
});

@@ -298,5 +297,5 @@ /** @internal */

}
return core.flatMap(updated => tRef.set(Chunk.unsafeGet(self.chunk, index), updated))(core.flatMap(restore(f))(tRef.get(Chunk.unsafeGet(self.chunk, index)))).traced(trace);
return core.flatMap(updated => tRef.set(self.chunk[index], updated))(core.flatMap(restore(f))(tRef.get(self.chunk[index]))).traced(trace);
});
exports.updateSTM = updateSTM;
//# sourceMappingURL=tArray.js.map

@@ -7,3 +7,2 @@ "use strict";

exports.unbounded = exports.subscribeScoped = exports.subscribe = exports.sliding = exports.size = exports.shutdown = exports.publishAll = exports.publish = exports.makeNode = exports.isShutdown = exports.isFull = exports.isEmpty = exports.dropping = exports.capacity = exports.bounded = exports.awaitShutdown = exports.THubTypeId = void 0;
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));
var Debug = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Debug"));

@@ -13,2 +12,3 @@ var _Function = /*#__PURE__*/require("@effect/data/Function");

var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
var RA = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/ReadonlyArray"));
var Effect = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Effect"));

@@ -126,3 +126,3 @@ var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/core"));

offerAll(iterable) {
return Debug.bodyWithTrace(trace => core.map(stm.forEach(iterable, a => this.offer(a)), Chunk.every(_Function.identity)).traced(trace));
return Debug.bodyWithTrace(trace => core.map(stm.forEach(iterable, a => this.offer(a)), RA.every(_Function.identity)).traced(trace));
}

@@ -371,3 +371,3 @@ size() {

tRef.unsafeSet(this.subscriberHead, currentSubscriberHead, runtime.journal);
return core.succeed(Chunk.unsafeFromArray(builder));
return core.succeed(builder);
}).traced(trace));

@@ -374,0 +374,0 @@ }

@@ -6,3 +6,3 @@ "use strict";

});
exports.values = exports.updateWith = exports.transformValuesSTM = exports.transformValues = exports.transformSTM = exports.transform = exports.toReadonlyMap = exports.toReadonlyArray = exports.toHashMap = exports.toChunk = exports.takeSomeSTM = exports.takeSome = exports.takeFirstSTM = exports.takeFirst = exports.size = exports.setIfAbsent = exports.set = exports.retainIfDiscard = exports.retainIf = exports.removeIfDiscard = exports.removeIf = exports.removeAll = exports.remove = exports.reduceWithIndexSTM = exports.reduceWithIndex = exports.reduceSTM = exports.reduce = exports.merge = exports.make = exports.keys = exports.isEmpty = exports.has = exports.getOrElse = exports.get = exports.fromIterable = exports.forEach = exports.findSTM = exports.findAllSTM = exports.findAll = exports.find = exports.empty = exports.TMapTypeId = void 0;
exports.values = exports.updateWith = exports.transformValuesSTM = exports.transformValues = exports.transformSTM = exports.transform = exports.toReadonlyMap = exports.toReadonlyArray = exports.toHashMap = exports.toArray = exports.takeSomeSTM = exports.takeSome = exports.takeFirstSTM = exports.takeFirst = exports.size = exports.setIfAbsent = exports.set = exports.retainIfDiscard = exports.retainIf = exports.removeIfDiscard = exports.removeIf = exports.removeAll = exports.remove = exports.reduceWithIndexSTM = exports.reduceWithIndex = exports.reduceSTM = exports.reduce = exports.merge = exports.make = exports.keys = exports.isEmpty = exports.has = exports.getOrElse = exports.get = exports.fromIterable = exports.forEach = exports.findSTM = exports.findAllSTM = exports.findAll = exports.find = exports.empty = exports.TMapTypeId = void 0;
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));

@@ -14,2 +14,3 @@ var Debug = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Debug"));

var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
var RA = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/ReadonlyArray"));
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/core"));

@@ -96,3 +97,3 @@ var stm = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/stm"));

exports.findAll = findAll;
const findAllSTM = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, pf) => reduceWithIndexSTM(self, Chunk.empty(), (acc, value, key) => core.matchSTM(restore(pf)(key, value), Option.match(() => core.succeed(acc), core.fail), a => core.succeed(Chunk.append(acc, a)))).traced(trace));
const findAllSTM = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, pf) => core.map(reduceWithIndexSTM(self, Chunk.empty(), (acc, value, key) => core.matchSTM(restore(pf)(key, value), Option.match(() => core.succeed(acc), core.fail), a => core.succeed(Chunk.append(acc, a)))), a => Array.from(a)).traced(trace));
/** @internal */

@@ -113,3 +114,3 @@ exports.findAllSTM = findAllSTM;

const index = indexOf(key, buckets.chunk.length);
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const bucket = tRef.unsafeGet(buckets.chunk[index], journal);
return Option.map(entry => entry[1])(Chunk.findFirst(bucket, entry => Equal.equals(entry[0])(key)));

@@ -128,3 +129,3 @@ }).traced(trace));

exports.isEmpty = isEmpty;
const keys = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.map(toChunk(self), Chunk.map(entry => entry[0])).traced(trace));
const keys = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.map(toArray(self), RA.map(entry => entry[0])).traced(trace));
/** @internal */

@@ -152,3 +153,3 @@ exports.keys = keys;

while (index < buckets.chunk.length) {
const bucket = Chunk.unsafeGet(buckets.chunk, index);
const bucket = buckets.chunk[index];
const items = tRef.unsafeGet(bucket, journal);

@@ -162,3 +163,3 @@ result = Chunk.reduce(items, result, (acc, entry) => restore(f)(acc, entry[1], entry[0]));

exports.reduceWithIndex = reduceWithIndex;
const reduceWithIndexSTM = /*#__PURE__*/Debug.dualWithTrace(3, (trace, restore) => (self, zero, f) => core.flatMap(toChunk(self), stm.reduce(zero, (acc, entry) => restore(f)(acc, entry[1], entry[0]))).traced(trace));
const reduceWithIndexSTM = /*#__PURE__*/Debug.dualWithTrace(3, (trace, restore) => (self, zero, f) => core.flatMap(toArray(self), stm.reduce(zero, (acc, entry) => restore(f)(acc, entry[1], entry[0]))).traced(trace));
/** @internal */

@@ -169,7 +170,7 @@ exports.reduceWithIndexSTM = reduceWithIndexSTM;

const index = indexOf(key, buckets.chunk.length);
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const bucket = tRef.unsafeGet(buckets.chunk[index], journal);
const [toRemove, toRetain] = Chunk.partition(bucket, entry => Equal.equals(entry[1], key));
if (Chunk.isNonEmpty(toRemove)) {
const currentSize = tRef.unsafeGet(self.tSize, journal);
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), toRetain, journal);
tRef.unsafeSet(buckets.chunk[index], toRetain, journal);
tRef.unsafeSet(self.tSize, currentSize - 1, journal);

@@ -186,7 +187,7 @@ }

const index = indexOf(next.value, buckets.chunk.length);
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const bucket = tRef.unsafeGet(buckets.chunk[index], journal);
const [toRemove, toRetain] = Chunk.partition(bucket, entry => Equal.equals(next.value)(entry[0]));
if (Chunk.isNonEmpty(toRemove)) {
const currentSize = tRef.unsafeGet(self.tSize, journal);
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), toRetain, journal);
tRef.unsafeSet(buckets.chunk[index], toRetain, journal);
tRef.unsafeSet(self.tSize, currentSize - 1, journal);

@@ -205,3 +206,3 @@ }

while (index < capacity) {
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const bucket = tRef.unsafeGet(buckets.chunk[index], journal);
const iterator = bucket[Symbol.iterator]();

@@ -218,7 +219,7 @@ let next;

}
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal);
tRef.unsafeSet(buckets.chunk[index], newBucket, journal);
index = index + 1;
}
tRef.unsafeSet(self.tSize, newSize, journal);
return Chunk.unsafeFromArray(removed);
return removed;
}).traced(trace));

@@ -233,3 +234,3 @@ /** @internal */

while (index < capacity) {
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const bucket = tRef.unsafeGet(buckets.chunk[index], journal);
const iterator = bucket[Symbol.iterator]();

@@ -244,3 +245,3 @@ let next;

}
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal);
tRef.unsafeSet(buckets.chunk[index], newBucket, journal);
index = index + 1;

@@ -267,3 +268,3 @@ }

while (index < capacity) {
const pairs = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const pairs = tRef.unsafeGet(buckets.chunk[index], journal);
const iterator = pairs[Symbol.iterator]();

@@ -286,3 +287,3 @@ let next;

}
const newTArray = new tArray.TArrayImpl(Chunk.unsafeFromArray(newArray));
const newTArray = new tArray.TArrayImpl(newArray);
tRef.unsafeSet(self.tBuckets, newTArray, journal);

@@ -294,7 +295,7 @@ };

const index = indexOf(key, capacity);
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const bucket = tRef.unsafeGet(buckets.chunk[index], journal);
const shouldUpdate = Chunk.some(bucket, entry => Equal.equals(key)(entry[0]));
if (shouldUpdate) {
const newBucket = Chunk.map(bucket, entry => Equal.equals(key)(entry[0]) ? [key, value] : entry);
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal);
tRef.unsafeSet(buckets.chunk[index], newBucket, journal);
} else {

@@ -307,3 +308,3 @@ const newSize = tRef.unsafeGet(self.tSize, journal) + 1;

const newBucket = Chunk.prepend(bucket, [key, value]);
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal);
tRef.unsafeSet(buckets.chunk[index], newBucket, journal);
}

@@ -328,3 +329,3 @@ }

while (index < capacity && Option.isNone(result)) {
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const bucket = tRef.unsafeGet(buckets.chunk[index], journal);
const recreate = Chunk.some(bucket, entry => Option.isSome(pf(entry[0], entry[1])));

@@ -343,3 +344,3 @@ if (recreate) {

}
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal);
tRef.unsafeSet(buckets.chunk[index], newBucket, journal);
}

@@ -365,3 +366,3 @@ index = index + 1;

while (index < capacity) {
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal);
const bucket = tRef.unsafeGet(buckets.chunk[index], journal);
const recreate = Chunk.some(bucket, entry => Option.isSome(restore(pf)(entry[0], entry[1])));

@@ -381,3 +382,3 @@ if (recreate) {

}
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal);
tRef.unsafeSet(buckets.chunk[index], newBucket, journal);
} else {

@@ -390,3 +391,3 @@ newSize = newSize + bucket.length;

if (builder.length > 0) {
return Option.some(Chunk.unsafeFromArray(builder));
return Option.some(builder);
}

@@ -397,6 +398,6 @@ return Option.none();

exports.takeSome = takeSome;
const takeSomeSTM = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, pf) => core.flatMap(entries => stm.as(removeAll(self, Chunk.map(entries, entry => entry[0])), Chunk.map(entries, entry => entry[1])))(stm.collect(option => Option.isSome(option) ? Option.some(option.value) : Option.none())(core.map(chunk => Chunk.isNonEmpty(chunk) ? Option.some(chunk) : Option.none())(findAllSTM(self, (key, value) => core.map(restore(pf)(key, value), a => [key, a]))))).traced(trace));
const takeSomeSTM = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, pf) => core.flatMap(entries => stm.as(removeAll(self, entries.map(entry => entry[0])), RA.map(entries, entry => entry[1])))(stm.collect(option => Option.isSome(option) ? Option.some(option.value) : Option.none())(core.map(chunk => RA.isNonEmptyArray(chunk) ? Option.some(chunk) : Option.none())(findAllSTM(self, (key, value) => core.map(restore(pf)(key, value), a => [key, a]))))).traced(trace));
/** @internal */
exports.takeSomeSTM = takeSomeSTM;
const toChunk = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.effect(journal => {
const toArray = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.effect(journal => {
const buckets = tRef.unsafeGet(self.tBuckets, journal);

@@ -407,10 +408,10 @@ const capacity = buckets.chunk.length;

while (index < capacity) {
const bucket = Chunk.unsafeGet(buckets.chunk, index);
const bucket = buckets.chunk[index];
builder.push(...tRef.unsafeGet(bucket, journal));
index = index + 1;
}
return Chunk.unsafeFromArray(builder);
return builder;
}).traced(trace));
/** @internal */
exports.toChunk = toChunk;
exports.toArray = toArray;
const toHashMap = /*#__PURE__*/Debug.methodWithTrace(trace => self => reduceWithIndex(self, HashMap.empty(), (acc, value, key) => HashMap.set(key, value)(acc)).traced(trace));

@@ -434,3 +435,3 @@ /** @internal */

while (index < capacity) {
const bucket = Chunk.unsafeGet(buckets.chunk, index);
const bucket = buckets.chunk[index];
const pairs = tRef.unsafeGet(bucket, journal);

@@ -452,3 +453,3 @@ const iterator = pairs[Symbol.iterator]();

while (index < capacity) {
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBuckets[index], journal);
tRef.unsafeSet(buckets.chunk[index], newBuckets[index], journal);
index = index + 1;

@@ -479,7 +480,7 @@ }

while (index < capacity) {
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBuckets[index], journal);
tRef.unsafeSet(buckets.chunk[index], newBuckets[index], journal);
index = index + 1;
}
tRef.unsafeSet(self.tSize, newSize, journal);
}))(core.flatMap(toChunk(self), stm.forEach(entry => restore(f)(entry[0], entry[1])))).traced(trace));
}))(core.flatMap(toArray(self), stm.forEach(entry => restore(f)(entry[0], entry[1])))).traced(trace));
/** @internal */

@@ -496,4 +497,4 @@ exports.transformSTM = transformSTM;

exports.updateWith = updateWith;
const values = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.map(toChunk(self), Chunk.map(entry => entry[1])).traced(trace));
const values = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.map(toArray(self), RA.map(entry => entry[1])).traced(trace));
exports.values = values;
//# sourceMappingURL=tMap.js.map

@@ -7,3 +7,2 @@ "use strict";

exports.toReadonlyArray = exports.toChunk = exports.takeUpTo = exports.takeOption = exports.takeAll = exports.take = exports.size = exports.retainIf = exports.removeIf = exports.peekOption = exports.peek = exports.offerAll = exports.offer = exports.make = exports.isNonEmpty = exports.isEmpty = exports.fromIterable = exports.empty = exports.TPriorityQueueTypeId = exports.TPriorityQueueImpl = void 0;
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));
var Debug = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Debug"));

@@ -95,3 +94,3 @@ var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));

}
return [Chunk.unsafeFromArray(builder), SortedMap.empty(SortedMap.getOrder(map))];
return [builder, SortedMap.empty(SortedMap.getOrder(map))];
}).traced(trace));

@@ -127,3 +126,3 @@ /** @internal */

}
return [Chunk.unsafeFromArray(builder), updated];
return [builder, updated];
}).traced(trace));

@@ -137,3 +136,3 @@ /** @internal */

}
return [Chunk.unsafeFromArray(builder), map];
return [builder, map];
}).traced(trace));

@@ -140,0 +139,0 @@ /** @internal */

@@ -10,2 +10,3 @@ "use strict";

var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
var RA = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/ReadonlyArray"));
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/core"));

@@ -202,3 +203,3 @@ var OpCodes = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/opCodes/strategy"));

tRef.unsafeSet(this.ref, [], runtime.journal);
return core.succeed(Chunk.unsafeFromArray(queue));
return core.succeed(queue);
}).traced(trace));

@@ -214,3 +215,3 @@ }

tRef.unsafeSet(this.ref, Array.from(remaining), runtime.journal);
return core.succeed(toTake);
return core.succeed(Array.from(toTake));
}).traced(trace));

@@ -271,3 +272,3 @@ }

exports.peekOption = peekOption;
const poll = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.map(Chunk.head)(self.takeUpTo(1)).traced(trace));
const poll = /*#__PURE__*/Debug.methodWithTrace(trace => self => core.map(RA.head)(self.takeUpTo(1)).traced(trace));
/** @internal */

@@ -302,11 +303,11 @@ exports.poll = poll;

if (remaining === 1) {
return core.map(a => Chunk.append(a)(Chunk.concat(taken)(acc)))(self.take());
return core.map(a => Chunk.append(a)(Chunk.concat(Chunk.unsafeFromArray(taken))(acc)))(self.take());
}
if (remaining > 1) {
return core.flatMap(a => takeRemainder(remaining - 1, max - taken.length - 1, Chunk.append(a)(Chunk.concat(taken)(acc))))(self.take());
return core.flatMap(a => takeRemainder(remaining - 1, max - taken.length - 1, Chunk.append(a)(Chunk.concat(Chunk.unsafeFromArray(taken))(acc))))(self.take());
}
return core.succeed(Chunk.concat(taken)(acc));
return core.succeed(Chunk.concat(Chunk.unsafeFromArray(taken))(acc));
})(self.takeUpTo(max));
};
return takeRemainder(min, max, Chunk.empty());
return core.map(takeRemainder(min, max, Chunk.empty()), c => Array.from(c));
}).traced(trace));

@@ -313,0 +314,0 @@ /** @internal */

@@ -49,3 +49,3 @@ "use strict";

}
return core.zipRight(tArray.toChunk(buffer))(stm.forEachDiscard(n => core.flatMap(k => swap(buffer, n - 1, k))(nextIntBounded(n)))(array));
return core.zipRight(tArray.toArray(buffer))(stm.forEachDiscard(n => core.flatMap(k => swap(buffer, n - 1, k))(nextIntBounded(n)))(array));
})(tArray.fromIterable(iterable));

@@ -52,0 +52,0 @@ };

@@ -7,5 +7,5 @@ "use strict";

exports.union = exports.transformSTM = exports.transform = exports.toReadonlySet = exports.toReadonlyArray = exports.toHashSet = exports.toChunk = exports.takeSomeSTM = exports.takeSome = exports.takeFirstSTM = exports.takeFirst = exports.size = exports.retainIfDiscard = exports.retainIf = exports.removeIfDiscard = exports.removeIf = exports.removeAll = exports.remove = exports.reduceSTM = exports.reduce = exports.make = exports.isEmpty = exports.intersection = exports.has = exports.fromIterable = exports.forEach = exports.empty = exports.difference = exports.add = exports.TSetTypeId = void 0;
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));
var Debug = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Debug"));
var HashSet = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/HashSet"));
var RA = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/ReadonlyArray"));
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/core"));

@@ -73,3 +73,3 @@ var tMap = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/tMap"));

exports.removeAll = removeAll;
const removeIf = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, predicate) => core.map(Chunk.map(entry => entry[0]))(tMap.removeIf(self.tMap, key => restore(predicate)(key))).traced(trace));
const removeIf = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, predicate) => core.map(RA.map(entry => entry[0]))(tMap.removeIf(self.tMap, key => restore(predicate)(key))).traced(trace));
/** @internal */

@@ -80,3 +80,3 @@ exports.removeIf = removeIf;

exports.removeIfDiscard = removeIfDiscard;
const retainIf = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, predicate) => core.map(Chunk.map(entry => entry[0]))(tMap.retainIf(self.tMap, key => restore(predicate)(key))).traced(trace));
const retainIf = /*#__PURE__*/Debug.dualWithTrace(2, (trace, restore) => (self, predicate) => core.map(RA.map(entry => entry[0]))(tMap.retainIf(self.tMap, key => restore(predicate)(key))).traced(trace));
/** @internal */

@@ -83,0 +83,0 @@ exports.retainIf = retainIf;

{
"name": "@effect/stm",
"version": "0.11.0",
"version": "0.12.0",
"license": "MIT",

@@ -11,3 +11,3 @@ "repository": {

"@effect/data": "~0.12.2",
"@effect/io": "~0.20.0"
"@effect/io": "~0.25.2"
},

@@ -14,0 +14,0 @@ "publishConfig": {

@@ -9,2 +9,3 @@ import * as Chunk from "@effect/data/Chunk"

import type { Predicate } from "@effect/data/Predicate"
import * as RA from "@effect/data/ReadonlyArray"
import * as Cause from "@effect/io/Cause"

@@ -164,4 +165,3 @@ import * as Effect from "@effect/io/Effect"

export const collectAll = Debug.methodWithTrace((trace) =>
<R, E, A>(iterable: Iterable<STM.STM<R, E, A>>): STM.STM<R, E, Chunk.Chunk<A>> =>
forEach(iterable, identity).traced(trace)
<R, E, A>(iterable: Iterable<STM.STM<R, E, A>>): STM.STM<R, E, Array<A>> => forEach(iterable, identity).traced(trace)
)

@@ -311,24 +311,21 @@

export const filter = Debug.dualWithTrace<
<A, R, E>(predicate: (a: A) => STM.STM<R, E, boolean>) => (iterable: Iterable<A>) => STM.STM<R, E, Chunk.Chunk<A>>,
<A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM.STM<R, E, boolean>) => STM.STM<R, E, Chunk.Chunk<A>>
<A, R, E>(predicate: (a: A) => STM.STM<R, E, boolean>) => (iterable: Iterable<A>) => STM.STM<R, E, Array<A>>,
<A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM.STM<R, E, boolean>) => STM.STM<R, E, Array<A>>
>(
2,
(trace, restore) =>
<A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM.STM<R, E, boolean>): STM.STM<R, E, Chunk.Chunk<A>> =>
pipe(
Array.from(iterable).reduce(
(acc, curr) =>
pipe(
acc,
core.zipWith(restore(predicate)(curr), (as, p) => {
if (p) {
as.push(curr)
return as
}
<A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM.STM<R, E, boolean>): STM.STM<R, E, Array<A>> =>
Array.from(iterable).reduce(
(acc, curr) =>
pipe(
acc,
core.zipWith(restore(predicate)(curr), (as, p) => {
if (p) {
as.push(curr)
return as
})
),
core.succeed([]) as STM.STM<R, E, Array<A>>
),
core.map(Chunk.unsafeFromArray)
}
return as
})
),
core.succeed([]) as STM.STM<R, E, Array<A>>
).traced(trace)

@@ -339,8 +336,8 @@ )

export const filterNot = Debug.dualWithTrace<
<A, R, E>(predicate: (a: A) => STM.STM<R, E, boolean>) => (iterable: Iterable<A>) => STM.STM<R, E, Chunk.Chunk<A>>,
<A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM.STM<R, E, boolean>) => STM.STM<R, E, Chunk.Chunk<A>>
<A, R, E>(predicate: (a: A) => STM.STM<R, E, boolean>) => (iterable: Iterable<A>) => STM.STM<R, E, Array<A>>,
<A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM.STM<R, E, boolean>) => STM.STM<R, E, Array<A>>
>(
2,
(trace, restore) =>
<A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM.STM<R, E, boolean>): STM.STM<R, E, Chunk.Chunk<A>> =>
<A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM.STM<R, E, boolean>): STM.STM<R, E, Array<A>> =>
filter(iterable, (a) => negate(restore(predicate)(a))).traced(trace)

@@ -484,23 +481,20 @@ )

export const forEach = Debug.dualWithTrace<
<A, R, E, A2>(f: (a: A) => STM.STM<R, E, A2>) => (elements: Iterable<A>) => STM.STM<R, E, Chunk.Chunk<A2>>,
<A, R, E, A2>(elements: Iterable<A>, f: (a: A) => STM.STM<R, E, A2>) => STM.STM<R, E, Chunk.Chunk<A2>>
<A, R, E, A2>(f: (a: A) => STM.STM<R, E, A2>) => (elements: Iterable<A>) => STM.STM<R, E, Array<A2>>,
<A, R, E, A2>(elements: Iterable<A>, f: (a: A) => STM.STM<R, E, A2>) => STM.STM<R, E, Array<A2>>
>(
2,
(trace, restore) =>
<A, R, E, A2>(elements: Iterable<A>, f: (a: A) => STM.STM<R, E, A2>): STM.STM<R, E, Chunk.Chunk<A2>> =>
core.map(
suspend(() =>
Array.from(elements).reduce(
(acc, curr) =>
pipe(
acc,
core.zipWith(restore(f)(curr), (array, elem) => {
array.push(elem)
return array
})
),
core.succeed([]) as STM.STM<R, E, Array<A2>>
)
),
Chunk.unsafeFromArray
<A, R, E, A2>(elements: Iterable<A>, f: (a: A) => STM.STM<R, E, A2>): STM.STM<R, E, Array<A2>> =>
suspend(() =>
Array.from(elements).reduce(
(acc, curr) =>
pipe(
acc,
core.zipWith(restore(f)(curr), (array, elem) => {
array.push(elem)
return array
})
),
core.succeed([]) as STM.STM<R, E, Array<A2>>
)
).traced(trace)

@@ -597,10 +591,11 @@ )

(e) => core.fail(Option.some(e)),
(a) =>
pipe(
Chunk.head(Chunk.fromIterable(a)),
Option.match(
() => core.fail(Option.none()),
core.succeed
)
)
(a) => {
const i = a[Symbol.iterator]()
const res = i.next()
if (res.done) {
return core.fail(Option.none())
} else {
return core.succeed(res.value)
}
}
)

@@ -691,4 +686,4 @@ ).traced(trace)

body: (z: Z) => STM.STM<R, E, A>
): STM.STM<R, E, Chunk.Chunk<A>> => {
return loopLoop(initial, restore(cont), restore(inc), restore(body)).traced(trace)
): STM.STM<R, E, Array<A>> => {
return core.map(loopLoop(initial, restore(cont), restore(inc), restore(body)), (a) => Array.from(a)).traced(trace)
}

@@ -1120,10 +1115,10 @@ )

export const replicate = dual<
(n: number) => <R, E, A>(self: STM.STM<R, E, A>) => Chunk.Chunk<STM.STM<R, E, A>>,
<R, E, A>(self: STM.STM<R, E, A>, n: number) => Chunk.Chunk<STM.STM<R, E, A>>
>(2, (self, n) => Chunk.unsafeFromArray(Array.from({ length: n }, () => self)))
(n: number) => <R, E, A>(self: STM.STM<R, E, A>) => Array<STM.STM<R, E, A>>,
<R, E, A>(self: STM.STM<R, E, A>, n: number) => Array<STM.STM<R, E, A>>
>(2, (self, n) => Array.from({ length: n }, () => self))
/** @internal */
export const replicateSTM = Debug.dualWithTrace<
(n: number) => <R, E, A>(self: STM.STM<R, E, A>) => STM.STM<R, E, Chunk.Chunk<A>>,
<R, E, A>(self: STM.STM<R, E, A>, n: number) => STM.STM<R, E, Chunk.Chunk<A>>
(n: number) => <R, E, A>(self: STM.STM<R, E, A>) => STM.STM<R, E, Array<A>>,
<R, E, A>(self: STM.STM<R, E, A>, n: number) => STM.STM<R, E, Array<A>>
>(2, (trace) => (self, n) => pipe(self, replicate(n), collectAll).traced(trace))

@@ -1175,7 +1170,7 @@

elements: Iterable<A>
) => STM.STM<R, never, readonly [Chunk.Chunk<E>, Chunk.Chunk<A2>]>,
) => STM.STM<R, never, readonly [Array<E>, Array<A2>]>,
<R, E, A, A2>(
elements: Iterable<A>,
f: (a: A) => STM.STM<R, E, A2>
) => STM.STM<R, never, readonly [Chunk.Chunk<E>, Chunk.Chunk<A2>]>
) => STM.STM<R, never, readonly [Array<E>, Array<A2>]>
>(2, (trace, restore) =>

@@ -1296,4 +1291,4 @@ (elements, f) =>

return core.map(arguments[0], (x) => [x])
} else if (Array.isArray(arguments[0])) {
return core.map(collectAll(arguments[0]), Chunk.toReadonlyArray).traced(trace)
} else if (Symbol.iterator in arguments[0]) {
return collectAll(arguments[0]).traced(trace)
} else {

@@ -1315,3 +1310,3 @@ return pipe(

}
return core.map(collectAll(arguments), Chunk.toReadonlyArray).traced(trace)
return collectAll(arguments).traced(trace)
}

@@ -1492,7 +1487,7 @@ )

elements: Iterable<A>
) => STM.STM<R, Chunk.NonEmptyChunk<E>, Chunk.Chunk<B>>,
) => STM.STM<R, RA.NonEmptyArray<E>, Array<B>>,
<R, E, A, B>(
elements: Iterable<A>,
f: (a: A) => STM.STM<R, E, B>
) => STM.STM<R, Chunk.NonEmptyChunk<E>, Chunk.Chunk<B>>
) => STM.STM<R, RA.NonEmptyArray<E>, Array<B>>
>(

@@ -1503,3 +1498,3 @@ 2,

core.flatMap(partition(elements, restore(f)), ([errors, values]) =>
Chunk.isNonEmpty(errors) ?
RA.isNonEmptyArray(errors) ?
core.fail(errors) :

@@ -1511,4 +1506,4 @@ core.succeed(values)).traced(trace)

export const validateFirst = Debug.dualWithTrace<
<R, E, A, B>(f: (a: A) => STM.STM<R, E, B>) => (elements: Iterable<A>) => STM.STM<R, Chunk.Chunk<E>, B>,
<R, E, A, B>(elements: Iterable<A>, f: (a: A) => STM.STM<R, E, B>) => STM.STM<R, Chunk.Chunk<E>, B>
<R, E, A, B>(f: (a: A) => STM.STM<R, E, B>) => (elements: Iterable<A>) => STM.STM<R, Array<E>, B>,
<R, E, A, B>(elements: Iterable<A>, f: (a: A) => STM.STM<R, E, B>) => STM.STM<R, Array<E>, B>
>(2, (trace, restore) => (elements, f) => flip(forEach(elements, (a) => flip(restore(f)(a)))).traced(trace))

@@ -1515,0 +1510,0 @@

@@ -1,2 +0,1 @@

import * as Chunk from "@effect/data/Chunk"
import * as Debug from "@effect/data/Debug"

@@ -29,3 +28,3 @@ import * as Equal from "@effect/data/Equal"

readonly [TArrayTypeId] = tArrayVariance
constructor(readonly chunk: Chunk.Chunk<TRef.TRef<A>>) {}
constructor(readonly chunk: Array<TRef.TRef<A>>) {}
}

@@ -63,3 +62,3 @@

while (Option.isNone(result) && index < self.chunk.length) {
const element = pipe(self.chunk, Chunk.unsafeGet(index), tRef.unsafeGet(runtime.journal))
const element = pipe(self.chunk[index], tRef.unsafeGet(runtime.journal))
const option = restore(pf)(element)

@@ -184,3 +183,3 @@ if (Option.isSome(option)) {

while (!found && index < self.chunk.length) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal)
const element = tRef.unsafeGet(self.chunk[index], journal)
found = restore(predicate)(element)

@@ -227,3 +226,3 @@ index = index + 1

? pipe(
tRef.get(Chunk.unsafeGet(self.chunk, index)),
tRef.get(self.chunk[index]),
core.flatMap(restore(predicate)),

@@ -262,3 +261,3 @@ core.flatMap((bool) =>

return pipe(
tRef.get(Chunk.unsafeGet(self.chunk, index)),
tRef.get(self.chunk[index]),
core.flatMap((value) =>

@@ -288,3 +287,3 @@ core.map(

while (Option.isNone(result) && index >= 0) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal)
const element = tRef.unsafeGet(self.chunk[index], journal)
if (restore(predicate)(element)) {

@@ -318,3 +317,3 @@ result = Option.some(element)

while (!found && index >= 0) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal)
const element = tRef.unsafeGet(self.chunk[index], journal)
found = Equal.equals(element)(value)

@@ -347,3 +346,3 @@ index = index - 1

return pipe(
tRef.get(Chunk.unsafeGet(self.chunk, index)),
tRef.get(self.chunk[index]),
core.flatMap((value) =>

@@ -385,3 +384,3 @@ core.map(

}
return tRef.get(Chunk.unsafeGet(self.chunk, index)).traced(trace)
return tRef.get(self.chunk[index]).traced(trace)
})

@@ -392,5 +391,5 @@

<A>(self: TArray.TArray<A>): STM.STM<never, never, Option.Option<A>> =>
Chunk.isEmpty(self.chunk) ?
self.chunk.length === 0 ?
core.succeed(Option.none()).traced(trace) :
core.map(tRef.get(Chunk.unsafeHead(self.chunk)), Option.some).traced(trace)
core.map(tRef.get(self.chunk[0]), Option.some).traced(trace)
)

@@ -401,5 +400,5 @@

<A>(self: TArray.TArray<A>): STM.STM<never, never, Option.Option<A>> =>
Chunk.isEmpty(self.chunk) ?
self.chunk.length === 0 ?
stm.succeedNone().traced(trace) :
core.map(tRef.get(Chunk.unsafeLast(self.chunk)), Option.some).traced(trace)
core.map(tRef.get(self.chunk[self.chunk.length - 1]), Option.some).traced(trace)
)

@@ -446,3 +445,3 @@

while (index < self.chunk.length) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal)
const element = tRef.unsafeGet(self.chunk[index], journal)
result = restore(f)(result, element)

@@ -467,3 +466,3 @@ index = index + 1

while (index < self.chunk.length) {
const element = tRef.unsafeGet(Chunk.unsafeGet(self.chunk, index), journal)
const element = tRef.unsafeGet(self.chunk[index], journal)
result = result === undefined ? element : restore(f)(result, element)

@@ -504,3 +503,3 @@ index = index + 1

core.flatMap(
toChunk(self),
toArray(self),
stm.reduce(zero, restore(f))

@@ -530,4 +529,4 @@ ).traced(trace))

/** @internal */
export const toChunk = Debug.methodWithTrace((trace) =>
<A>(self: TArray.TArray<A>): STM.STM<never, never, Chunk.Chunk<A>> => stm.forEach(self.chunk, tRef.get).traced(trace)
export const toArray = Debug.methodWithTrace((trace) =>
<A>(self: TArray.TArray<A>): STM.STM<never, never, Array<A>> => stm.forEach(self.chunk, tRef.get).traced(trace)
)

@@ -544,3 +543,3 @@

while (index < self.chunk.length) {
const ref = pipe(self.chunk, Chunk.unsafeGet(index))
const ref = self.chunk[index]
tRef.unsafeSet(ref, restore(f)(tRef.unsafeGet(ref, journal)), journal)

@@ -569,3 +568,3 @@ index = index + 1

while ((next = iterator.next()) && !next.done) {
tRef.unsafeSet(Chunk.unsafeGet(self.chunk, index), next.value, journal)
tRef.unsafeSet(self.chunk[index], next.value, journal)
index = index + 1

@@ -586,3 +585,3 @@ }

}
return tRef.update(Chunk.unsafeGet(self.chunk, index), restore(f)).traced(trace)
return tRef.update(self.chunk[index], restore(f)).traced(trace)
})

@@ -600,6 +599,6 @@

return pipe(
tRef.get(Chunk.unsafeGet(self.chunk, index)),
tRef.get(self.chunk[index]),
core.flatMap(restore(f)),
core.flatMap((updated) => tRef.set(Chunk.unsafeGet(self.chunk, index), updated))
core.flatMap((updated) => tRef.set(self.chunk[index], updated))
).traced(trace)
})

@@ -1,2 +0,1 @@

import * as Chunk from "@effect/data/Chunk"
import * as Debug from "@effect/data/Debug"

@@ -6,2 +5,3 @@ import { identity, pipe } from "@effect/data/Function"

import * as Option from "@effect/data/Option"
import * as RA from "@effect/data/ReadonlyArray"
import * as Effect from "@effect/io/Effect"

@@ -161,3 +161,3 @@ import type * as Scope from "@effect/io/Scope"

stm.forEach(iterable, (a) => this.offer(a)),
Chunk.every(identity)
RA.every(identity)
).traced(trace)

@@ -416,7 +416,7 @@ )

takeAll(): STM.STM<never, never, Chunk.Chunk<A>> {
takeAll(): STM.STM<never, never, Array<A>> {
return Debug.bodyWithTrace((trace) => this.takeUpTo(Number.POSITIVE_INFINITY).traced(trace))
}
takeUpTo(max: number): STM.STM<never, never, Chunk.Chunk<A>> {
takeUpTo(max: number): STM.STM<never, never, Array<A>> {
return Debug.bodyWithTrace((trace) =>

@@ -460,3 +460,3 @@ core.withSTMRuntime((runtime) => {

)
return core.succeed(Chunk.unsafeFromArray(builder))
return core.succeed(builder)
}).traced(trace)

@@ -463,0 +463,0 @@ )

@@ -9,2 +9,3 @@ import * as Chunk from "@effect/data/Chunk"

import * as Option from "@effect/data/Option"
import * as RA from "@effect/data/ReadonlyArray"
import * as core from "@effect/stm/internal_effect_untraced/core"

@@ -145,7 +146,7 @@ import * as stm from "@effect/stm/internal_effect_untraced/stm"

pf: (key: K, value: V) => Option.Option<A>
) => (self: TMap.TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<A>>,
) => (self: TMap.TMap<K, V>) => STM.STM<never, never, Array<A>>,
<K, V, A>(
self: TMap.TMap<K, V>,
pf: (key: K, value: V) => Option.Option<A>
) => STM.STM<never, never, Chunk.Chunk<A>>
) => STM.STM<never, never, Array<A>>
>(2, (trace, restore) =>

@@ -165,7 +166,7 @@ (self, pf) =>

pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>
) => (self: TMap.TMap<K, V>) => STM.STM<R, E, Chunk.Chunk<A>>,
) => (self: TMap.TMap<K, V>) => STM.STM<R, E, Array<A>>,
<K, V, R, E, A>(
self: TMap.TMap<K, V>,
pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>
) => STM.STM<R, E, Chunk.Chunk<A>>
) => STM.STM<R, E, Array<A>>
>(2, (trace, restore) =>

@@ -176,11 +177,14 @@ <K, V, R, E, A>(

) =>
reduceWithIndexSTM(self, Chunk.empty<A>(), (acc, value, key) =>
core.matchSTM(
restore(pf)(key, value),
Option.match(
() => core.succeed(acc),
core.fail
),
(a) => core.succeed(Chunk.append(acc, a))
)).traced(trace))
core.map(
reduceWithIndexSTM(self, Chunk.empty<A>(), (acc, value, key) =>
core.matchSTM(
restore(pf)(key, value),
Option.match(
() => core.succeed(acc),
core.fail
),
(a) => core.succeed(Chunk.append(acc, a))
)),
(a) => Array.from(a)
).traced(trace))

@@ -220,3 +224,3 @@ /** @internal */

const index = indexOf(key, buckets.chunk.length)
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const bucket = tRef.unsafeGet(buckets.chunk[index], journal)
return pipe(

@@ -253,4 +257,4 @@ Chunk.findFirst(bucket, (entry) => Equal.equals(entry[0])(key)),

export const keys = Debug.methodWithTrace((trace) =>
<K, V>(self: TMap.TMap<K, V>): STM.STM<never, never, Chunk.Chunk<K>> =>
core.map(toChunk(self), Chunk.map((entry) => entry[0])).traced(trace)
<K, V>(self: TMap.TMap<K, V>): STM.STM<never, never, Array<K>> =>
core.map(toArray(self), RA.map((entry) => entry[0])).traced(trace)
)

@@ -318,3 +322,3 @@

while (index < buckets.chunk.length) {
const bucket = Chunk.unsafeGet(buckets.chunk, index)
const bucket = buckets.chunk[index]
const items = tRef.unsafeGet(bucket, journal)

@@ -342,3 +346,3 @@ result = Chunk.reduce(items, result, (acc, entry) => restore(f)(acc, entry[1], entry[0]))

core.flatMap(
toChunk(self),
toArray(self),
stm.reduce(zero, (acc, entry) => restore(f)(acc, entry[1], entry[0]))

@@ -356,7 +360,7 @@ ).traced(trace))

const index = indexOf(key, buckets.chunk.length)
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const bucket = tRef.unsafeGet(buckets.chunk[index], journal)
const [toRemove, toRetain] = Chunk.partition(bucket, (entry) => Equal.equals(entry[1], key))
if (Chunk.isNonEmpty(toRemove)) {
const currentSize = tRef.unsafeGet(self.tSize, journal)
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), toRetain, journal)
tRef.unsafeSet(buckets.chunk[index], toRetain, journal)
tRef.unsafeSet(self.tSize, currentSize - 1, journal)

@@ -378,7 +382,7 @@ }

const index = indexOf(next.value, buckets.chunk.length)
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const bucket = tRef.unsafeGet(buckets.chunk[index], journal)
const [toRemove, toRetain] = Chunk.partition(bucket, (entry) => Equal.equals(next.value)(entry[0]))
if (Chunk.isNonEmpty(toRemove)) {
const currentSize = tRef.unsafeGet(self.tSize, journal)
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), toRetain, journal)
tRef.unsafeSet(buckets.chunk[index], toRetain, journal)
tRef.unsafeSet(self.tSize, currentSize - 1, journal)

@@ -393,7 +397,7 @@ }

predicate: (key: K, value: V) => boolean
) => (self: TMap.TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>,
) => (self: TMap.TMap<K, V>) => STM.STM<never, never, Array<readonly [K, V]>>,
<K, V>(
self: TMap.TMap<K, V>,
predicate: (key: K, value: V) => boolean
) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>
) => STM.STM<never, never, Array<readonly [K, V]>>
>(2, (trace, restore) =>

@@ -404,3 +408,3 @@ <K, V>(

) =>
core.effect<never, Chunk.Chunk<readonly [K, V]>>((journal) => {
core.effect<never, Array<readonly [K, V]>>((journal) => {
const buckets = tRef.unsafeGet(self.tBuckets, journal)

@@ -412,3 +416,3 @@ const capacity = buckets.chunk.length

while (index < capacity) {
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const bucket = tRef.unsafeGet(buckets.chunk[index], journal)
const iterator = bucket[Symbol.iterator]()

@@ -425,7 +429,7 @@ let next: IteratorResult<readonly [K, V], any>

}
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal)
tRef.unsafeSet(buckets.chunk[index], newBucket, journal)
index = index + 1
}
tRef.unsafeSet(self.tSize, newSize, journal)
return Chunk.unsafeFromArray(removed)
return removed
}).traced(trace))

@@ -447,3 +451,3 @@

while (index < capacity) {
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const bucket = tRef.unsafeGet(buckets.chunk[index], journal)
const iterator = bucket[Symbol.iterator]()

@@ -458,3 +462,3 @@ let next: IteratorResult<readonly [K, V], any>

}
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal)
tRef.unsafeSet(buckets.chunk[index], newBucket, journal)
index = index + 1

@@ -470,7 +474,7 @@ }

predicate: (key: K, value: V) => boolean
) => (self: TMap.TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>,
) => (self: TMap.TMap<K, V>) => STM.STM<never, never, Array<readonly [K, V]>>,
<K, V>(
self: TMap.TMap<K, V>,
predicate: (key: K, value: V) => boolean
) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>
) => STM.STM<never, never, Array<readonly [K, V]>>
>(

@@ -504,3 +508,3 @@ 2,

while (index < capacity) {
const pairs = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const pairs = tRef.unsafeGet(buckets.chunk[index], journal)
const iterator = pairs[Symbol.iterator]()

@@ -524,5 +528,3 @@ let next: IteratorResult<readonly [K, V], any>

}
const newTArray: TArray.TArray<Chunk.Chunk<readonly [K, V]>> = new tArray.TArrayImpl(
Chunk.unsafeFromArray(newArray)
)
const newTArray: TArray.TArray<Chunk.Chunk<readonly [K, V]>> = new tArray.TArrayImpl(newArray)
tRef.unsafeSet(self.tBuckets, newTArray, journal)

@@ -534,3 +536,3 @@ }

const index = indexOf(key, capacity)
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const bucket = tRef.unsafeGet(buckets.chunk[index], journal)
const shouldUpdate = Chunk.some(bucket, (entry) => Equal.equals(key)(entry[0]))

@@ -542,3 +544,3 @@ if (shouldUpdate) {

entry)
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal)
tRef.unsafeSet(buckets.chunk[index], newBucket, journal)
} else {

@@ -551,3 +553,3 @@ const newSize = tRef.unsafeGet(self.tSize, journal) + 1

const newBucket = Chunk.prepend(bucket, [key, value] as const)
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal)
tRef.unsafeSet(buckets.chunk[index], newBucket, journal)
}

@@ -591,3 +593,3 @@ }

while (index < capacity && Option.isNone(result)) {
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const bucket = tRef.unsafeGet(buckets.chunk[index], journal)
const recreate = Chunk.some(bucket, (entry) => Option.isSome(pf(entry[0], entry[1])))

@@ -606,3 +608,3 @@ if (recreate) {

}
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal)
tRef.unsafeSet(buckets.chunk[index], newBucket, journal)
}

@@ -641,11 +643,11 @@ index = index + 1

pf: (key: K, value: V) => Option.Option<A>
) => (self: TMap.TMap<K, V>) => STM.STM<never, never, Chunk.NonEmptyChunk<A>>,
) => (self: TMap.TMap<K, V>) => STM.STM<never, never, RA.NonEmptyArray<A>>,
<K, V, A>(
self: TMap.TMap<K, V>,
pf: (key: K, value: V) => Option.Option<A>
) => STM.STM<never, never, Chunk.NonEmptyChunk<A>>
) => STM.STM<never, never, RA.NonEmptyArray<A>>
>(2, (trace, restore) =>
<K, V, A>(self: TMap.TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>) =>
pipe(
core.effect<never, Option.Option<Chunk.NonEmptyChunk<A>>>((journal) => {
core.effect<never, Option.Option<RA.NonEmptyArray<A>>>((journal) => {
const buckets = tRef.unsafeGet(self.tBuckets, journal)

@@ -657,3 +659,3 @@ const capacity = buckets.chunk.length

while (index < capacity) {
const bucket = tRef.unsafeGet(Chunk.unsafeGet(buckets.chunk, index), journal)
const bucket = tRef.unsafeGet(buckets.chunk[index], journal)
const recreate = Chunk.some(bucket, (entry) => Option.isSome(restore(pf)(entry[0], entry[1])))

@@ -673,3 +675,3 @@ if (recreate) {

}
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBucket, journal)
tRef.unsafeSet(buckets.chunk[index], newBucket, journal)
} else {

@@ -682,3 +684,3 @@ newSize = newSize + bucket.length

if (builder.length > 0) {
return Option.some(Chunk.unsafeFromArray(builder) as Chunk.NonEmptyChunk<A>)
return Option.some(builder as RA.NonEmptyArray<A>)
}

@@ -698,7 +700,7 @@ return Option.none()

pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>
) => (self: TMap.TMap<K, V>) => STM.STM<R, E, Chunk.NonEmptyChunk<A>>,
) => (self: TMap.TMap<K, V>) => STM.STM<R, E, RA.NonEmptyArray<A>>,
<K, V, R, E, A>(
self: TMap.TMap<K, V>,
pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>
) => STM.STM<R, E, Chunk.NonEmptyChunk<A>>
) => STM.STM<R, E, RA.NonEmptyArray<A>>
>(2, (trace, restore) =>

@@ -715,3 +717,3 @@ <K, V, R, E, A>(

core.map((chunk) =>
Chunk.isNonEmpty(chunk) ?
RA.isNonEmptyArray(chunk) ?
Option.some(chunk) :

@@ -727,4 +729,4 @@ Option.none()

stm.as(
removeAll(self, Chunk.map(entries, (entry) => entry[0])),
Chunk.map(entries, (entry) => entry[1]) as Chunk.NonEmptyChunk<A>
removeAll(self, entries.map((entry) => entry[0])),
RA.map(entries, (entry) => entry[1]) as RA.NonEmptyArray<A>
)

@@ -735,5 +737,5 @@ )

/** @internal */
export const toChunk = Debug.methodWithTrace((trace) =>
<K, V>(self: TMap.TMap<K, V>): STM.STM<never, never, Chunk.Chunk<readonly [K, V]>> =>
core.effect<never, Chunk.Chunk<readonly [K, V]>>((journal) => {
export const toArray = Debug.methodWithTrace((trace) =>
<K, V>(self: TMap.TMap<K, V>): STM.STM<never, never, Array<readonly [K, V]>> =>
core.effect<never, Array<readonly [K, V]>>((journal) => {
const buckets = tRef.unsafeGet(self.tBuckets, journal)

@@ -744,7 +746,7 @@ const capacity = buckets.chunk.length

while (index < capacity) {
const bucket = Chunk.unsafeGet(buckets.chunk, index)
const bucket = buckets.chunk[index]
builder.push(...tRef.unsafeGet(bucket, journal))
index = index + 1
}
return Chunk.unsafeFromArray(builder)
return builder
}).traced(trace)

@@ -799,3 +801,3 @@ )

while (index < capacity) {
const bucket = Chunk.unsafeGet(buckets.chunk, index)
const bucket = buckets.chunk[index]
const pairs = tRef.unsafeGet(bucket, journal)

@@ -817,3 +819,3 @@ const iterator = pairs[Symbol.iterator]()

while (index < capacity) {
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBuckets[index], journal)
tRef.unsafeSet(buckets.chunk[index], newBuckets[index], journal)
index = index + 1

@@ -837,3 +839,3 @@ }

core.flatMap(
toChunk(self),
toArray(self),
stm.forEach((entry) => restore(f)(entry[0], entry[1]))

@@ -859,3 +861,3 @@ ),

while (index < capacity) {
tRef.unsafeSet(Chunk.unsafeGet(buckets.chunk, index), newBuckets[index], journal)
tRef.unsafeSet(buckets.chunk[index], newBuckets[index], journal)
index = index + 1

@@ -910,4 +912,4 @@ }

export const values = Debug.methodWithTrace((trace) =>
<K, V>(self: TMap.TMap<K, V>): STM.STM<never, never, Chunk.Chunk<V>> =>
core.map(toChunk(self), Chunk.map((entry) => entry[1])).traced(trace)
<K, V>(self: TMap.TMap<K, V>): STM.STM<never, never, Array<V>> =>
core.map(toArray(self), RA.map((entry) => entry[1])).traced(trace)
)

@@ -1,2 +0,1 @@

import * as Chunk from "@effect/data/Chunk"
import * as Debug from "@effect/data/Debug"

@@ -211,3 +210,3 @@ import { pipe } from "@effect/data/Function"

export const takeAll = Debug.methodWithTrace((trace) =>
<A>(self: TPriorityQueue.TPriorityQueue<A>): STM.STM<never, never, Chunk.Chunk<A>> =>
<A>(self: TPriorityQueue.TPriorityQueue<A>): STM.STM<never, never, Array<A>> =>
tRef.modify(self.ref, (map) => {

@@ -218,3 +217,3 @@ const builder: Array<A> = []

}
return [Chunk.unsafeFromArray(builder), SortedMap.empty(SortedMap.getOrder(map))]
return [builder, SortedMap.empty(SortedMap.getOrder(map))]
}).traced(trace)

@@ -250,4 +249,4 @@ )

export const takeUpTo = Debug.dualWithTrace<
(n: number) => <A>(self: TPriorityQueue.TPriorityQueue<A>) => STM.STM<never, never, Chunk.Chunk<A>>,
<A>(self: TPriorityQueue.TPriorityQueue<A>, n: number) => STM.STM<never, never, Chunk.Chunk<A>>
(n: number) => <A>(self: TPriorityQueue.TPriorityQueue<A>) => STM.STM<never, never, Array<A>>,
<A>(self: TPriorityQueue.TPriorityQueue<A>, n: number) => STM.STM<never, never, Array<A>>
>(2, (trace) =>

@@ -272,3 +271,3 @@ <A>(self: TPriorityQueue.TPriorityQueue<A>, n: number) =>

}
return [Chunk.unsafeFromArray(builder), updated]
return [builder, updated]
}).traced(trace))

@@ -278,3 +277,3 @@

export const toChunk = Debug.methodWithTrace((trace) =>
<A>(self: TPriorityQueue.TPriorityQueue<A>): STM.STM<never, never, Chunk.Chunk<A>> =>
<A>(self: TPriorityQueue.TPriorityQueue<A>): STM.STM<never, never, Array<A>> =>
tRef.modify(self.ref, (map) => {

@@ -285,3 +284,3 @@ const builder: Array<A> = []

}
return [Chunk.unsafeFromArray(builder), map]
return [builder, map]
}).traced(trace)

@@ -288,0 +287,0 @@ )

@@ -6,2 +6,3 @@ import * as Chunk from "@effect/data/Chunk"

import type { Predicate } from "@effect/data/Predicate"
import * as RA from "@effect/data/ReadonlyArray"
import * as core from "@effect/stm/internal_effect_untraced/core"

@@ -258,3 +259,3 @@ import * as OpCodes from "@effect/stm/internal_effect_untraced/opCodes/strategy"

takeAll(): STM.STM<never, never, Chunk.Chunk<A>> {
takeAll(): STM.STM<never, never, Array<A>> {
return Debug.bodyWithTrace((trace) =>

@@ -267,3 +268,3 @@ core.withSTMRuntime((runtime) => {

tRef.unsafeSet(this.ref, [], runtime.journal)
return core.succeed(Chunk.unsafeFromArray(queue))
return core.succeed(queue)
}).traced(trace)

@@ -273,3 +274,3 @@ )

takeUpTo(max: number): STM.STM<never, never, Chunk.Chunk<A>> {
takeUpTo(max: number): STM.STM<never, never, Array<A>> {
return Debug.bodyWithTrace((trace) =>

@@ -283,3 +284,3 @@ core.withSTMRuntime((runtime) => {

tRef.unsafeSet<Array<A> | undefined>(this.ref, Array.from(remaining), runtime.journal)
return core.succeed(toTake)
return core.succeed(Array.from(toTake))
}).traced(trace)

@@ -367,3 +368,3 @@ )

<A>(self: TQueue.TDequeue<A>): STM.STM<never, never, Option.Option<A>> =>
pipe(self.takeUpTo(1), core.map(Chunk.head)).traced(trace)
pipe(self.takeUpTo(1), core.map(RA.head)).traced(trace)
)

@@ -406,3 +407,3 @@

export const takeAll = Debug.methodWithTrace((trace) =>
<A>(self: TQueue.TDequeue<A>): STM.STM<never, never, Chunk.Chunk<A>> => self.takeAll().traced(trace)
<A>(self: TQueue.TDequeue<A>): STM.STM<never, never, Array<A>> => self.takeAll().traced(trace)
)

@@ -412,8 +413,8 @@

export const takeBetween = Debug.dualWithTrace<
(min: number, max: number) => <A>(self: TQueue.TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>,
<A>(self: TQueue.TDequeue<A>, min: number, max: number) => STM.STM<never, never, Chunk.Chunk<A>>
(min: number, max: number) => <A>(self: TQueue.TDequeue<A>) => STM.STM<never, never, Array<A>>,
<A>(self: TQueue.TDequeue<A>, min: number, max: number) => STM.STM<never, never, Array<A>>
>(
3,
(trace) =>
<A>(self: TQueue.TDequeue<A>, min: number, max: number): STM.STM<never, never, Chunk.Chunk<A>> =>
<A>(self: TQueue.TDequeue<A>, min: number, max: number): STM.STM<never, never, Array<A>> =>
stm.suspend(() => {

@@ -435,3 +436,3 @@ const takeRemainder = (

self.take(),
core.map((a) => pipe(acc, Chunk.concat(taken), Chunk.append(a)))
core.map((a) => pipe(acc, Chunk.concat(Chunk.unsafeFromArray(taken)), Chunk.append(a)))
)

@@ -446,3 +447,3 @@ }

max - taken.length - 1,
pipe(acc, Chunk.concat(taken), Chunk.append(a))
pipe(acc, Chunk.concat(Chunk.unsafeFromArray(taken)), Chunk.append(a))
)

@@ -452,7 +453,7 @@ )

}
return core.succeed(pipe(acc, Chunk.concat(taken)))
return core.succeed(pipe(acc, Chunk.concat(Chunk.unsafeFromArray(taken))))
})
)
}
return takeRemainder(min, max, Chunk.empty<A>())
return core.map(takeRemainder(min, max, Chunk.empty<A>()), (c) => Array.from(c))
}).traced(trace)

@@ -463,4 +464,4 @@ )

export const takeN = Debug.dualWithTrace<
(n: number) => <A>(self: TQueue.TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>,
<A>(self: TQueue.TDequeue<A>, n: number) => STM.STM<never, never, Chunk.Chunk<A>>
(n: number) => <A>(self: TQueue.TDequeue<A>) => STM.STM<never, never, Array<A>>,
<A>(self: TQueue.TDequeue<A>, n: number) => STM.STM<never, never, Array<A>>
>(2, (trace) => (self, n) => pipe(self, takeBetween(n, n)).traced(trace))

@@ -470,4 +471,4 @@

export const takeUpTo = Debug.dualWithTrace<
(max: number) => <A>(self: TQueue.TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>,
<A>(self: TQueue.TDequeue<A>, max: number) => STM.STM<never, never, Chunk.Chunk<A>>
(max: number) => <A>(self: TQueue.TDequeue<A>) => STM.STM<never, never, Array<A>>,
<A>(self: TQueue.TDequeue<A>, max: number) => STM.STM<never, never, Array<A>>
>(2, (trace) => (self, max) => self.takeUpTo(max).traced(trace))

@@ -474,0 +475,0 @@

@@ -1,2 +0,1 @@

import type * as Chunk from "@effect/data/Chunk"
import * as Context from "@effect/data/Context"

@@ -53,3 +52,3 @@ import * as Debug from "@effect/data/Debug"

nextIntBounded: (n: number) => STM.STM<never, never, number>
): STM.STM<never, never, Chunk.Chunk<A>> => {
): STM.STM<never, never, Array<A>> => {
const swap = (buffer: TArray.TArray<A>, index1: number, index2: number): STM.STM<never, never, void> =>

@@ -82,3 +81,3 @@ pipe(

stm.forEachDiscard((n) => pipe(nextIntBounded(n), core.flatMap((k) => swap(buffer, n - 1, k)))),
core.zipRight(tArray.toChunk(buffer))
core.zipRight(tArray.toArray(buffer))
)

@@ -112,3 +111,3 @@ })

}
shuffle<A>(elements: Iterable<A>): STM.STM<never, never, Chunk.Chunk<A>> {
shuffle<A>(elements: Iterable<A>): STM.STM<never, never, Array<A>> {
return Debug.bodyWithTrace((trace) => shuffleWith(elements, (n) => this.nextIntBetween(0, n)).traced(trace))

@@ -160,4 +159,4 @@ }

export const shuffle = Debug.methodWithTrace((trace) =>
<A>(elements: Iterable<A>): STM.STM<TRandom.TRandom, never, Chunk.Chunk<A>> =>
<A>(elements: Iterable<A>): STM.STM<TRandom.TRandom, never, Array<A>> =>
core.flatMap(Tag, (random) => random.shuffle(elements)).traced(trace)
)

@@ -1,2 +0,1 @@

import * as Chunk from "@effect/data/Chunk"
import * as Debug from "@effect/data/Debug"

@@ -7,2 +6,3 @@ import { pipe } from "@effect/data/Function"

import type { Predicate } from "@effect/data/Predicate"
import * as RA from "@effect/data/ReadonlyArray"
import * as core from "@effect/stm/internal_effect_untraced/core"

@@ -137,4 +137,4 @@ import * as tMap from "@effect/stm/internal_effect_untraced/tMap"

export const removeIf = Debug.dualWithTrace<
<A>(predicate: Predicate<A>) => (self: TSet.TSet<A>) => STM.STM<never, never, Chunk.Chunk<A>>,
<A>(self: TSet.TSet<A>, predicate: Predicate<A>) => STM.STM<never, never, Chunk.Chunk<A>>
<A>(predicate: Predicate<A>) => (self: TSet.TSet<A>) => STM.STM<never, never, Array<A>>,
<A>(self: TSet.TSet<A>, predicate: Predicate<A>) => STM.STM<never, never, Array<A>>
>(2, (trace, restore) =>

@@ -144,3 +144,3 @@ (self, predicate) =>

tMap.removeIf(self.tMap, (key) => restore(predicate)(key)),
core.map(Chunk.map((entry) => entry[0]))
core.map(RA.map((entry) => entry[0]))
).traced(trace))

@@ -161,4 +161,4 @@

export const retainIf = Debug.dualWithTrace<
<A>(predicate: Predicate<A>) => (self: TSet.TSet<A>) => STM.STM<never, never, Chunk.Chunk<A>>,
<A>(self: TSet.TSet<A>, predicate: Predicate<A>) => STM.STM<never, never, Chunk.Chunk<A>>
<A>(predicate: Predicate<A>) => (self: TSet.TSet<A>) => STM.STM<never, never, Array<A>>,
<A>(self: TSet.TSet<A>, predicate: Predicate<A>) => STM.STM<never, never, Array<A>>
>(2, (trace, restore) =>

@@ -168,3 +168,3 @@ (self, predicate) =>

tMap.retainIf(self.tMap, (key) => restore(predicate)(key)),
core.map(Chunk.map((entry) => entry[0]))
core.map(RA.map((entry) => entry[0]))
).traced(trace))

@@ -203,4 +203,4 @@

export const takeSome = Debug.dualWithTrace<
<A, B>(pf: (a: A) => Option.Option<B>) => (self: TSet.TSet<A>) => STM.STM<never, never, Chunk.NonEmptyChunk<B>>,
<A, B>(self: TSet.TSet<A>, pf: (a: A) => Option.Option<B>) => STM.STM<never, never, Chunk.NonEmptyChunk<B>>
<A, B>(pf: (a: A) => Option.Option<B>) => (self: TSet.TSet<A>) => STM.STM<never, never, RA.NonEmptyArray<B>>,
<A, B>(self: TSet.TSet<A>, pf: (a: A) => Option.Option<B>) => STM.STM<never, never, RA.NonEmptyArray<B>>
>(2, (trace, restore) => (self, pf) => tMap.takeSome(self.tMap, (key) => restore(pf)(key)).traced(trace))

@@ -212,7 +212,7 @@

pf: (a: A) => STM.STM<R, Option.Option<E>, B>
) => (self: TSet.TSet<A>) => STM.STM<R, E, Chunk.NonEmptyChunk<B>>,
) => (self: TSet.TSet<A>) => STM.STM<R, E, RA.NonEmptyArray<B>>,
<A, R, E, B>(
self: TSet.TSet<A>,
pf: (a: A) => STM.STM<R, Option.Option<E>, B>
) => STM.STM<R, E, Chunk.NonEmptyChunk<B>>
) => STM.STM<R, E, RA.NonEmptyArray<B>>
>(2, (trace, restore) => (self, pf) => tMap.takeSomeSTM(self.tMap, (key) => restore(pf)(key)).traced(trace))

@@ -222,3 +222,3 @@

export const toChunk = Debug.methodWithTrace((trace) =>
<A>(self: TSet.TSet<A>): STM.STM<never, never, Chunk.Chunk<A>> => tMap.keys(self.tMap).traced(trace)
<A>(self: TSet.TSet<A>): STM.STM<never, never, Array<A>> => tMap.keys(self.tMap).traced(trace)
)

@@ -225,0 +225,0 @@

/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk"
import type * as Option from "@effect/data/Option"

@@ -35,3 +34,3 @@ import type { Predicate } from "@effect/data/Predicate"

/** @internal */
readonly chunk: Chunk.Chunk<TRef.TRef<A>>
readonly chunk: Array<TRef.TRef<A>>
}

@@ -452,3 +451,3 @@

*/
export const toChunk: <A>(self: TArray<A>) => STM.STM<never, never, Chunk.Chunk<A>> = internal.toChunk
export const toArray: <A>(self: TArray<A>) => STM.STM<never, never, Array<A>> = internal.toArray

@@ -455,0 +454,0 @@ /**

@@ -105,4 +105,4 @@ /**

export const findAll: {
<K, V, A>(pf: (key: K, value: V) => Option.Option<A>): (self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<A>>
<K, V, A>(self: TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>): STM.STM<never, never, Chunk.Chunk<A>>
<K, V, A>(pf: (key: K, value: V) => Option.Option<A>): (self: TMap<K, V>) => STM.STM<never, never, Array<A>>
<K, V, A>(self: TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>): STM.STM<never, never, Array<A>>
} = internal.findAll

@@ -120,7 +120,4 @@

pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>
): (self: TMap<K, V>) => STM.STM<R, E, Chunk.Chunk<A>>
<K, V, R, E, A>(
self: TMap<K, V>,
pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>
): STM.STM<R, E, Chunk.Chunk<A>>
): (self: TMap<K, V>) => STM.STM<R, E, Array<A>>
<K, V, R, E, A>(self: TMap<K, V>, pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): STM.STM<R, E, Array<A>>
} = internal.findAllSTM

@@ -197,3 +194,3 @@

*/
export const keys: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<K>> = internal.keys
export const keys: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Array<K>> = internal.keys

@@ -294,9 +291,4 @@ /**

export const removeIf: {
<K, V>(
predicate: (key: K, value: V) => boolean
): (self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>
<K, V>(
self: TMap<K, V>,
predicate: (key: K, value: V) => boolean
): STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>
<K, V>(predicate: (key: K, value: V) => boolean): (self: TMap<K, V>) => STM.STM<never, never, Array<readonly [K, V]>>
<K, V>(self: TMap<K, V>, predicate: (key: K, value: V) => boolean): STM.STM<never, never, Array<readonly [K, V]>>
} = internal.removeIf

@@ -322,9 +314,4 @@

export const retainIf: {
<K, V>(
predicate: (key: K, value: V) => boolean
): (self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>
<K, V>(
self: TMap<K, V>,
predicate: (key: K, value: V) => boolean
): STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>
<K, V>(predicate: (key: K, value: V) => boolean): (self: TMap<K, V>) => STM.STM<never, never, Array<readonly [K, V]>>
<K, V>(self: TMap<K, V>, predicate: (key: K, value: V) => boolean): STM.STM<never, never, Array<readonly [K, V]>>
} = internal.retainIf

@@ -402,6 +389,4 @@

export const takeSome: {
<K, V, A>(
pf: (key: K, value: V) => Option.Option<A>
): (self: TMap<K, V>) => STM.STM<never, never, Chunk.NonEmptyChunk<A>>
<K, V, A>(self: TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>): STM.STM<never, never, Chunk.NonEmptyChunk<A>>
<K, V, A>(pf: (key: K, value: V) => Option.Option<A>): (self: TMap<K, V>) => STM.STM<never, never, [A, ...Array<A>]>
<K, V, A>(self: TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>): STM.STM<never, never, [A, ...Array<A>]>
} = internal.takeSome

@@ -418,7 +403,7 @@

pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>
): (self: TMap<K, V>) => STM.STM<R, E, Chunk.NonEmptyChunk<A>>
): (self: TMap<K, V>) => STM.STM<R, E, [A, ...Array<A>]>
<K, V, R, E, A>(
self: TMap<K, V>,
pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>
): STM.STM<R, E, Chunk.NonEmptyChunk<A>>
): STM.STM<R, E, [A, ...Array<A>]>
} = internal.takeSomeSTM

@@ -432,3 +417,3 @@

*/
export const toChunk: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>> = internal.toChunk
export const toChunk: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Array<readonly [K, V]>> = internal.toArray

@@ -533,2 +518,2 @@ /**

*/
export const values: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<V>> = internal.values
export const values: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Array<V>> = internal.values
/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk"
import type * as Option from "@effect/data/Option"

@@ -187,3 +186,3 @@ import type { Predicate } from "@effect/data/Predicate"

*/
export const takeAll: <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Chunk.Chunk<A>> = internal.takeAll
export const takeAll: <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Array<A>> = internal.takeAll

@@ -206,4 +205,4 @@ /**

export const takeUpTo: {
(n: number): <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Chunk.Chunk<A>>
<A>(self: TPriorityQueue<A>, n: number): STM.STM<never, never, Chunk.Chunk<A>>
(n: number): <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Array<A>>
<A>(self: TPriorityQueue<A>, n: number): STM.STM<never, never, Array<A>>
} = internal.takeUpTo

@@ -217,3 +216,3 @@

*/
export const toChunk: <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Chunk.Chunk<A>> = internal.toChunk
export const toArray: <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Array<A>> = internal.toChunk

@@ -220,0 +219,0 @@ /**

/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk"
import type * as Option from "@effect/data/Option"

@@ -95,3 +94,3 @@ import type { Predicate } from "@effect/data/Predicate"

*/
takeAll(): STM.STM<never, never, Chunk.Chunk<A>>
takeAll(): STM.STM<never, never, Array<A>>

@@ -101,3 +100,3 @@ /**

*/
takeUpTo(max: number): STM.STM<never, never, Chunk.Chunk<A>>
takeUpTo(max: number): STM.STM<never, never, Array<A>>
}

@@ -389,3 +388,3 @@

*/
export const takeAll: <A>(self: TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>> = internal.takeAll
export const takeAll: <A>(self: TDequeue<A>) => STM.STM<never, never, Array<A>> = internal.takeAll

@@ -401,4 +400,4 @@ /**

export const takeBetween: {
(min: number, max: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>
<A>(self: TDequeue<A>, min: number, max: number): STM.STM<never, never, Chunk.Chunk<A>>
(min: number, max: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Array<A>>
<A>(self: TDequeue<A>, min: number, max: number): STM.STM<never, never, Array<A>>
} = internal.takeBetween

@@ -415,4 +414,4 @@

export const takeN: {
(n: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>
<A>(self: TDequeue<A>, n: number): STM.STM<never, never, Chunk.Chunk<A>>
(n: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Array<A>>
<A>(self: TDequeue<A>, n: number): STM.STM<never, never, Array<A>>
} = internal.takeN

@@ -427,4 +426,4 @@

export const takeUpTo: {
(max: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>
<A>(self: TDequeue<A>, max: number): STM.STM<never, never, Chunk.Chunk<A>>
(max: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Array<A>>
<A>(self: TDequeue<A>, max: number): STM.STM<never, never, Array<A>>
} = internal.takeUpTo

@@ -431,0 +430,0 @@

/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk"
import type * as Context from "@effect/data/Context"

@@ -55,3 +54,3 @@ import type * as Random from "@effect/data/Random"

*/
shuffle<A>(elements: Iterable<A>): STM.STM<never, never, Chunk.Chunk<A>>
shuffle<A>(elements: Iterable<A>): STM.STM<never, never, Array<A>>
}

@@ -131,2 +130,2 @@ /**

*/
export const shuffle: <A>(elements: Iterable<A>) => STM.STM<TRandom, never, Chunk.Chunk<A>> = internal.shuffle
export const shuffle: <A>(elements: Iterable<A>) => STM.STM<TRandom, never, Array<A>> = internal.shuffle
/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk"
import type * as HashSet from "@effect/data/HashSet"

@@ -197,4 +196,4 @@ import type * as Option from "@effect/data/Option"

export const removeIf: {
<A>(predicate: Predicate<A>): (self: TSet<A>) => STM.STM<never, never, Chunk.Chunk<A>>
<A>(self: TSet<A>, predicate: Predicate<A>): STM.STM<never, never, Chunk.Chunk<A>>
<A>(predicate: Predicate<A>): (self: TSet<A>) => STM.STM<never, never, Array<A>>
<A>(self: TSet<A>, predicate: Predicate<A>): STM.STM<never, never, Array<A>>
} = internal.removeIf

@@ -220,4 +219,4 @@

export const retainIf: {
<A>(predicate: Predicate<A>): (self: TSet<A>) => STM.STM<never, never, Chunk.Chunk<A>>
<A>(self: TSet<A>, predicate: Predicate<A>): STM.STM<never, never, Chunk.Chunk<A>>
<A>(predicate: Predicate<A>): (self: TSet<A>) => STM.STM<never, never, Array<A>>
<A>(self: TSet<A>, predicate: Predicate<A>): STM.STM<never, never, Array<A>>
} = internal.retainIf

@@ -273,4 +272,4 @@

export const takeSome: {
<A, B>(pf: (a: A) => Option.Option<B>): (self: TSet<A>) => STM.STM<never, never, Chunk.NonEmptyChunk<B>>
<A, B>(self: TSet<A>, pf: (a: A) => Option.Option<B>): STM.STM<never, never, Chunk.NonEmptyChunk<B>>
<A, B>(pf: (a: A) => Option.Option<B>): (self: TSet<A>) => STM.STM<never, never, [B, ...Array<B>]>
<A, B>(self: TSet<A>, pf: (a: A) => Option.Option<B>): STM.STM<never, never, [B, ...Array<B>]>
} = internal.takeSome

@@ -285,4 +284,4 @@

export const takeSomeSTM: {
<A, R, E, B>(pf: (a: A) => STM.STM<R, Option.Option<E>, B>): (self: TSet<A>) => STM.STM<R, E, Chunk.NonEmptyChunk<B>>
<A, R, E, B>(self: TSet<A>, pf: (a: A) => STM.STM<R, Option.Option<E>, B>): STM.STM<R, E, Chunk.NonEmptyChunk<B>>
<A, R, E, B>(pf: (a: A) => STM.STM<R, Option.Option<E>, B>): (self: TSet<A>) => STM.STM<R, E, [B, ...Array<B>]>
<A, R, E, B>(self: TSet<A>, pf: (a: A) => STM.STM<R, Option.Option<E>, B>): STM.STM<R, E, [B, ...Array<B>]>
} = internal.takeSomeSTM

@@ -296,3 +295,3 @@

*/
export const toChunk: <A>(self: TSet<A>) => STM.STM<never, never, Chunk.Chunk<A>> = internal.toChunk
export const toChunk: <A>(self: TSet<A>) => STM.STM<never, never, Array<A>> = internal.toChunk

@@ -299,0 +298,0 @@ /**

@@ -6,4 +6,4 @@ "use strict";

});
exports.none = exports.nonEmptyTuple = exports.nonEmptyStruct = exports.negate = exports.mergeAll = exports.merge = exports.matchSTM = exports.match = exports.mapError = exports.mapBoth = exports.mapAttempt = exports.map = exports.loopDiscard = exports.loop = exports.letDiscard = exports.let = exports.left = exports.iterate = exports.isSuccess = exports.isSTM = exports.isFailure = exports.interruptAs = exports.interrupt = exports.ignore = exports.ifSTM = exports.head = exports.getFirstSuccessSemigroup = exports.getFailureSemigroup = exports.getFailureMonoid = exports.gen = exports.fromOption = exports.fromEither = exports.forEachDiscard = exports.forEach = exports.flipWith = exports.flip = exports.flattenErrorOption = exports.flatten = exports.flatMapError = exports.flatMap = exports.firstSuccessOf = exports.filterOrFail = exports.filterOrElseWith = exports.filterOrElse = exports.filterOrDieMessage = exports.filterOrDie = exports.filterNot = exports.filter = exports.fiberId = exports.failSync = exports.fail = exports.exists = exports.every = exports.eventually = exports.ensuring = exports.either = exports.dieSync = exports.dieMessage = exports.die = exports.contramapContext = exports.contextWithSTM = exports.contextWith = exports.context = exports.cond = exports.commitEither = exports.commit = exports.collectSTM = exports.collectFirst = exports.collectAllDiscard = exports.collectAll = exports.collect = exports.check = exports.catchSome = exports.catchAll = exports.bindTo = exports.bindDiscard = exports.bind = exports.attempt = exports.asUnit = exports.asSomeError = exports.asSome = exports.as = exports.all = exports.acquireUseRelease = exports.absolve = exports.SemiProduct = exports.SemiCoproduct = exports.SemiApplicative = exports.SemiAlternative = exports.STMTypeId = exports.Product = exports.Pointed = exports.Monad = exports.Invariant = exports.FlatMap = exports.Do = exports.Covariant = exports.Chainable = exports.Bicovariant = exports.Applicative = void 0;
exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.whenSTM = exports.whenCaseSTM = exports.whenCase = exports.when = exports.validateFirst = exports.validateAll = exports.unsome = exports.unright = exports.unlessSTM = exports.unless = exports.unleft = exports.unit = exports.tryCatch = exports.tapError = exports.tapBoth = exports.tap = exports.sync = exports.suspend = exports.summarized = exports.succeedSome = exports.succeedRight = exports.succeedNone = exports.succeedLeft = exports.succeed = exports.someOrFailException = exports.someOrFail = exports.someOrElseSTM = exports.someOrElse = exports.some = exports.right = exports.retryWhile = exports.retryUntil = exports.retry = exports.replicateSTMDiscard = exports.replicateSTM = exports.replicate = exports.repeatWhile = exports.repeatUntil = exports.rejectSTM = exports.reject = exports.refineOrDieWith = exports.refineOrDie = exports.reduceRight = exports.reduceAll = exports.reduce = exports.provideSomeContext = exports.provideServiceSTM = exports.provideService = exports.provideContext = exports.partition = exports.orTry = exports.orElseSucceed = exports.orElseOptional = exports.orElseFail = exports.orElseEither = exports.orElse = exports.orDieWith = exports.orDie = exports.option = void 0;
exports.option = exports.none = exports.nonEmptyTuple = exports.nonEmptyStruct = exports.negate = exports.mergeAll = exports.merge = exports.matchSTM = exports.match = exports.mapError = exports.mapBoth = exports.mapAttempt = exports.map = exports.loopDiscard = exports.loop = exports.letDiscard = exports.let = exports.left = exports.iterate = exports.isSuccess = exports.isSTM = exports.isFailure = exports.interruptAs = exports.interrupt = exports.ignore = exports.ifSTM = exports.head = exports.getFirstSuccessSemigroup = exports.getFailureSemigroup = exports.getFailureMonoid = exports.gen = exports.fromOption = exports.fromEither = exports.forEachDiscard = exports.forEach = exports.flipWith = exports.flip = exports.flattenErrorOption = exports.flatten = exports.flatMapError = exports.flatMap = exports.firstSuccessOf = exports.filterOrFail = exports.filterOrElseWith = exports.filterOrElse = exports.filterOrDieMessage = exports.filterOrDie = exports.filterNot = exports.filter = exports.fiberId = exports.failSync = exports.fail = exports.exists = exports.every = exports.eventually = exports.ensuring = exports.either = exports.dieSync = exports.dieMessage = exports.die = exports.contramapContext = exports.contextWithSTM = exports.contextWith = exports.context = exports.cond = exports.commitEither = exports.commit = exports.collectSTM = exports.collectFirst = exports.collect = exports.check = exports.catchSome = exports.catchAll = exports.bindTo = exports.bindDiscard = exports.bind = exports.attempt = exports.asUnit = exports.asSomeError = exports.asSome = exports.as = exports.allDiscard = exports.all = exports.acquireUseRelease = exports.absolve = exports.SemiProduct = exports.SemiCoproduct = exports.SemiApplicative = exports.SemiAlternative = exports.STMTypeId = exports.Product = exports.Pointed = exports.Monad = exports.Invariant = exports.FlatMap = exports.Do = exports.Covariant = exports.Chainable = exports.Bicovariant = exports.Applicative = void 0;
exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.whenSTM = exports.whenCaseSTM = exports.whenCase = exports.when = exports.validateFirst = exports.validateAll = exports.unsome = exports.unright = exports.unlessSTM = exports.unless = exports.unleft = exports.unit = exports.tryCatch = exports.tapError = exports.tapBoth = exports.tap = exports.sync = exports.suspend = exports.summarized = exports.succeedSome = exports.succeedRight = exports.succeedNone = exports.succeedLeft = exports.succeed = exports.someOrFailException = exports.someOrFail = exports.someOrElseSTM = exports.someOrElse = exports.some = exports.right = exports.retryWhile = exports.retryUntil = exports.retry = exports.replicateSTMDiscard = exports.replicateSTM = exports.replicate = exports.repeatWhile = exports.repeatUntil = exports.rejectSTM = exports.reject = exports.refineOrDieWith = exports.refineOrDie = exports.reduceRight = exports.reduceAll = exports.reduce = exports.provideSomeContext = exports.provideServiceSTM = exports.provideService = exports.provideContext = exports.partition = exports.orTry = exports.orElseSucceed = exports.orElseOptional = exports.orElseFail = exports.orElseEither = exports.orElse = exports.orDieWith = exports.orDie = void 0;
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk"));

@@ -148,11 +148,2 @@ var Debug = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Debug"));

/**
* Collects all the transactional effects in a collection, returning a single
* transactional effect that produces a collection of values.
*
* @since 1.0.0
* @category constructors
*/
exports.collect = collect;
const collectAll = stm.collectAll;
/**
* Collects all the transactional effects, returning a single transactional

@@ -167,4 +158,4 @@ * effect that produces `Unit`.

*/
exports.collectAll = collectAll;
const collectAllDiscard = stm.collectAllDiscard;
exports.collect = collect;
const allDiscard = stm.collectAllDiscard;
/**

@@ -177,3 +168,3 @@ * Collects the first element of the `Iterable<A>` for which the effectual

*/
exports.collectAllDiscard = collectAllDiscard;
exports.allDiscard = allDiscard;
const collectFirst = stm.collectFirst;

@@ -1345,3 +1336,3 @@ /**

product: zip,
productMany: (self, rest) => flatMap(self, a => map(collectAll(rest), r => [a, ...r]))
productMany: (self, rest) => flatMap(self, a => map(all(rest), r => [a, ...r]))
};

@@ -1358,3 +1349,3 @@ /**

productMany: SemiProduct.productMany,
productAll: rest => map(collectAll(rest), x => Array.from(x))
productAll: rest => map(all(rest), x => Array.from(x))
};

@@ -1361,0 +1352,0 @@ /**

/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk";
import type * as Option from "@effect/data/Option";

@@ -393,3 +392,3 @@ import type { Predicate } from "@effect/data/Predicate";

*/
export declare const toChunk: <A>(self: TArray<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
export declare const toArray: <A>(self: TArray<A>) => STM.STM<never, never, Array<A>>;
/**

@@ -396,0 +395,0 @@ * Atomically updates all elements using a pure function.

@@ -6,3 +6,3 @@ "use strict";

});
exports.updateSTM = exports.update = exports.transformSTM = exports.transform = exports.toChunk = exports.someSTM = exports.some = exports.size = exports.reduceSTM = exports.reduceOptionSTM = exports.reduceOption = exports.reduce = exports.minOption = exports.maxOption = exports.make = exports.lastOption = exports.headOption = exports.get = exports.fromIterable = exports.forEach = exports.findLastSTM = exports.findLastIndexFrom = exports.findLastIndex = exports.findLast = exports.findFirstSTM = exports.findFirstIndexWhereSTM = exports.findFirstIndexWhereFromSTM = exports.findFirstIndexWhereFrom = exports.findFirstIndexWhere = exports.findFirstIndexFrom = exports.findFirstIndex = exports.findFirst = exports.everySTM = exports.every = exports.empty = exports.countSTM = exports.count = exports.contains = exports.collectFirstSTM = exports.collectFirst = exports.TArrayTypeId = void 0;
exports.updateSTM = exports.update = exports.transformSTM = exports.transform = exports.toArray = exports.someSTM = exports.some = exports.size = exports.reduceSTM = exports.reduceOptionSTM = exports.reduceOption = exports.reduce = exports.minOption = exports.maxOption = exports.make = exports.lastOption = exports.headOption = exports.get = exports.fromIterable = exports.forEach = exports.findLastSTM = exports.findLastIndexFrom = exports.findLastIndex = exports.findLast = exports.findFirstSTM = exports.findFirstIndexWhereSTM = exports.findFirstIndexWhereFromSTM = exports.findFirstIndexWhereFrom = exports.findFirstIndexWhere = exports.findFirstIndexFrom = exports.findFirstIndex = exports.findFirst = exports.everySTM = exports.every = exports.empty = exports.countSTM = exports.count = exports.contains = exports.collectFirstSTM = exports.collectFirst = exports.TArrayTypeId = void 0;
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/tArray"));

@@ -319,3 +319,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

exports.someSTM = someSTM;
const toChunk = internal.toChunk;
const toArray = internal.toArray;
/**

@@ -327,3 +327,3 @@ * Atomically updates all elements using a pure function.

*/
exports.toChunk = toChunk;
exports.toArray = toArray;
const transform = internal.transform;

@@ -330,0 +330,0 @@ /**

@@ -1,5 +0,1 @@

/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk";
import type { LazyArg } from "@effect/data/Function";

@@ -80,4 +76,4 @@ import type * as HashMap from "@effect/data/HashMap";

export declare const findAll: {
<K, V, A>(pf: (key: K, value: V) => Option.Option<A>): (self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<A>>;
<K, V, A>(self: TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>): STM.STM<never, never, Chunk.Chunk<A>>;
<K, V, A>(pf: (key: K, value: V) => Option.Option<A>): (self: TMap<K, V>) => STM.STM<never, never, Array<A>>;
<K, V, A>(self: TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>): STM.STM<never, never, Array<A>>;
};

@@ -92,4 +88,4 @@ /**

export declare const findAllSTM: {
<K, V, R, E, A>(pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): (self: TMap<K, V>) => STM.STM<R, E, Chunk.Chunk<A>>;
<K, V, R, E, A>(self: TMap<K, V>, pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): STM.STM<R, E, Chunk.Chunk<A>>;
<K, V, R, E, A>(pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): (self: TMap<K, V>) => STM.STM<R, E, Array<A>>;
<K, V, R, E, A>(self: TMap<K, V>, pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): STM.STM<R, E, Array<A>>;
};

@@ -157,3 +153,3 @@ /**

*/
export declare const keys: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<K>>;
export declare const keys: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Array<K>>;
/**

@@ -245,4 +241,4 @@ * Makes a new `TMap` that is initialized with specified values.

export declare const removeIf: {
<K, V>(predicate: (key: K, value: V) => boolean): (self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>;
<K, V>(self: TMap<K, V>, predicate: (key: K, value: V) => boolean): STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>;
<K, V>(predicate: (key: K, value: V) => boolean): (self: TMap<K, V>) => STM.STM<never, never, Array<readonly [K, V]>>;
<K, V>(self: TMap<K, V>, predicate: (key: K, value: V) => boolean): STM.STM<never, never, Array<readonly [K, V]>>;
};

@@ -266,4 +262,4 @@ /**

export declare const retainIf: {
<K, V>(predicate: (key: K, value: V) => boolean): (self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>;
<K, V>(self: TMap<K, V>, predicate: (key: K, value: V) => boolean): STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>;
<K, V>(predicate: (key: K, value: V) => boolean): (self: TMap<K, V>) => STM.STM<never, never, Array<readonly [K, V]>>;
<K, V>(self: TMap<K, V>, predicate: (key: K, value: V) => boolean): STM.STM<never, never, Array<readonly [K, V]>>;
};

@@ -334,4 +330,4 @@ /**

export declare const takeSome: {
<K, V, A>(pf: (key: K, value: V) => Option.Option<A>): (self: TMap<K, V>) => STM.STM<never, never, Chunk.NonEmptyChunk<A>>;
<K, V, A>(self: TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>): STM.STM<never, never, Chunk.NonEmptyChunk<A>>;
<K, V, A>(pf: (key: K, value: V) => Option.Option<A>): (self: TMap<K, V>) => STM.STM<never, never, [A, ...Array<A>]>;
<K, V, A>(self: TMap<K, V>, pf: (key: K, value: V) => Option.Option<A>): STM.STM<never, never, [A, ...Array<A>]>;
};

@@ -345,4 +341,4 @@ /**

export declare const takeSomeSTM: {
<K, V, R, E, A>(pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): (self: TMap<K, V>) => STM.STM<R, E, Chunk.NonEmptyChunk<A>>;
<K, V, R, E, A>(self: TMap<K, V>, pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): STM.STM<R, E, Chunk.NonEmptyChunk<A>>;
<K, V, R, E, A>(pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): (self: TMap<K, V>) => STM.STM<R, E, [A, ...Array<A>]>;
<K, V, R, E, A>(self: TMap<K, V>, pf: (key: K, value: V) => STM.STM<R, Option.Option<E>, A>): STM.STM<R, E, [A, ...Array<A>]>;
};

@@ -355,3 +351,3 @@ /**

*/
export declare const toChunk: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<readonly [K, V]>>;
export declare const toChunk: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Array<readonly [K, V]>>;
/**

@@ -438,3 +434,3 @@ * Collects all bindings into a `HashMap`.

*/
export declare const values: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Chunk.Chunk<V>>;
export declare const values: <K, V>(self: TMap<K, V>) => STM.STM<never, never, Array<V>>;
//# sourceMappingURL=TMap.d.ts.map

@@ -277,3 +277,3 @@ "use strict";

exports.takeSomeSTM = takeSomeSTM;
const toChunk = internal.toChunk;
const toChunk = internal.toArray;
/**

@@ -280,0 +280,0 @@ * Collects all bindings into a `HashMap`.

/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk";
import type * as Option from "@effect/data/Option";

@@ -156,3 +155,3 @@ import type { Predicate } from "@effect/data/Predicate";

*/
export declare const takeAll: <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
export declare const takeAll: <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Array<A>>;
/**

@@ -173,4 +172,4 @@ * Takes a value from the queue, returning `None` if there is not a value in

export declare const takeUpTo: {
(n: number): <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
<A>(self: TPriorityQueue<A>, n: number): STM.STM<never, never, Chunk.Chunk<A>>;
(n: number): <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Array<A>>;
<A>(self: TPriorityQueue<A>, n: number): STM.STM<never, never, Array<A>>;
};

@@ -183,3 +182,3 @@ /**

*/
export declare const toChunk: <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
export declare const toArray: <A>(self: TPriorityQueue<A>) => STM.STM<never, never, Array<A>>;
/**

@@ -186,0 +185,0 @@ * Collects all values into an array.

@@ -6,3 +6,3 @@ "use strict";

});
exports.toReadonlyArray = exports.toChunk = exports.takeUpTo = exports.takeOption = exports.takeAll = exports.take = exports.size = exports.retainIf = exports.removeIf = exports.peekOption = exports.peek = exports.offerAll = exports.offer = exports.make = exports.isNonEmpty = exports.isEmpty = exports.fromIterable = exports.empty = exports.TPriorityQueueTypeId = void 0;
exports.toReadonlyArray = exports.toArray = exports.takeUpTo = exports.takeOption = exports.takeAll = exports.take = exports.size = exports.retainIf = exports.removeIf = exports.peekOption = exports.peek = exports.offerAll = exports.offer = exports.make = exports.isNonEmpty = exports.isEmpty = exports.fromIterable = exports.empty = exports.TPriorityQueueTypeId = void 0;
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stm/internal_effect_untraced/tPriorityQueue"));

@@ -154,3 +154,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

exports.takeUpTo = takeUpTo;
const toChunk = internal.toChunk;
const toArray = internal.toChunk;
/**

@@ -162,5 +162,5 @@ * Collects all values into an array.

*/
exports.toChunk = toChunk;
exports.toArray = toArray;
const toReadonlyArray = internal.toReadonlyArray;
exports.toReadonlyArray = toReadonlyArray;
//# sourceMappingURL=TPriorityQueue.js.map
/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk";
import type * as Option from "@effect/data/Option";

@@ -84,7 +83,7 @@ import type { Predicate } from "@effect/data/Predicate";

*/
takeAll(): STM.STM<never, never, Chunk.Chunk<A>>;
takeAll(): STM.STM<never, never, Array<A>>;
/**
* Takes up to max number of values from the queue.
*/
takeUpTo(max: number): STM.STM<never, never, Chunk.Chunk<A>>;
takeUpTo(max: number): STM.STM<never, never, Array<A>>;
}

@@ -346,3 +345,3 @@ /**

*/
export declare const takeAll: <A>(self: TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
export declare const takeAll: <A>(self: TDequeue<A>) => STM.STM<never, never, Array<A>>;
/**

@@ -357,4 +356,4 @@ * Takes a number of elements from the queue between the specified minimum and

export declare const takeBetween: {
(min: number, max: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
<A>(self: TDequeue<A>, min: number, max: number): STM.STM<never, never, Chunk.Chunk<A>>;
(min: number, max: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Array<A>>;
<A>(self: TDequeue<A>, min: number, max: number): STM.STM<never, never, Array<A>>;
};

@@ -370,4 +369,4 @@ /**

export declare const takeN: {
(n: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
<A>(self: TDequeue<A>, n: number): STM.STM<never, never, Chunk.Chunk<A>>;
(n: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Array<A>>;
<A>(self: TDequeue<A>, n: number): STM.STM<never, never, Array<A>>;
};

@@ -381,4 +380,4 @@ /**

export declare const takeUpTo: {
(max: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
<A>(self: TDequeue<A>, max: number): STM.STM<never, never, Chunk.Chunk<A>>;
(max: number): <A>(self: TDequeue<A>) => STM.STM<never, never, Array<A>>;
<A>(self: TDequeue<A>, max: number): STM.STM<never, never, Array<A>>;
};

@@ -385,0 +384,0 @@ /**

/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk";
import type * as Context from "@effect/data/Context";

@@ -49,3 +48,3 @@ import type * as Layer from "@effect/io/Layer";

*/
shuffle<A>(elements: Iterable<A>): STM.STM<never, never, Chunk.Chunk<A>>;
shuffle<A>(elements: Iterable<A>): STM.STM<never, never, Array<A>>;
}

@@ -109,3 +108,3 @@ /**

*/
export declare const shuffle: <A>(elements: Iterable<A>) => STM.STM<TRandom, never, Chunk.Chunk<A>>;
export declare const shuffle: <A>(elements: Iterable<A>) => STM.STM<TRandom, never, Array<A>>;
//# sourceMappingURL=TRandom.d.ts.map
/**
* @since 1.0.0
*/
import type * as Chunk from "@effect/data/Chunk";
import type * as HashSet from "@effect/data/HashSet";

@@ -168,4 +167,4 @@ import type * as Option from "@effect/data/Option";

export declare const removeIf: {
<A>(predicate: Predicate<A>): (self: TSet<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
<A>(self: TSet<A>, predicate: Predicate<A>): STM.STM<never, never, Chunk.Chunk<A>>;
<A>(predicate: Predicate<A>): (self: TSet<A>) => STM.STM<never, never, Array<A>>;
<A>(self: TSet<A>, predicate: Predicate<A>): STM.STM<never, never, Array<A>>;
};

@@ -189,4 +188,4 @@ /**

export declare const retainIf: {
<A>(predicate: Predicate<A>): (self: TSet<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
<A>(self: TSet<A>, predicate: Predicate<A>): STM.STM<never, never, Chunk.Chunk<A>>;
<A>(predicate: Predicate<A>): (self: TSet<A>) => STM.STM<never, never, Array<A>>;
<A>(self: TSet<A>, predicate: Predicate<A>): STM.STM<never, never, Array<A>>;
};

@@ -237,4 +236,4 @@ /**

export declare const takeSome: {
<A, B>(pf: (a: A) => Option.Option<B>): (self: TSet<A>) => STM.STM<never, never, Chunk.NonEmptyChunk<B>>;
<A, B>(self: TSet<A>, pf: (a: A) => Option.Option<B>): STM.STM<never, never, Chunk.NonEmptyChunk<B>>;
<A, B>(pf: (a: A) => Option.Option<B>): (self: TSet<A>) => STM.STM<never, never, [B, ...Array<B>]>;
<A, B>(self: TSet<A>, pf: (a: A) => Option.Option<B>): STM.STM<never, never, [B, ...Array<B>]>;
};

@@ -248,4 +247,4 @@ /**

export declare const takeSomeSTM: {
<A, R, E, B>(pf: (a: A) => STM.STM<R, Option.Option<E>, B>): (self: TSet<A>) => STM.STM<R, E, Chunk.NonEmptyChunk<B>>;
<A, R, E, B>(self: TSet<A>, pf: (a: A) => STM.STM<R, Option.Option<E>, B>): STM.STM<R, E, Chunk.NonEmptyChunk<B>>;
<A, R, E, B>(pf: (a: A) => STM.STM<R, Option.Option<E>, B>): (self: TSet<A>) => STM.STM<R, E, [B, ...Array<B>]>;
<A, R, E, B>(self: TSet<A>, pf: (a: A) => STM.STM<R, Option.Option<E>, B>): STM.STM<R, E, [B, ...Array<B>]>;
};

@@ -258,3 +257,3 @@ /**

*/
export declare const toChunk: <A>(self: TSet<A>) => STM.STM<never, never, Chunk.Chunk<A>>;
export declare const toChunk: <A>(self: TSet<A>) => STM.STM<never, never, Array<A>>;
/**

@@ -261,0 +260,0 @@ * Collects all elements into a `HashSet`.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc