@fncts/base 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_cjs/collection/Iterable/api/traverseConc.cjs +8 -19
- package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
- package/_cjs/collection/Iterable/api.cjs +500 -610
- package/_cjs/collection/Iterable/api.cjs.map +1 -1
- package/_cjs/collection/Iterable/constructors.cjs +7 -25
- package/_cjs/collection/Iterable/constructors.cjs.map +1 -1
- package/_cjs/collection/Iterable/definition.cjs.map +1 -1
- package/_cjs/collection/Iterable.cjs +0 -6
- package/_cjs/collection/Iterable.cjs.map +1 -1
- package/_cjs/collection/compat/Array/api.cjs +17 -26
- package/_cjs/collection/compat/Array/api.cjs.map +1 -1
- package/_cjs/collection/compat/Array/definition.cjs.map +1 -1
- package/_cjs/collection/compat/Array.cjs +0 -17
- package/_cjs/collection/compat/Array.cjs.map +1 -1
- package/_cjs/collection/compat/ArrayLike/api.cjs +4 -13
- package/_cjs/collection/compat/ArrayLike/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api/empty.cjs +0 -2
- package/_cjs/collection/immutable/Conc/api/empty.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api/makeBy.cjs +1 -9
- package/_cjs/collection/immutable/Conc/api/makeBy.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api/replicate.cjs +0 -4
- package/_cjs/collection/immutable/Conc/api/replicate.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api.cjs +801 -1039
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/constructors.cjs +0 -14
- package/_cjs/collection/immutable/Conc/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/definition.cjs +76 -273
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc.cjs +0 -25
- package/_cjs/collection/immutable/Conc.cjs.map +1 -1
- package/_cjs/collection/immutable/Dictionary/api.cjs +57 -70
- package/_cjs/collection/immutable/Dictionary/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Dictionary/definition.cjs +0 -4
- package/_cjs/collection/immutable/Dictionary/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Dictionary.cjs +28 -0
- package/_cjs/collection/immutable/Dictionary.cjs.map +1 -0
- package/_cjs/collection/immutable/HashMap/api.cjs +371 -432
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs +20 -43
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/internal.cjs +3 -88
- package/_cjs/collection/immutable/HashMap/internal.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap.cjs +0 -4
- package/_cjs/collection/immutable/HashMap.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet/api.cjs +283 -339
- package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet/definition.cjs +18 -92
- package/_cjs/collection/immutable/HashSet/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet.cjs +0 -4
- package/_cjs/collection/immutable/HashSet.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs +6 -9
- package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs +6 -8
- package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs +6 -8
- package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs +14 -19
- package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +939 -1138
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/constructors.cjs +0 -18
- package/_cjs/collection/immutable/ImmutableArray/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +4 -21
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs +49 -63
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray.cjs +0 -29
- package/_cjs/collection/immutable/ImmutableArray.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +335 -420
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs +0 -24
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs +0 -9
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs +2 -19
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +24 -33
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs +0 -23
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs.map +1 -1
- package/_cjs/collection/immutable/List/api/foldLeft.cjs +12 -16
- package/_cjs/collection/immutable/List/api/foldLeft.cjs.map +1 -1
- package/_cjs/collection/immutable/List/api/unsafeTail.cjs +0 -6
- package/_cjs/collection/immutable/List/api/unsafeTail.cjs.map +1 -1
- package/_cjs/collection/immutable/List/api.cjs +167 -239
- package/_cjs/collection/immutable/List/api.cjs.map +1 -1
- package/_cjs/collection/immutable/List/constructors.cjs +1 -19
- package/_cjs/collection/immutable/List/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/List/definition.cjs +2 -25
- package/_cjs/collection/immutable/List/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/List.cjs +0 -10
- package/_cjs/collection/immutable/List.cjs.map +1 -1
- package/_cjs/collection/immutable/Queue/api.cjs +87 -118
- package/_cjs/collection/immutable/Queue/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Queue/constructors.cjs +0 -8
- package/_cjs/collection/immutable/Queue/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/Queue/definition.cjs +3 -13
- package/_cjs/collection/immutable/Queue/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Queue/guards.cjs +2 -6
- package/_cjs/collection/immutable/Queue/guards.cjs.map +1 -1
- package/_cjs/collection/immutable/Queue.cjs +0 -8
- package/_cjs/collection/immutable/Queue.cjs.map +1 -1
- package/_cjs/collection/immutable/RoseTree/api.cjs +76 -118
- package/_cjs/collection/immutable/RoseTree/api.cjs.map +1 -1
- package/_cjs/collection/immutable/RoseTree/definition.cjs +4 -19
- package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/RoseTree.cjs +0 -4
- package/_cjs/collection/immutable/RoseTree.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/api.cjs +439 -536
- package/_cjs/collection/immutable/SortedMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/definition.cjs +4 -6
- package/_cjs/collection/immutable/SortedMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/internal.cjs +55 -226
- package/_cjs/collection/immutable/SortedMap/internal.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/iterator.cjs +16 -107
- package/_cjs/collection/immutable/SortedMap/iterator.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/node.cjs +0 -3
- package/_cjs/collection/immutable/SortedMap/node.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap.cjs +0 -10
- package/_cjs/collection/immutable/SortedMap.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/api.cjs +751 -885
- package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/definition.cjs +27 -50
- package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/internal.cjs +79 -398
- package/_cjs/collection/immutable/Vector/internal.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector.cjs +0 -4
- package/_cjs/collection/immutable/Vector.cjs.map +1 -1
- package/_cjs/collection/mutable/HashMap.cjs +10 -89
- package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
- package/_cjs/collection/mutable/HashSet.cjs +6 -67
- package/_cjs/collection/mutable/HashSet.cjs.map +1 -1
- package/_cjs/collection/mutable/ListBuffer.cjs +3 -35
- package/_cjs/collection/mutable/ListBuffer.cjs.map +1 -1
- package/_cjs/collection/mutable/internal.cjs +0 -8
- package/_cjs/collection/mutable/internal.cjs.map +1 -1
- package/_cjs/collection/weak/IterableWeakMap.cjs +6 -32
- package/_cjs/collection/weak/IterableWeakMap.cjs.map +1 -1
- package/_cjs/collection/weak/IterableWeakSet.cjs +6 -28
- package/_cjs/collection/weak/IterableWeakSet.cjs.map +1 -1
- package/_cjs/control/Eval/api/sequenceArray.cjs +0 -5
- package/_cjs/control/Eval/api/sequenceArray.cjs.map +1 -1
- package/_cjs/control/Eval/api.cjs +56 -76
- package/_cjs/control/Eval/api.cjs.map +1 -1
- package/_cjs/control/Eval/constructors.cjs +0 -9
- package/_cjs/control/Eval/constructors.cjs.map +1 -1
- package/_cjs/control/Eval/definition.cjs +5 -23
- package/_cjs/control/Eval/definition.cjs.map +1 -1
- package/_cjs/control/Eval/instance.cjs +6 -13
- package/_cjs/control/Eval/instance.cjs.map +1 -1
- package/_cjs/control/Eval/run.cjs +5 -28
- package/_cjs/control/Eval/run.cjs.map +1 -1
- package/_cjs/control/Eval.cjs +0 -10
- package/_cjs/control/Eval.cjs.map +1 -1
- package/_cjs/control/LazyValue.cjs +0 -6
- package/_cjs/control/LazyValue.cjs.map +1 -1
- package/_cjs/control/Z/api.cjs +241 -306
- package/_cjs/control/Z/api.cjs.map +1 -1
- package/_cjs/control/Z/definition.cjs +13 -84
- package/_cjs/control/Z/definition.cjs.map +1 -1
- package/_cjs/control/Z/instances.cjs +3 -8
- package/_cjs/control/Z/instances.cjs.map +1 -1
- package/_cjs/control/Z/runtime.cjs +206 -290
- package/_cjs/control/Z/runtime.cjs.map +1 -1
- package/_cjs/control/Z.cjs +0 -8
- package/_cjs/control/Z.cjs.map +1 -1
- package/_cjs/data/Branded/definition.cjs +0 -5
- package/_cjs/data/Branded/definition.cjs.map +1 -1
- package/_cjs/data/Branded.cjs +0 -15
- package/_cjs/data/Branded.cjs.map +1 -1
- package/_cjs/data/CaseClass.cjs +13 -45
- package/_cjs/data/CaseClass.cjs.map +1 -1
- package/_cjs/data/Cause/api/fold.cjs +31 -75
- package/_cjs/data/Cause/api/fold.cjs.map +1 -1
- package/_cjs/data/Cause/api/isEmpty.cjs +7 -33
- package/_cjs/data/Cause/api/isEmpty.cjs.map +1 -1
- package/_cjs/data/Cause/api/linearize.cjs +9 -16
- package/_cjs/data/Cause/api/linearize.cjs.map +1 -1
- package/_cjs/data/Cause/api/prettyPrint.cjs +1 -14
- package/_cjs/data/Cause/api/prettyPrint.cjs.map +1 -1
- package/_cjs/data/Cause/api/unified.cjs +14 -54
- package/_cjs/data/Cause/api/unified.cjs.map +1 -1
- package/_cjs/data/Cause/api.cjs +221 -543
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/Cause/definition.cjs +63 -300
- package/_cjs/data/Cause/definition.cjs.map +1 -1
- package/_cjs/data/Cause.cjs +0 -14
- package/_cjs/data/Cause.cjs.map +1 -1
- package/_cjs/data/Const/api.cjs +8 -10
- package/_cjs/data/Const/api.cjs.map +1 -1
- package/_cjs/data/Const/definition.cjs +0 -3
- package/_cjs/data/Const/definition.cjs.map +1 -1
- package/_cjs/data/Const/instances.cjs +6 -14
- package/_cjs/data/Const/instances.cjs.map +1 -1
- package/_cjs/data/Const.cjs +0 -6
- package/_cjs/data/Const.cjs.map +1 -1
- package/_cjs/data/Datum/api.cjs +200 -279
- package/_cjs/data/Datum/api.cjs.map +1 -1
- package/_cjs/data/Datum/definition.cjs +10 -50
- package/_cjs/data/Datum/definition.cjs.map +1 -1
- package/_cjs/data/Datum/instances.cjs +0 -9
- package/_cjs/data/Datum/instances.cjs.map +1 -1
- package/_cjs/data/DatumEither/api.cjs +161 -224
- package/_cjs/data/DatumEither/api.cjs.map +1 -1
- package/_cjs/data/DatumEither/definition.cjs.map +1 -1
- package/_cjs/data/DecodeError/definition.cjs +15 -96
- package/_cjs/data/DecodeError/definition.cjs.map +1 -1
- package/_cjs/data/DecodeError.cjs +0 -4
- package/_cjs/data/DecodeError.cjs.map +1 -1
- package/_cjs/data/Decoder/api.cjs +431 -76
- package/_cjs/data/Decoder/api.cjs.map +1 -1
- package/_cjs/data/Decoder/definition.cjs +0 -6
- package/_cjs/data/Decoder/definition.cjs.map +1 -1
- package/_cjs/data/Decoder.cjs +0 -4
- package/_cjs/data/Decoder.cjs.map +1 -1
- package/_cjs/data/Duration/api.cjs +24 -36
- package/_cjs/data/Duration/api.cjs.map +1 -1
- package/_cjs/data/Duration/definition.cjs +3 -17
- package/_cjs/data/Duration/definition.cjs.map +1 -1
- package/_cjs/data/Duration.cjs +0 -4
- package/_cjs/data/Duration.cjs.map +1 -1
- package/_cjs/data/Either/api/align.cjs +8 -8
- package/_cjs/data/Either/api/align.cjs.map +1 -1
- package/_cjs/data/Either/api/alignWith.cjs +8 -18
- package/_cjs/data/Either/api/alignWith.cjs.map +1 -1
- package/_cjs/data/Either/api.cjs +171 -262
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/constructors.cjs +11 -28
- package/_cjs/data/Either/constructors.cjs.map +1 -1
- package/_cjs/data/Either/definition.cjs +4 -23
- package/_cjs/data/Either/definition.cjs.map +1 -1
- package/_cjs/data/Either/destructors.cjs +12 -17
- package/_cjs/data/Either/destructors.cjs.map +1 -1
- package/_cjs/data/Either/instances.cjs +21 -74
- package/_cjs/data/Either/instances.cjs.map +1 -1
- package/_cjs/data/Either.cjs +0 -10
- package/_cjs/data/Either.cjs.map +1 -1
- package/_cjs/data/EitherT/api.cjs +8 -32
- package/_cjs/data/EitherT/api.cjs.map +1 -1
- package/_cjs/data/EitherT/definition.cjs.map +1 -1
- package/_cjs/data/Encoder/api.cjs +324 -0
- package/_cjs/data/Encoder/api.cjs.map +1 -0
- package/_cjs/data/Encoder/definition.cjs +21 -0
- package/_cjs/data/Encoder/definition.cjs.map +1 -0
- package/_cjs/data/Encoder.cjs +28 -0
- package/_cjs/data/Encoder.cjs.map +1 -0
- package/_cjs/data/Environment/api.cjs +47 -65
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Environment/definition.cjs +5 -21
- package/_cjs/data/Environment/definition.cjs.map +1 -1
- package/_cjs/data/Environment.cjs +0 -4
- package/_cjs/data/Environment.cjs.map +1 -1
- package/_cjs/data/EnvironmentPatch.cjs +31 -93
- package/_cjs/data/EnvironmentPatch.cjs.map +1 -1
- package/_cjs/{typeclass → data}/Eq/definition.cjs +2 -4
- package/_cjs/data/Eq/definition.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Eq/derivations.cjs +9 -18
- package/_cjs/data/Eq/derivations.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Eq.cjs +0 -2
- package/_cjs/data/Eq.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Equatable/api.cjs +2 -10
- package/_cjs/data/Equatable/api.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Equatable/definition.cjs +0 -6
- package/_cjs/data/Equatable/definition.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Equatable/fast-equals.cjs +1 -83
- package/_cjs/data/Equatable/fast-equals.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Equatable.cjs +0 -6
- package/_cjs/data/Equatable.cjs.map +1 -0
- package/_cjs/data/ExecutionStrategy.cjs +20 -37
- package/_cjs/data/ExecutionStrategy.cjs.map +1 -1
- package/_cjs/data/Exit/api.cjs +143 -178
- package/_cjs/data/Exit/api.cjs.map +1 -1
- package/_cjs/data/Exit/constructors.cjs +4 -26
- package/_cjs/data/Exit/constructors.cjs.map +1 -1
- package/_cjs/data/Exit/definition.cjs +8 -48
- package/_cjs/data/Exit/definition.cjs.map +1 -1
- package/_cjs/data/Exit.cjs +0 -6
- package/_cjs/data/Exit.cjs.map +1 -1
- package/_cjs/data/FiberId/api.cjs +24 -38
- package/_cjs/data/FiberId/api.cjs.map +1 -1
- package/_cjs/data/FiberId/constructors.cjs +5 -19
- package/_cjs/data/FiberId/constructors.cjs.map +1 -1
- package/_cjs/data/FiberId/definition.cjs +7 -38
- package/_cjs/data/FiberId/definition.cjs.map +1 -1
- package/_cjs/data/FiberId.cjs +0 -6
- package/_cjs/data/FiberId.cjs.map +1 -1
- package/_cjs/data/Guard/api.cjs +419 -0
- package/_cjs/data/Guard/api.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Guard/definition.cjs +0 -6
- package/_cjs/data/Guard/definition.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Guard.cjs +0 -4
- package/_cjs/data/Guard.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Hash.cjs +0 -2
- package/_cjs/data/Hash.cjs.map +1 -0
- package/_cjs/{typeclass → data}/HashEq.cjs +14 -25
- package/_cjs/data/HashEq.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Hashable/definition.cjs +0 -6
- package/_cjs/data/Hashable/definition.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Hashable/hash.cjs +3 -65
- package/_cjs/data/Hashable/hash.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Hashable.cjs +0 -4
- package/_cjs/data/Hashable.cjs.map +1 -0
- package/_cjs/data/Identity/api.cjs +26 -35
- package/_cjs/data/Identity/api.cjs.map +1 -1
- package/_cjs/data/Identity/definition.cjs +0 -4
- package/_cjs/data/Identity/definition.cjs.map +1 -1
- package/_cjs/data/Identity/instances.cjs +7 -12
- package/_cjs/data/Identity/instances.cjs.map +1 -1
- package/_cjs/data/Identity.cjs +0 -6
- package/_cjs/data/Identity.cjs.map +1 -1
- package/_cjs/data/Interval.cjs +46 -67
- package/_cjs/data/Interval.cjs.map +1 -1
- package/_cjs/data/Intervals.cjs +45 -76
- package/_cjs/data/Intervals.cjs.map +1 -1
- package/_cjs/data/Maybe/api.cjs +126 -171
- package/_cjs/data/Maybe/api.cjs.map +1 -1
- package/_cjs/data/Maybe/constructors.cjs +2 -26
- package/_cjs/data/Maybe/constructors.cjs.map +1 -1
- package/_cjs/data/Maybe/definition.cjs +10 -51
- package/_cjs/data/Maybe/definition.cjs.map +1 -1
- package/_cjs/data/Maybe/destructors.cjs +7 -8
- package/_cjs/data/Maybe/destructors.cjs.map +1 -1
- package/_cjs/data/Maybe/instances.cjs +41 -35
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/Maybe.cjs +0 -10
- package/_cjs/data/Maybe.cjs.map +1 -1
- package/_cjs/data/Newtype.cjs +0 -7
- package/_cjs/data/Newtype.cjs.map +1 -1
- package/_cjs/data/Ord/api/contramap.cjs +18 -0
- package/_cjs/data/Ord/api/contramap.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Ord/api/max.cjs +3 -4
- package/_cjs/data/Ord/api/max.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Ord/api/min.cjs +3 -4
- package/_cjs/data/Ord/api/min.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Ord/api.cjs +0 -6
- package/_cjs/data/Ord/api.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Ord/definition.cjs +5 -12
- package/_cjs/data/Ord/definition.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Ord/instances.cjs +13 -23
- package/_cjs/data/Ord/instances.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Ord.cjs +0 -6
- package/_cjs/data/Ord.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Ordering.cjs +0 -9
- package/_cjs/data/Ordering.cjs.map +1 -0
- package/_cjs/data/Predicate/api.cjs +10 -15
- package/_cjs/data/Predicate/api.cjs.map +1 -1
- package/_cjs/data/Predicate.cjs +0 -4
- package/_cjs/data/Predicate.cjs.map +1 -1
- package/_cjs/data/Refinement/api.cjs +15 -16
- package/_cjs/data/Refinement/api.cjs.map +1 -1
- package/_cjs/data/Refinement.cjs +0 -4
- package/_cjs/data/Refinement.cjs.map +1 -1
- package/_cjs/{typeclass → data}/Showable/definition.cjs +4 -11
- package/_cjs/data/Showable/definition.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Showable/show.cjs +118 -271
- package/_cjs/data/Showable/show.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Showable/styles.cjs +0 -6
- package/_cjs/data/Showable/styles.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Showable/util.cjs +51 -113
- package/_cjs/data/Showable/util.cjs.map +1 -0
- package/_cjs/{typeclass → data}/Showable.cjs +0 -4
- package/_cjs/data/Showable.cjs.map +1 -0
- package/_cjs/data/Struct/api.cjs +65 -85
- package/_cjs/data/Struct/api.cjs.map +1 -1
- package/_cjs/data/Struct/definition.cjs +0 -4
- package/_cjs/data/Struct/definition.cjs.map +1 -1
- package/_cjs/data/Tag/constructors.cjs +1 -7
- package/_cjs/data/Tag/constructors.cjs.map +1 -1
- package/_cjs/data/Tag/definition.cjs +3 -21
- package/_cjs/data/Tag/definition.cjs.map +1 -1
- package/_cjs/data/Tag.cjs +0 -4
- package/_cjs/data/Tag.cjs.map +1 -1
- package/_cjs/data/These/api.cjs +119 -226
- package/_cjs/data/These/api.cjs.map +1 -1
- package/_cjs/data/These/constructors.cjs +1 -13
- package/_cjs/data/These/constructors.cjs.map +1 -1
- package/_cjs/data/These/definition.cjs +3 -27
- package/_cjs/data/These/definition.cjs.map +1 -1
- package/_cjs/data/These/destructors.cjs +24 -52
- package/_cjs/data/These/destructors.cjs.map +1 -1
- package/_cjs/data/These/instances.cjs +2 -16
- package/_cjs/data/These/instances.cjs.map +1 -1
- package/_cjs/data/These.cjs +0 -10
- package/_cjs/data/These.cjs.map +1 -1
- package/_cjs/data/Trace/api.cjs +7 -14
- package/_cjs/data/Trace/api.cjs.map +1 -1
- package/_cjs/data/Trace/constructors.cjs +0 -8
- package/_cjs/data/Trace/constructors.cjs.map +1 -1
- package/_cjs/data/Trace/definition.cjs +0 -3
- package/_cjs/data/Trace/definition.cjs.map +1 -1
- package/_cjs/data/Trace.cjs +0 -6
- package/_cjs/data/Trace.cjs.map +1 -1
- package/_cjs/data/TraceElement/definition.cjs +0 -11
- package/_cjs/data/TraceElement/definition.cjs.map +1 -1
- package/_cjs/data/TraceElement.cjs +0 -2
- package/_cjs/data/TraceElement.cjs.map +1 -1
- package/_cjs/data/Zipped.cjs +2 -13
- package/_cjs/data/Zipped.cjs.map +1 -1
- package/_cjs/data/bigint/instances.cjs +2 -7
- package/_cjs/data/bigint/instances.cjs.map +1 -1
- package/_cjs/data/bigint.cjs +0 -4
- package/_cjs/data/bigint.cjs.map +1 -1
- package/_cjs/data/boolean/instances.cjs +2 -7
- package/_cjs/data/boolean/instances.cjs.map +1 -1
- package/_cjs/data/boolean.cjs +0 -4
- package/_cjs/data/boolean.cjs.map +1 -1
- package/_cjs/data/exceptions/ArrayIndexOutOfBoundsError.cjs +0 -3
- package/_cjs/data/exceptions/ArrayIndexOutOfBoundsError.cjs.map +1 -1
- package/_cjs/data/exceptions/IllegalArgumentError.cjs +0 -3
- package/_cjs/data/exceptions/IllegalArgumentError.cjs.map +1 -1
- package/_cjs/data/exceptions/IllegalStateError.cjs +0 -3
- package/_cjs/data/exceptions/IllegalStateError.cjs.map +1 -1
- package/_cjs/data/exceptions/IndexOutOfBoundsError.cjs +0 -3
- package/_cjs/data/exceptions/IndexOutOfBoundsError.cjs.map +1 -1
- package/_cjs/data/exceptions/InterruptedException.cjs +0 -6
- package/_cjs/data/exceptions/InterruptedException.cjs.map +1 -1
- package/_cjs/data/exceptions/InvalidCapacityError.cjs +0 -4
- package/_cjs/data/exceptions/InvalidCapacityError.cjs.map +1 -1
- package/_cjs/data/exceptions/NoSuchElementError.cjs +0 -3
- package/_cjs/data/exceptions/NoSuchElementError.cjs.map +1 -1
- package/_cjs/data/exceptions.cjs +0 -16
- package/_cjs/data/exceptions.cjs.map +1 -1
- package/_cjs/data/function/api.cjs +6 -15
- package/_cjs/data/function/api.cjs.map +1 -1
- package/_cjs/data/function/pipe.cjs +8 -21
- package/_cjs/data/function/pipe.cjs.map +1 -1
- package/_cjs/data/function.cjs +0 -6
- package/_cjs/data/function.cjs.map +1 -1
- package/_cjs/data/number/api.cjs +0 -1
- package/_cjs/data/number/api.cjs.map +1 -1
- package/_cjs/data/number/instances.cjs +10 -19
- package/_cjs/data/number/instances.cjs.map +1 -1
- package/_cjs/data/number.cjs +0 -6
- package/_cjs/data/number.cjs.map +1 -1
- package/_cjs/data/object/instances.cjs +1 -16
- package/_cjs/data/object/instances.cjs.map +1 -1
- package/_cjs/data/object.cjs +0 -4
- package/_cjs/data/object.cjs.map +1 -1
- package/_cjs/data/string/api.cjs +54 -130
- package/_cjs/data/string/api.cjs.map +1 -1
- package/_cjs/data/string/instances.cjs +11 -24
- package/_cjs/data/string/instances.cjs.map +1 -1
- package/_cjs/data/string.cjs +0 -6
- package/_cjs/data/string.cjs.map +1 -1
- package/_cjs/global/api.cjs +4 -3
- package/_cjs/global/api.cjs.map +1 -1
- package/_cjs/internal/AtomicBoolean.cjs +0 -4
- package/_cjs/internal/AtomicBoolean.cjs.map +1 -1
- package/_cjs/internal/AtomicNumber.cjs +0 -7
- package/_cjs/internal/AtomicNumber.cjs.map +1 -1
- package/_cjs/internal/AtomicReference.cjs +0 -8
- package/_cjs/internal/AtomicReference.cjs.map +1 -1
- package/_cjs/internal/Stack.cjs +2 -15
- package/_cjs/internal/Stack.cjs.map +1 -1
- package/_cjs/json/EitherJson.cjs +1 -7
- package/_cjs/json/EitherJson.cjs.map +1 -1
- package/_cjs/json/MaybeJson.cjs +1 -7
- package/_cjs/json/MaybeJson.cjs.map +1 -1
- package/_cjs/json/TheseJson.cjs +1 -7
- package/_cjs/json/TheseJson.cjs.map +1 -1
- package/_cjs/optics/At/api.cjs +1 -6
- package/_cjs/optics/At/api.cjs.map +1 -1
- package/_cjs/optics/At/definition.cjs +2 -9
- package/_cjs/optics/At/definition.cjs.map +1 -1
- package/_cjs/optics/At.cjs +0 -4
- package/_cjs/optics/At.cjs.map +1 -1
- package/_cjs/optics/Fold/definition.cjs +3 -6
- package/_cjs/optics/Fold/definition.cjs.map +1 -1
- package/_cjs/optics/Fold.cjs +0 -2
- package/_cjs/optics/Fold.cjs.map +1 -1
- package/_cjs/optics/Getter/definition.cjs +2 -5
- package/_cjs/optics/Getter/definition.cjs.map +1 -1
- package/_cjs/optics/Getter.cjs +0 -2
- package/_cjs/optics/Getter.cjs.map +1 -1
- package/_cjs/optics/Index/api.cjs +4 -12
- package/_cjs/optics/Index/api.cjs.map +1 -1
- package/_cjs/optics/Index/definition.cjs +2 -4
- package/_cjs/optics/Index/definition.cjs.map +1 -1
- package/_cjs/optics/Index.cjs +0 -4
- package/_cjs/optics/Index.cjs.map +1 -1
- package/_cjs/optics/Iso/api.cjs +9 -12
- package/_cjs/optics/Iso/api.cjs.map +1 -1
- package/_cjs/optics/Iso/definition.cjs +13 -25
- package/_cjs/optics/Iso/definition.cjs.map +1 -1
- package/_cjs/optics/Iso.cjs +0 -4
- package/_cjs/optics/Iso.cjs.map +1 -1
- package/_cjs/optics/Lens/api.cjs +53 -78
- package/_cjs/optics/Lens/api.cjs.map +1 -1
- package/_cjs/optics/Lens/definition.cjs +11 -23
- package/_cjs/optics/Lens/definition.cjs.map +1 -1
- package/_cjs/optics/Lens.cjs +0 -4
- package/_cjs/optics/Lens.cjs.map +1 -1
- package/_cjs/optics/Optional/api/compose.cjs +9 -13
- package/_cjs/optics/Optional/api/compose.cjs.map +1 -1
- package/_cjs/optics/Optional/definition.cjs +11 -27
- package/_cjs/optics/Optional/definition.cjs.map +1 -1
- package/_cjs/optics/Optional.cjs +0 -4
- package/_cjs/optics/Optional.cjs.map +1 -1
- package/_cjs/optics/Prism/api/compose.cjs +9 -14
- package/_cjs/optics/Prism/api/compose.cjs.map +1 -1
- package/_cjs/optics/Prism/api/fromNullable.cjs +2 -8
- package/_cjs/optics/Prism/api/fromNullable.cjs.map +1 -1
- package/_cjs/optics/Prism/api/just.cjs +2 -9
- package/_cjs/optics/Prism/api/just.cjs.map +1 -1
- package/_cjs/optics/Prism/definition.cjs +9 -21
- package/_cjs/optics/Prism/definition.cjs.map +1 -1
- package/_cjs/optics/Prism.cjs +0 -8
- package/_cjs/optics/Prism.cjs.map +1 -1
- package/_cjs/optics/Setter/definition.cjs +8 -17
- package/_cjs/optics/Setter/definition.cjs.map +1 -1
- package/_cjs/optics/Setter.cjs +0 -2
- package/_cjs/optics/Setter.cjs.map +1 -1
- package/_cjs/optics/Traversal/api/compose.cjs +8 -10
- package/_cjs/optics/Traversal/api/compose.cjs.map +1 -1
- package/_cjs/optics/Traversal/api/fromTraversable.cjs +2 -6
- package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
- package/_cjs/optics/Traversal/definition.cjs +12 -28
- package/_cjs/optics/Traversal/definition.cjs.map +1 -1
- package/_cjs/optics/Traversal.cjs +0 -6
- package/_cjs/optics/Traversal.cjs.map +1 -1
- package/_cjs/typeclass/Align.cjs.map +1 -1
- package/_cjs/typeclass/Alt.cjs.map +1 -1
- package/_cjs/typeclass/Alternative.cjs.map +1 -1
- package/_cjs/typeclass/Applicative.cjs.map +1 -1
- package/_cjs/typeclass/ApplicativeExcept.cjs +5 -18
- package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
- package/_cjs/typeclass/Apply.cjs +15 -47
- package/_cjs/typeclass/Apply.cjs.map +1 -1
- package/_cjs/typeclass/Chain.cjs +4 -13
- package/_cjs/typeclass/Chain.cjs.map +1 -1
- package/_cjs/typeclass/Closure.cjs +2 -4
- package/_cjs/typeclass/Closure.cjs.map +1 -1
- package/_cjs/typeclass/Filterable.cjs.map +1 -1
- package/_cjs/typeclass/FilterableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Foldable.cjs +1 -3
- package/_cjs/typeclass/Foldable.cjs.map +1 -1
- package/_cjs/typeclass/FoldableWithIndex.cjs +1 -3
- package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Functor.cjs +0 -2
- package/_cjs/typeclass/Functor.cjs.map +1 -1
- package/_cjs/typeclass/FunctorWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Has.cjs +8 -6
- package/_cjs/typeclass/Has.cjs.map +1 -1
- package/_cjs/typeclass/Monad.cjs.map +1 -1
- package/_cjs/typeclass/MonadExcept.cjs +1 -6
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
- package/_cjs/typeclass/Monoid.cjs +6 -23
- package/_cjs/typeclass/Monoid.cjs.map +1 -1
- package/_cjs/typeclass/Pointed.cjs.map +1 -1
- package/_cjs/typeclass/Semialign.cjs +7 -25
- package/_cjs/typeclass/Semialign.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/api.cjs +6 -14
- package/_cjs/typeclass/Semigroup/api.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/definition.cjs +3 -6
- package/_cjs/typeclass/Semigroup/definition.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/derivations.cjs +7 -18
- package/_cjs/typeclass/Semigroup/derivations.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup.cjs +0 -4
- package/_cjs/typeclass/Semigroup.cjs.map +1 -1
- package/_cjs/typeclass/Semimonoidal.cjs.map +1 -1
- package/_cjs/typeclass/Traversable.cjs +1 -7
- package/_cjs/typeclass/Traversable.cjs.map +1 -1
- package/_cjs/typeclass/TraversableWithIndex.cjs +0 -1
- package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Witherable.cjs +2 -7
- package/_cjs/typeclass/Witherable.cjs.map +1 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs +2 -8
- package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/builtin.cjs +0 -2
- package/_cjs/typeclass/builtin.cjs.map +1 -1
- package/_cjs/typeclass.cjs +95 -162
- package/_cjs/typeclass.cjs.map +1 -1
- package/_cjs/types.cjs +0 -6
- package/_cjs/types.cjs.map +1 -1
- package/_cjs/util/AnsiFormat.cjs +15 -57
- package/_cjs/util/AnsiFormat.cjs.map +1 -1
- package/_cjs/util/PCGRandom.cjs +16 -46
- package/_cjs/util/PCGRandom.cjs.map +1 -1
- package/_cjs/util/assert.cjs +0 -4
- package/_cjs/util/assert.cjs.map +1 -1
- package/_cjs/util/pattern.cjs +0 -4
- package/_cjs/util/pattern.cjs.map +1 -1
- package/_cjs/util/predicates.cjs +0 -32
- package/_cjs/util/predicates.cjs.map +1 -1
- package/_cjs/util/rand/Random.cjs +0 -21
- package/_cjs/util/rand/Random.cjs.map +1 -1
- package/_cjs/util/rand/distribution/UniformArrayIntDistribution.cjs +0 -5
- package/_cjs/util/rand/distribution/UniformArrayIntDistribution.cjs.map +1 -1
- package/_cjs/util/rand/distribution/UniformBigIntDistribution.cjs +4 -12
- package/_cjs/util/rand/distribution/UniformBigIntDistribution.cjs.map +1 -1
- package/_cjs/util/rand/distribution/UniformIntDistribution.cjs +0 -12
- package/_cjs/util/rand/distribution/UniformIntDistribution.cjs.map +1 -1
- package/_cjs/util/rand/distribution/internals/ArrayInt.cjs +6 -42
- package/_cjs/util/rand/distribution/internals/ArrayInt.cjs.map +1 -1
- package/_cjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.cjs +6 -10
- package/_cjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.cjs.map +1 -1
- package/_cjs/util/rand/distribution/internals/UniformIntDistributionInternal.cjs +8 -14
- package/_cjs/util/rand/distribution/internals/UniformIntDistributionInternal.cjs.map +1 -1
- package/_cjs/util/rand/generator/MersenneTwister.cjs +5 -25
- package/_cjs/util/rand/generator/MersenneTwister.cjs.map +1 -1
- package/_cjs/util/rand/generator/RandomGenerator.cjs +0 -4
- package/_cjs/util/rand/generator/RandomGenerator.cjs.map +1 -1
- package/_cjs/util/rand.cjs +0 -9
- package/_cjs/util/rand.cjs.map +1 -1
- package/_mjs/collection/Iterable/api/traverseConc.mjs +5 -10
- package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -1
- package/_mjs/collection/Iterable/api.mjs +466 -551
- package/_mjs/collection/Iterable/api.mjs.map +1 -1
- package/_mjs/collection/Iterable/constructors.mjs +5 -20
- package/_mjs/collection/Iterable/constructors.mjs.map +1 -1
- package/_mjs/collection/Iterable/definition.mjs.map +1 -1
- package/_mjs/collection/Iterable.mjs.map +1 -1
- package/_mjs/collection/compat/Array/api.mjs +17 -21
- package/_mjs/collection/compat/Array/api.mjs.map +1 -1
- package/_mjs/collection/compat/Array/definition.mjs.map +1 -1
- package/_mjs/collection/compat/Array.mjs +0 -1
- package/_mjs/collection/compat/Array.mjs.map +1 -1
- package/_mjs/collection/compat/ArrayLike/api.mjs +3 -9
- package/_mjs/collection/compat/ArrayLike/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api/empty.mjs +0 -1
- package/_mjs/collection/immutable/Conc/api/empty.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api/makeBy.mjs +1 -5
- package/_mjs/collection/immutable/Conc/api/makeBy.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api/replicate.mjs +0 -1
- package/_mjs/collection/immutable/Conc/api/replicate.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api.mjs +733 -919
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/constructors.mjs +0 -5
- package/_mjs/collection/immutable/Conc/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/definition.mjs +74 -242
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc.mjs +1 -2
- package/_mjs/collection/immutable/Conc.mjs.map +1 -1
- package/_mjs/collection/immutable/Dictionary/api.mjs +47 -50
- package/_mjs/collection/immutable/Dictionary/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Dictionary/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Dictionary.mjs +4 -0
- package/_mjs/collection/immutable/Dictionary.mjs.map +1 -0
- package/_mjs/collection/immutable/HashMap/api.mjs +328 -352
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs +17 -28
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/internal.mjs +4 -66
- package/_mjs/collection/immutable/HashMap/internal.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/api.mjs +249 -275
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/definition.mjs +14 -67
- package/_mjs/collection/immutable/HashSet/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs +5 -4
- package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs +5 -4
- package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs +5 -4
- package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs +13 -14
- package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +826 -942
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/constructors.mjs +0 -10
- package/_mjs/collection/immutable/ImmutableArray/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +4 -10
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs +50 -59
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray.mjs +2 -3
- package/_mjs/collection/immutable/ImmutableArray.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +303 -355
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs +0 -12
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +0 -5
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs +2 -12
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +25 -29
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs +0 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs.map +1 -1
- package/_mjs/collection/immutable/List/api/foldLeft.mjs +11 -12
- package/_mjs/collection/immutable/List/api/foldLeft.mjs.map +1 -1
- package/_mjs/collection/immutable/List/api/unsafeTail.mjs +0 -2
- package/_mjs/collection/immutable/List/api/unsafeTail.mjs.map +1 -1
- package/_mjs/collection/immutable/List/api.mjs +155 -203
- package/_mjs/collection/immutable/List/api.mjs.map +1 -1
- package/_mjs/collection/immutable/List/constructors.mjs +1 -11
- package/_mjs/collection/immutable/List/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/List/definition.mjs +2 -18
- package/_mjs/collection/immutable/List/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/List.mjs +2 -2
- package/_mjs/collection/immutable/List.mjs.map +1 -1
- package/_mjs/collection/immutable/Queue/api.mjs +78 -88
- package/_mjs/collection/immutable/Queue/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Queue/constructors.mjs +0 -2
- package/_mjs/collection/immutable/Queue/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/Queue/definition.mjs +3 -9
- package/_mjs/collection/immutable/Queue/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Queue/guards.mjs +2 -3
- package/_mjs/collection/immutable/Queue/guards.mjs.map +1 -1
- package/_mjs/collection/immutable/Queue.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/api.mjs +76 -103
- package/_mjs/collection/immutable/RoseTree/api.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/definition.mjs +4 -8
- package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/api.mjs +423 -493
- package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/definition.mjs +2 -3
- package/_mjs/collection/immutable/SortedMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/internal.mjs +56 -222
- package/_mjs/collection/immutable/SortedMap/internal.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/iterator.mjs +16 -97
- package/_mjs/collection/immutable/SortedMap/iterator.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/node.mjs +0 -1
- package/_mjs/collection/immutable/SortedMap/node.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/api.mjs +682 -756
- package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/definition.mjs +25 -35
- package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/internal.mjs +79 -350
- package/_mjs/collection/immutable/Vector/internal.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector.mjs.map +1 -1
- package/_mjs/collection/mutable/HashMap.mjs +9 -79
- package/_mjs/collection/mutable/HashMap.mjs.map +1 -1
- package/_mjs/collection/mutable/HashSet.mjs +5 -59
- package/_mjs/collection/mutable/HashSet.mjs.map +1 -1
- package/_mjs/collection/mutable/ListBuffer.mjs +2 -28
- package/_mjs/collection/mutable/ListBuffer.mjs.map +1 -1
- package/_mjs/collection/mutable/internal.mjs +0 -4
- package/_mjs/collection/mutable/internal.mjs.map +1 -1
- package/_mjs/collection/weak/IterableWeakMap.mjs +6 -28
- package/_mjs/collection/weak/IterableWeakMap.mjs.map +1 -1
- package/_mjs/collection/weak/IterableWeakSet.mjs +6 -26
- package/_mjs/collection/weak/IterableWeakSet.mjs.map +1 -1
- package/_mjs/control/Eval/api/sequenceArray.mjs +0 -1
- package/_mjs/control/Eval/api/sequenceArray.mjs.map +1 -1
- package/_mjs/control/Eval/api.mjs +41 -48
- package/_mjs/control/Eval/api.mjs.map +1 -1
- package/_mjs/control/Eval/constructors.mjs +0 -6
- package/_mjs/control/Eval/constructors.mjs.map +1 -1
- package/_mjs/control/Eval/definition.mjs +6 -15
- package/_mjs/control/Eval/definition.mjs.map +1 -1
- package/_mjs/control/Eval/instance.mjs +7 -9
- package/_mjs/control/Eval/instance.mjs.map +1 -1
- package/_mjs/control/Eval/run.mjs +5 -24
- package/_mjs/control/Eval/run.mjs.map +1 -1
- package/_mjs/control/Eval.mjs.map +1 -1
- package/_mjs/control/LazyValue.mjs +0 -3
- package/_mjs/control/LazyValue.mjs.map +1 -1
- package/_mjs/control/Z/api.mjs +196 -216
- package/_mjs/control/Z/api.mjs.map +1 -1
- package/_mjs/control/Z/definition.mjs +23 -51
- package/_mjs/control/Z/definition.mjs.map +1 -1
- package/_mjs/control/Z/instances.mjs +4 -5
- package/_mjs/control/Z/instances.mjs.map +1 -1
- package/_mjs/control/Z/runtime.mjs +200 -266
- package/_mjs/control/Z/runtime.mjs.map +1 -1
- package/_mjs/control/Z.mjs.map +1 -1
- package/_mjs/data/Branded/definition.mjs +0 -2
- package/_mjs/data/Branded/definition.mjs.map +1 -1
- package/_mjs/data/Branded.mjs +0 -1
- package/_mjs/data/Branded.mjs.map +1 -1
- package/_mjs/data/CaseClass.mjs +13 -32
- package/_mjs/data/CaseClass.mjs.map +1 -1
- package/_mjs/data/Cause/api/fold.mjs +30 -65
- package/_mjs/data/Cause/api/fold.mjs.map +1 -1
- package/_mjs/data/Cause/api/isEmpty.mjs +7 -29
- package/_mjs/data/Cause/api/isEmpty.mjs.map +1 -1
- package/_mjs/data/Cause/api/linearize.mjs +9 -10
- package/_mjs/data/Cause/api/linearize.mjs.map +1 -1
- package/_mjs/data/Cause/api/prettyPrint.mjs +1 -8
- package/_mjs/data/Cause/api/prettyPrint.mjs.map +1 -1
- package/_mjs/data/Cause/api/unified.mjs +14 -44
- package/_mjs/data/Cause/api/unified.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +212 -490
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/Cause/definition.mjs +63 -262
- package/_mjs/data/Cause/definition.mjs.map +1 -1
- package/_mjs/data/Cause.mjs +2 -2
- package/_mjs/data/Cause.mjs.map +1 -1
- package/_mjs/data/Const/api.mjs +6 -6
- package/_mjs/data/Const/api.mjs.map +1 -1
- package/_mjs/data/Const/definition.mjs +0 -1
- package/_mjs/data/Const/definition.mjs.map +1 -1
- package/_mjs/data/Const/instances.mjs +6 -8
- package/_mjs/data/Const/instances.mjs.map +1 -1
- package/_mjs/data/Const.mjs.map +1 -1
- package/_mjs/data/Datum/api.mjs +198 -250
- package/_mjs/data/Datum/api.mjs.map +1 -1
- package/_mjs/data/Datum/definition.mjs +10 -35
- package/_mjs/data/Datum/definition.mjs.map +1 -1
- package/_mjs/data/Datum/instances.mjs +0 -5
- package/_mjs/data/Datum/instances.mjs.map +1 -1
- package/_mjs/data/DatumEither/api.mjs +158 -191
- package/_mjs/data/DatumEither/api.mjs.map +1 -1
- package/_mjs/data/DatumEither/definition.mjs.map +1 -1
- package/_mjs/data/DecodeError/definition.mjs +15 -43
- package/_mjs/data/DecodeError/definition.mjs.map +1 -1
- package/_mjs/data/DecodeError.mjs.map +1 -1
- package/_mjs/data/Decoder/api.mjs +400 -53
- package/_mjs/data/Decoder/api.mjs.map +1 -1
- package/_mjs/data/Decoder/definition.mjs +0 -3
- package/_mjs/data/Decoder/definition.mjs.map +1 -1
- package/_mjs/data/Decoder.mjs.map +1 -1
- package/_mjs/data/Duration/api.mjs +20 -21
- package/_mjs/data/Duration/api.mjs.map +1 -1
- package/_mjs/data/Duration/definition.mjs +3 -7
- package/_mjs/data/Duration/definition.mjs.map +1 -1
- package/_mjs/data/Duration.mjs.map +1 -1
- package/_mjs/data/Either/api/align.mjs +7 -2
- package/_mjs/data/Either/api/align.mjs.map +1 -1
- package/_mjs/data/Either/api/alignWith.mjs +7 -12
- package/_mjs/data/Either/api/alignWith.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +139 -188
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/constructors.mjs +7 -16
- package/_mjs/data/Either/constructors.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +4 -15
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Either/destructors.mjs +11 -15
- package/_mjs/data/Either/destructors.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +22 -56
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/Either.mjs.map +1 -1
- package/_mjs/data/EitherT/api.mjs +8 -17
- package/_mjs/data/EitherT/api.mjs.map +1 -1
- package/_mjs/data/EitherT/definition.mjs.map +1 -1
- package/_mjs/data/Encoder/api.mjs +273 -0
- package/_mjs/data/Encoder/api.mjs.map +1 -0
- package/_mjs/data/Encoder/definition.mjs +13 -0
- package/_mjs/data/Encoder/definition.mjs.map +1 -0
- package/_mjs/data/Encoder.mjs +4 -0
- package/_mjs/data/Encoder.mjs.map +1 -0
- package/_mjs/data/Environment/api.mjs +47 -50
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Environment/definition.mjs +5 -10
- package/_mjs/data/Environment/definition.mjs.map +1 -1
- package/_mjs/data/Environment.mjs.map +1 -1
- package/_mjs/data/EnvironmentPatch.mjs +35 -68
- package/_mjs/data/EnvironmentPatch.mjs.map +1 -1
- package/_mjs/{typeclass → data}/Eq/definition.mjs +1 -2
- package/_mjs/data/Eq/definition.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Eq/derivations.mjs +9 -15
- package/_mjs/data/Eq/derivations.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Eq.mjs +0 -0
- package/_mjs/data/Eq.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Equatable/api.mjs +3 -6
- package/_mjs/data/Equatable/api.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Equatable/definition.mjs +0 -1
- package/_mjs/data/Equatable/definition.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Equatable/fast-equals.mjs +1 -63
- package/_mjs/data/Equatable/fast-equals.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Equatable.mjs +0 -0
- package/_mjs/data/Equatable.mjs.map +1 -0
- package/_mjs/data/ExecutionStrategy.mjs +17 -30
- package/_mjs/data/ExecutionStrategy.mjs.map +1 -1
- package/_mjs/data/Exit/api.mjs +124 -135
- package/_mjs/data/Exit/api.mjs.map +1 -1
- package/_mjs/data/Exit/constructors.mjs +3 -14
- package/_mjs/data/Exit/constructors.mjs.map +1 -1
- package/_mjs/data/Exit/definition.mjs +8 -33
- package/_mjs/data/Exit/definition.mjs.map +1 -1
- package/_mjs/data/Exit.mjs.map +1 -1
- package/_mjs/data/FiberId/api.mjs +23 -31
- package/_mjs/data/FiberId/api.mjs.map +1 -1
- package/_mjs/data/FiberId/constructors.mjs +3 -9
- package/_mjs/data/FiberId/constructors.mjs.map +1 -1
- package/_mjs/data/FiberId/definition.mjs +7 -26
- package/_mjs/data/FiberId/definition.mjs.map +1 -1
- package/_mjs/data/FiberId.mjs.map +1 -1
- package/_mjs/data/Guard/api.mjs +369 -0
- package/_mjs/data/Guard/api.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Guard/definition.mjs +0 -3
- package/_mjs/data/Guard/definition.mjs.map +1 -0
- package/_mjs/data/Guard.mjs +4 -0
- package/_mjs/data/Guard.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Hash.mjs +0 -1
- package/_mjs/data/Hash.mjs.map +1 -0
- package/_mjs/data/HashEq.mjs +30 -0
- package/_mjs/data/HashEq.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Hashable/definition.mjs +0 -1
- package/_mjs/data/Hashable/definition.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Hashable/hash.mjs +4 -59
- package/_mjs/data/Hashable/hash.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Hashable.mjs +0 -0
- package/_mjs/data/Hashable.mjs.map +1 -0
- package/_mjs/data/Identity/api.mjs +21 -20
- package/_mjs/data/Identity/api.mjs.map +1 -1
- package/_mjs/data/Identity/definition.mjs.map +1 -1
- package/_mjs/data/Identity/instances.mjs +8 -9
- package/_mjs/data/Identity/instances.mjs.map +1 -1
- package/_mjs/data/Identity.mjs.map +1 -1
- package/_mjs/data/Interval.mjs +41 -47
- package/_mjs/data/Interval.mjs.map +1 -1
- package/_mjs/data/Intervals.mjs +45 -60
- package/_mjs/data/Intervals.mjs.map +1 -1
- package/_mjs/data/Maybe/api.mjs +107 -128
- package/_mjs/data/Maybe/api.mjs.map +1 -1
- package/_mjs/data/Maybe/constructors.mjs +1 -18
- package/_mjs/data/Maybe/constructors.mjs.map +1 -1
- package/_mjs/data/Maybe/definition.mjs +10 -36
- package/_mjs/data/Maybe/definition.mjs.map +1 -1
- package/_mjs/data/Maybe/destructors.mjs +6 -6
- package/_mjs/data/Maybe/destructors.mjs.map +1 -1
- package/_mjs/data/Maybe/instances.mjs +40 -21
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/Maybe.mjs.map +1 -1
- package/_mjs/data/Newtype.mjs +0 -1
- package/_mjs/data/Newtype.mjs.map +1 -1
- package/_mjs/data/Ord/api/contramap.mjs +12 -0
- package/_mjs/data/Ord/api/contramap.mjs.map +1 -0
- package/_mjs/data/Ord/api/max.mjs +8 -0
- package/_mjs/data/Ord/api/max.mjs.map +1 -0
- package/_mjs/data/Ord/api/min.mjs +8 -0
- package/_mjs/data/Ord/api/min.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Ord/api.mjs +0 -0
- package/_mjs/data/Ord/api.mjs.map +1 -0
- package/_mjs/data/Ord/definition.mjs +12 -0
- package/_mjs/data/Ord/definition.mjs.map +1 -0
- package/_mjs/data/Ord/instances.mjs +34 -0
- package/_mjs/data/Ord/instances.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Ord.mjs +0 -0
- package/_mjs/data/Ord.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Ordering.mjs +0 -6
- package/_mjs/data/Ordering.mjs.map +1 -0
- package/_mjs/data/Predicate/api.mjs +10 -11
- package/_mjs/data/Predicate/api.mjs.map +1 -1
- package/_mjs/data/Predicate.mjs.map +1 -1
- package/_mjs/data/Refinement/api.mjs +15 -12
- package/_mjs/data/Refinement/api.mjs.map +1 -1
- package/_mjs/data/Refinement.mjs.map +1 -1
- package/_mjs/{typeclass → data}/Showable/definition.mjs +2 -3
- package/_mjs/data/Showable/definition.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Showable/show.mjs +119 -245
- package/_mjs/data/Showable/show.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Showable/styles.mjs +0 -0
- package/_mjs/data/Showable/styles.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Showable/util.mjs +53 -93
- package/_mjs/data/Showable/util.mjs.map +1 -0
- package/_mjs/{typeclass → data}/Showable.mjs +0 -0
- package/_mjs/data/Showable.mjs.map +1 -0
- package/_mjs/data/Struct/api.mjs +59 -63
- package/_mjs/data/Struct/api.mjs.map +1 -1
- package/_mjs/data/Struct/definition.mjs.map +1 -1
- package/_mjs/data/Tag/constructors.mjs +1 -3
- package/_mjs/data/Tag/constructors.mjs.map +1 -1
- package/_mjs/data/Tag/definition.mjs +3 -11
- package/_mjs/data/Tag/definition.mjs.map +1 -1
- package/_mjs/data/Tag.mjs.map +1 -1
- package/_mjs/data/These/api.mjs +118 -209
- package/_mjs/data/These/api.mjs.map +1 -1
- package/_mjs/data/These/constructors.mjs +1 -7
- package/_mjs/data/These/constructors.mjs.map +1 -1
- package/_mjs/data/These/definition.mjs +4 -16
- package/_mjs/data/These/definition.mjs.map +1 -1
- package/_mjs/data/These/destructors.mjs +23 -41
- package/_mjs/data/These/destructors.mjs.map +1 -1
- package/_mjs/data/These/instances.mjs +2 -7
- package/_mjs/data/These/instances.mjs.map +1 -1
- package/_mjs/data/These.mjs.map +1 -1
- package/_mjs/data/Trace/api.mjs +6 -6
- package/_mjs/data/Trace/api.mjs.map +1 -1
- package/_mjs/data/Trace/constructors.mjs +0 -2
- package/_mjs/data/Trace/constructors.mjs.map +1 -1
- package/_mjs/data/Trace/definition.mjs +0 -1
- package/_mjs/data/Trace/definition.mjs.map +1 -1
- package/_mjs/data/Trace.mjs.map +1 -1
- package/_mjs/data/TraceElement/definition.mjs +0 -9
- package/_mjs/data/TraceElement/definition.mjs.map +1 -1
- package/_mjs/data/TraceElement.mjs.map +1 -1
- package/_mjs/data/Zipped.mjs +2 -7
- package/_mjs/data/Zipped.mjs.map +1 -1
- package/_mjs/data/bigint/instances.mjs +2 -2
- package/_mjs/data/bigint/instances.mjs.map +1 -1
- package/_mjs/data/bigint.mjs.map +1 -1
- package/_mjs/data/boolean/instances.mjs +2 -2
- package/_mjs/data/boolean/instances.mjs.map +1 -1
- package/_mjs/data/boolean.mjs.map +1 -1
- package/_mjs/data/exceptions/ArrayIndexOutOfBoundsError.mjs +0 -1
- package/_mjs/data/exceptions/ArrayIndexOutOfBoundsError.mjs.map +1 -1
- package/_mjs/data/exceptions/IllegalArgumentError.mjs +0 -1
- package/_mjs/data/exceptions/IllegalArgumentError.mjs.map +1 -1
- package/_mjs/data/exceptions/IllegalStateError.mjs +0 -1
- package/_mjs/data/exceptions/IllegalStateError.mjs.map +1 -1
- package/_mjs/data/exceptions/IndexOutOfBoundsError.mjs +0 -1
- package/_mjs/data/exceptions/IndexOutOfBoundsError.mjs.map +1 -1
- package/_mjs/data/exceptions/InterruptedException.mjs +0 -1
- package/_mjs/data/exceptions/InterruptedException.mjs.map +1 -1
- package/_mjs/data/exceptions/InvalidCapacityError.mjs +0 -1
- package/_mjs/data/exceptions/InvalidCapacityError.mjs.map +1 -1
- package/_mjs/data/exceptions/NoSuchElementError.mjs +0 -1
- package/_mjs/data/exceptions/NoSuchElementError.mjs.map +1 -1
- package/_mjs/data/exceptions.mjs.map +1 -1
- package/_mjs/data/function/api.mjs +5 -8
- package/_mjs/data/function/api.mjs.map +1 -1
- package/_mjs/data/function/pipe.mjs +7 -20
- package/_mjs/data/function/pipe.mjs.map +1 -1
- package/_mjs/data/function.mjs.map +1 -1
- package/_mjs/data/number/api.mjs.map +1 -1
- package/_mjs/data/number/instances.mjs +10 -13
- package/_mjs/data/number/instances.mjs.map +1 -1
- package/_mjs/data/number.mjs.map +1 -1
- package/_mjs/data/object/instances.mjs +1 -9
- package/_mjs/data/object/instances.mjs.map +1 -1
- package/_mjs/data/object.mjs.map +1 -1
- package/_mjs/data/string/api.mjs +45 -83
- package/_mjs/data/string/api.mjs.map +1 -1
- package/_mjs/data/string/instances.mjs +11 -15
- package/_mjs/data/string/instances.mjs.map +1 -1
- package/_mjs/data/string.mjs.map +1 -1
- package/_mjs/global/api.mjs +4 -2
- package/_mjs/global/api.mjs.map +1 -1
- package/_mjs/internal/AtomicBoolean.mjs +0 -1
- package/_mjs/internal/AtomicBoolean.mjs.map +1 -1
- package/_mjs/internal/AtomicNumber.mjs +0 -4
- package/_mjs/internal/AtomicNumber.mjs.map +1 -1
- package/_mjs/internal/AtomicReference.mjs +0 -6
- package/_mjs/internal/AtomicReference.mjs.map +1 -1
- package/_mjs/internal/Stack.mjs +1 -10
- package/_mjs/internal/Stack.mjs.map +1 -1
- package/_mjs/json/EitherJson.mjs +1 -2
- package/_mjs/json/EitherJson.mjs.map +1 -1
- package/_mjs/json/MaybeJson.mjs +1 -2
- package/_mjs/json/MaybeJson.mjs.map +1 -1
- package/_mjs/json/TheseJson.mjs +1 -2
- package/_mjs/json/TheseJson.mjs.map +1 -1
- package/_mjs/optics/At/api.mjs +1 -2
- package/_mjs/optics/At/api.mjs.map +1 -1
- package/_mjs/optics/At/definition.mjs +2 -3
- package/_mjs/optics/At/definition.mjs.map +1 -1
- package/_mjs/optics/At.mjs.map +1 -1
- package/_mjs/optics/Fold/definition.mjs +2 -4
- package/_mjs/optics/Fold/definition.mjs.map +1 -1
- package/_mjs/optics/Fold.mjs.map +1 -1
- package/_mjs/optics/Getter/definition.mjs +1 -3
- package/_mjs/optics/Getter/definition.mjs.map +1 -1
- package/_mjs/optics/Getter.mjs.map +1 -1
- package/_mjs/optics/Index/api.mjs +4 -6
- package/_mjs/optics/Index/api.mjs.map +1 -1
- package/_mjs/optics/Index/definition.mjs +1 -2
- package/_mjs/optics/Index/definition.mjs.map +1 -1
- package/_mjs/optics/Index.mjs.map +1 -1
- package/_mjs/optics/Iso/api.mjs +8 -7
- package/_mjs/optics/Iso/api.mjs.map +1 -1
- package/_mjs/optics/Iso/definition.mjs +10 -12
- package/_mjs/optics/Iso/definition.mjs.map +1 -1
- package/_mjs/optics/Iso.mjs.map +1 -1
- package/_mjs/optics/Lens/api.mjs +48 -60
- package/_mjs/optics/Lens/api.mjs.map +1 -1
- package/_mjs/optics/Lens/definition.mjs +8 -10
- package/_mjs/optics/Lens/definition.mjs.map +1 -1
- package/_mjs/optics/Lens.mjs.map +1 -1
- package/_mjs/optics/Optional/api/compose.mjs +8 -7
- package/_mjs/optics/Optional/api/compose.mjs.map +1 -1
- package/_mjs/optics/Optional/definition.mjs +8 -14
- package/_mjs/optics/Optional/definition.mjs.map +1 -1
- package/_mjs/optics/Optional.mjs +2 -2
- package/_mjs/optics/Optional.mjs.map +1 -1
- package/_mjs/optics/Prism/api/compose.mjs +8 -7
- package/_mjs/optics/Prism/api/compose.mjs.map +1 -1
- package/_mjs/optics/Prism/api/fromNullable.mjs +2 -3
- package/_mjs/optics/Prism/api/fromNullable.mjs.map +1 -1
- package/_mjs/optics/Prism/api/just.mjs +2 -3
- package/_mjs/optics/Prism/api/just.mjs.map +1 -1
- package/_mjs/optics/Prism/definition.mjs +6 -9
- package/_mjs/optics/Prism/definition.mjs.map +1 -1
- package/_mjs/optics/Prism.mjs +2 -2
- package/_mjs/optics/Prism.mjs.map +1 -1
- package/_mjs/optics/Setter/definition.mjs +5 -13
- package/_mjs/optics/Setter/definition.mjs.map +1 -1
- package/_mjs/optics/Setter.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/compose.mjs +7 -6
- package/_mjs/optics/Traversal/api/compose.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs +2 -3
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
- package/_mjs/optics/Traversal/definition.mjs +9 -12
- package/_mjs/optics/Traversal/definition.mjs.map +1 -1
- package/_mjs/optics/Traversal.mjs +2 -2
- package/_mjs/optics/Traversal.mjs.map +1 -1
- package/_mjs/typeclass/Align.mjs.map +1 -1
- package/_mjs/typeclass/Alt.mjs.map +1 -1
- package/_mjs/typeclass/Alternative.mjs.map +1 -1
- package/_mjs/typeclass/Applicative.mjs.map +1 -1
- package/_mjs/typeclass/ApplicativeExcept.mjs +6 -10
- package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
- package/_mjs/typeclass/Apply.mjs +14 -35
- package/_mjs/typeclass/Apply.mjs.map +1 -1
- package/_mjs/typeclass/Chain.mjs +5 -7
- package/_mjs/typeclass/Chain.mjs.map +1 -1
- package/_mjs/typeclass/Closure.mjs +1 -2
- package/_mjs/typeclass/Closure.mjs.map +1 -1
- package/_mjs/typeclass/Filterable.mjs.map +1 -1
- package/_mjs/typeclass/FilterableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Foldable.mjs +1 -2
- package/_mjs/typeclass/Foldable.mjs.map +1 -1
- package/_mjs/typeclass/FoldableWithIndex.mjs +1 -2
- package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Functor.mjs +0 -1
- package/_mjs/typeclass/Functor.mjs.map +1 -1
- package/_mjs/typeclass/FunctorWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Has.mjs +8 -5
- package/_mjs/typeclass/Has.mjs.map +1 -1
- package/_mjs/typeclass/Monad.mjs.map +1 -1
- package/_mjs/typeclass/MonadExcept.mjs +1 -1
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
- package/_mjs/typeclass/Monoid.mjs +6 -15
- package/_mjs/typeclass/Monoid.mjs.map +1 -1
- package/_mjs/typeclass/Pointed.mjs.map +1 -1
- package/_mjs/typeclass/Semialign.mjs +7 -14
- package/_mjs/typeclass/Semialign.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/api.mjs +6 -8
- package/_mjs/typeclass/Semigroup/api.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/definition.mjs +2 -3
- package/_mjs/typeclass/Semigroup/definition.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/derivations.mjs +7 -14
- package/_mjs/typeclass/Semigroup/derivations.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup.mjs.map +1 -1
- package/_mjs/typeclass/Semimonoidal.mjs.map +1 -1
- package/_mjs/typeclass/Traversable.mjs +1 -3
- package/_mjs/typeclass/Traversable.mjs.map +1 -1
- package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Witherable.mjs +2 -2
- package/_mjs/typeclass/Witherable.mjs.map +1 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs +2 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/builtin.mjs.map +1 -1
- package/_mjs/typeclass.mjs +9 -8
- package/_mjs/typeclass.mjs.map +1 -1
- package/_mjs/types.mjs.map +1 -1
- package/_mjs/util/AnsiFormat.mjs +15 -42
- package/_mjs/util/AnsiFormat.mjs.map +1 -1
- package/_mjs/util/PCGRandom.mjs +16 -43
- package/_mjs/util/PCGRandom.mjs.map +1 -1
- package/_mjs/util/assert.mjs +0 -1
- package/_mjs/util/assert.mjs.map +1 -1
- package/_mjs/util/pattern.mjs.map +1 -1
- package/_mjs/util/predicates.mjs +0 -1
- package/_mjs/util/predicates.mjs.map +1 -1
- package/_mjs/util/rand/Random.mjs +0 -17
- package/_mjs/util/rand/Random.mjs.map +1 -1
- package/_mjs/util/rand/distribution/UniformArrayIntDistribution.mjs +0 -4
- package/_mjs/util/rand/distribution/UniformArrayIntDistribution.mjs.map +1 -1
- package/_mjs/util/rand/distribution/UniformBigIntDistribution.mjs +4 -12
- package/_mjs/util/rand/distribution/UniformBigIntDistribution.mjs.map +1 -1
- package/_mjs/util/rand/distribution/UniformIntDistribution.mjs +0 -9
- package/_mjs/util/rand/distribution/UniformIntDistribution.mjs.map +1 -1
- package/_mjs/util/rand/distribution/internals/ArrayInt.mjs +6 -36
- package/_mjs/util/rand/distribution/internals/ArrayInt.mjs.map +1 -1
- package/_mjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.mjs +6 -9
- package/_mjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.mjs.map +1 -1
- package/_mjs/util/rand/distribution/internals/UniformIntDistributionInternal.mjs +8 -13
- package/_mjs/util/rand/distribution/internals/UniformIntDistributionInternal.mjs.map +1 -1
- package/_mjs/util/rand/generator/MersenneTwister.mjs +5 -23
- package/_mjs/util/rand/generator/MersenneTwister.mjs.map +1 -1
- package/_mjs/util/rand/generator/RandomGenerator.mjs +0 -4
- package/_mjs/util/rand/generator/RandomGenerator.mjs.map +1 -1
- package/_mjs/util/rand.mjs.map +1 -1
- package/_src/collection/Iterable/api/traverseConc.ts +3 -3
- package/_src/collection/Iterable/api.ts +458 -414
- package/_src/collection/Iterable/constructors.ts +3 -1
- package/_src/collection/compat/Array/api.ts +17 -14
- package/_src/collection/compat/Array.ts +0 -1
- package/_src/collection/compat/ArrayLike/api.ts +2 -2
- package/_src/collection/compat.ts +0 -1
- package/_src/collection/immutable/Conc/api.ts +716 -607
- package/_src/collection/immutable/Conc/definition.ts +62 -70
- package/_src/collection/immutable/Conc.ts +0 -1
- package/_src/collection/immutable/Dictionary/api.ts +44 -32
- package/_src/collection/immutable/Dictionary.ts +4 -0
- package/_src/collection/immutable/HashMap/api.ts +371 -263
- package/_src/collection/immutable/HashMap/definition.ts +17 -3
- package/_src/collection/immutable/HashMap/internal.ts +5 -9
- package/_src/collection/immutable/HashSet/api.ts +237 -190
- package/_src/collection/immutable/HashSet/definition.ts +23 -9
- package/_src/collection/immutable/ImmutableArray/api/chunksOf.ts +5 -3
- package/_src/collection/immutable/ImmutableArray/api/slice.ts +5 -3
- package/_src/collection/immutable/ImmutableArray/api/splitAt.ts +5 -3
- package/_src/collection/immutable/ImmutableArray/api/splitWhere.ts +13 -14
- package/_src/collection/immutable/ImmutableArray/api.ts +873 -723
- package/_src/collection/immutable/ImmutableArray/instances.ts +54 -73
- package/_src/collection/immutable/ImmutableArray.ts +0 -1
- package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +311 -273
- package/_src/collection/immutable/ImmutableNonEmptyArray/constructors.ts +19 -4
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +0 -1
- package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +22 -23
- package/_src/collection/immutable/ImmutableNonEmptyArray.ts +0 -1
- package/_src/collection/immutable/List/api/foldLeft.ts +11 -9
- package/_src/collection/immutable/List/api.ts +156 -132
- package/_src/collection/immutable/List/constructors.ts +1 -1
- package/_src/collection/immutable/List.ts +0 -1
- package/_src/collection/immutable/Queue/api.ts +77 -61
- package/_src/collection/immutable/Queue/definition.ts +0 -1
- package/_src/collection/immutable/Queue/guards.ts +2 -2
- package/_src/collection/immutable/RoseTree/api.ts +38 -32
- package/_src/collection/immutable/RoseTree/definition.ts +2 -0
- package/_src/collection/immutable/SortedMap/api.ts +412 -381
- package/_src/collection/immutable/SortedMap/definition.ts +5 -0
- package/_src/collection/immutable/Vector/api.ts +640 -514
- package/_src/collection/immutable/Vector/definition.ts +11 -12
- package/_src/collection/immutable/Vector/internal.ts +37 -38
- package/_src/collection/immutable.ts +1 -0
- package/_src/collection/mutable/HashMap.ts +8 -11
- package/_src/collection/mutable/HashSet.ts +7 -8
- package/_src/collection/mutable/ListBuffer.ts +1 -1
- package/_src/collection/mutable/internal.ts +0 -2
- package/_src/collection/weak/IterableWeakMap.ts +11 -7
- package/_src/collection/weak/IterableWeakSet.ts +10 -5
- package/_src/control/Eval/api.ts +35 -19
- package/_src/control/Eval/instance.ts +5 -5
- package/_src/control/Z/api.ts +191 -208
- package/_src/control/Z/instances.ts +4 -5
- package/_src/control/Z/runtime.ts +190 -189
- package/_src/data/Branded/definition.ts +11 -12
- package/_src/data/Branded.ts +0 -1
- package/_src/data/CaseClass.ts +4 -1
- package/_src/data/Cause/api/fold.ts +13 -14
- package/_src/data/Cause/api/linearize.ts +4 -4
- package/_src/data/Cause/api/unified.ts +1 -1
- package/_src/data/Cause/api.ts +126 -108
- package/_src/data/Cause/definition.ts +2 -2
- package/_src/data/Cause.ts +0 -1
- package/_src/data/Const/api.ts +6 -4
- package/_src/data/Const/instances.ts +3 -3
- package/_src/data/Datum/api.ts +228 -198
- package/_src/data/Datum/definition.ts +2 -5
- package/_src/data/DatumEither/api.ts +208 -193
- package/_src/data/DecodeError/definition.ts +4 -2
- package/_src/data/Decoder/api.ts +498 -11
- package/_src/data/Duration/api.ts +24 -15
- package/_src/data/Either/api/align.ts +7 -2
- package/_src/data/Either/api/alignWith.ts +13 -15
- package/_src/data/Either/api.ts +141 -119
- package/_src/data/Either/constructors.ts +12 -10
- package/_src/data/Either/destructors.ts +11 -9
- package/_src/data/Either/instances.ts +27 -23
- package/_src/data/EitherT/api.ts +43 -49
- package/_src/data/Encoder/api.ts +375 -0
- package/_src/data/Encoder/definition.ts +16 -0
- package/_src/data/Encoder.ts +4 -0
- package/_src/data/Environment/api.ts +53 -45
- package/_src/data/Environment/definition.ts +1 -4
- package/_src/data/EnvironmentPatch.ts +10 -9
- package/_src/{typeclass → data}/Eq/definition.ts +2 -2
- package/_src/{typeclass → data}/Eq/derivations.ts +6 -6
- package/_src/{typeclass → data}/Eq.ts +0 -0
- package/_src/{typeclass → data}/Equatable/api.ts +2 -2
- package/_src/{typeclass → data}/Equatable/definition.ts +0 -0
- package/_src/{typeclass → data}/Equatable/fast-equals.ts +8 -61
- package/_src/{typeclass → data}/Equatable.ts +0 -0
- package/_src/data/ExecutionStrategy.ts +14 -24
- package/_src/data/Exit/api.ts +106 -75
- package/_src/data/Exit/constructors.ts +2 -2
- package/_src/data/FiberId/api.ts +21 -19
- package/_src/data/FiberId/constructors.ts +4 -5
- package/_src/data/FiberId/definition.ts +4 -1
- package/_src/data/Guard/api.ts +457 -0
- package/_src/{typeclass → data}/Guard/definition.ts +3 -1
- package/_src/data/Guard.ts +4 -0
- package/_src/{typeclass → data}/Hash.ts +0 -0
- package/_src/{typeclass → data}/HashEq.ts +4 -6
- package/_src/{typeclass → data}/Hashable/definition.ts +0 -0
- package/_src/{typeclass → data}/Hashable/hash.ts +1 -2
- package/_src/{typeclass → data}/Hashable.ts +0 -0
- package/_src/data/Identity/api.ts +20 -12
- package/_src/data/Identity/instances.ts +4 -7
- package/_src/data/Interval.ts +41 -31
- package/_src/data/Intervals.ts +31 -23
- package/_src/data/Maybe/api.ts +112 -79
- package/_src/data/Maybe/constructors.ts +3 -3
- package/_src/data/Maybe/definition.ts +11 -1
- package/_src/data/Maybe/destructors.ts +6 -4
- package/_src/data/Maybe/instances.ts +31 -21
- package/_src/data/Ord/api/contramap.ts +11 -0
- package/_src/data/Ord/api/max.ts +7 -0
- package/_src/data/Ord/api/min.ts +7 -0
- package/_src/{typeclass → data}/Ord/api.ts +0 -0
- package/_src/{typeclass → data}/Ord/definition.ts +2 -6
- package/_src/{typeclass → data}/Ord/instances.ts +6 -8
- package/_src/{typeclass → data}/Ord.ts +0 -0
- package/_src/{typeclass → data}/Ordering.ts +2 -0
- package/_src/data/Predicate/api.ts +14 -8
- package/_src/data/Refinement/api.ts +19 -13
- package/_src/{typeclass → data}/Showable/definition.ts +4 -4
- package/_src/{typeclass → data}/Showable/show.ts +23 -38
- package/_src/{typeclass → data}/Showable/styles.ts +0 -8
- package/_src/{typeclass → data}/Showable/util.ts +22 -57
- package/_src/{typeclass → data}/Showable.ts +0 -0
- package/_src/data/Struct/api.ts +75 -55
- package/_src/data/Tag/constructors.ts +1 -2
- package/_src/data/Tag/definition.ts +0 -1
- package/_src/data/These/api.ts +114 -114
- package/_src/data/These/destructors.ts +23 -24
- package/_src/data/Trace/api.ts +5 -3
- package/_src/data/Zipped.ts +3 -4
- package/_src/data/bigint/instances.ts +1 -0
- package/_src/data/boolean/instances.ts +1 -0
- package/_src/data/function/api.ts +6 -7
- package/_src/data/function/pipe.ts +9 -1
- package/_src/data/number/instances.ts +5 -5
- package/_src/data/object/instances.ts +0 -11
- package/_src/data/string/api.ts +40 -62
- package/_src/data/string/instances.ts +4 -4
- package/_src/data.ts +10 -0
- package/_src/global/api.ts +7 -12
- package/_src/global.ts +28 -12
- package/_src/internal/AtomicBoolean.ts +0 -1
- package/_src/internal/AtomicNumber.ts +0 -7
- package/_src/internal/AtomicReference.ts +0 -4
- package/_src/internal/Stack.ts +1 -7
- package/_src/optics/At/definition.ts +5 -3
- package/_src/optics/Fold/definition.ts +3 -10
- package/_src/optics/Getter/definition.ts +1 -2
- package/_src/optics/Index/definition.ts +1 -1
- package/_src/optics/Iso/api.ts +8 -6
- package/_src/optics/Iso/definition.ts +3 -3
- package/_src/optics/Lens/api.ts +44 -42
- package/_src/optics/Lens/definition.ts +5 -5
- package/_src/optics/Optional/api/compose.ts +9 -9
- package/_src/optics/Optional/definition.ts +9 -16
- package/_src/optics/Optional.ts +0 -1
- package/_src/optics/Prism/api/compose.ts +9 -6
- package/_src/optics/Prism/definition.ts +3 -3
- package/_src/optics/Prism.ts +0 -1
- package/_src/optics/Setter/definition.ts +3 -23
- package/_src/optics/Traversal/api/compose.ts +7 -8
- package/_src/optics/Traversal/api/fromTraversable.ts +1 -1
- package/_src/optics/Traversal/definition.ts +10 -15
- package/_src/optics/Traversal.ts +0 -1
- package/_src/typeclass/Align.ts +0 -3
- package/_src/typeclass/Alt.ts +2 -1
- package/_src/typeclass/Applicative.ts +0 -1
- package/_src/typeclass/ApplicativeExcept.ts +15 -10
- package/_src/typeclass/Apply.ts +34 -36
- package/_src/typeclass/Chain.ts +9 -12
- package/_src/typeclass/Closure.ts +2 -2
- package/_src/typeclass/Filterable.ts +19 -13
- package/_src/typeclass/FilterableWithIndex.ts +19 -13
- package/_src/typeclass/Foldable.ts +7 -10
- package/_src/typeclass/FoldableWithIndex.ts +7 -10
- package/_src/typeclass/Functor.ts +6 -4
- package/_src/typeclass/FunctorWithIndex.ts +3 -2
- package/_src/typeclass/Has.ts +6 -4
- package/_src/typeclass/MonadExcept.ts +1 -1
- package/_src/typeclass/Monoid.ts +2 -2
- package/_src/typeclass/Semialign.ts +43 -32
- package/_src/typeclass/Semigroup/api.ts +0 -2
- package/_src/typeclass/Semigroup/definition.ts +2 -2
- package/_src/typeclass/Semigroup/derivations.ts +5 -5
- package/_src/typeclass/Semimonoidal.ts +3 -2
- package/_src/typeclass/Traversable.ts +13 -18
- package/_src/typeclass/TraversableWithIndex.ts +5 -7
- package/_src/typeclass/Witherable.ts +21 -13
- package/_src/typeclass/WitherableWithIndex.ts +26 -17
- package/_src/typeclass/builtin/Symbol.ts +0 -1
- package/_src/typeclass.ts +9 -8
- package/_src/types/extractions.ts +12 -3
- package/_src/types/utility.ts +3 -5
- package/_src/util/AnsiFormat.ts +0 -25
- package/_src/util/PCGRandom.ts +4 -9
- package/_src/util/assert.ts +1 -2
- package/_src/util/pattern.ts +91 -12
- package/_src/util/predicates.ts +3 -1
- package/_src/util/rand/Random.ts +12 -16
- package/_src/util/rand/distribution/Distribution.ts +0 -1
- package/_src/util/rand/distribution/UniformArrayIntDistribution.ts +0 -3
- package/_src/util/rand/distribution/UniformBigIntDistribution.ts +0 -5
- package/_src/util/rand/distribution/UniformIntDistribution.ts +0 -7
- package/_src/util/rand/distribution/internals/ArrayInt.ts +3 -13
- package/_src/util/rand/distribution/internals/UniformArrayIntDistributionInternal.ts +0 -3
- package/_src/util/rand/distribution/internals/UniformIntDistributionInternal.ts +0 -4
- package/_src/util/rand/generator/MersenneTwister.ts +6 -29
- package/_src/util/rand/generator/RandomGenerator.ts +0 -3
- package/_src/util/rand.ts +0 -2
- package/collection/Iterable/api/traverseConc.d.ts +2 -2
- package/collection/Iterable/api.d.ts +71 -66
- package/collection/Iterable/constructors.d.ts +1 -1
- package/collection/compat/Array/api.d.ts +6 -6
- package/collection/compat/Array.d.ts +0 -1
- package/collection/compat/ArrayLike/api.d.ts +2 -2
- package/collection/compat.d.ts +0 -1
- package/collection/immutable/Conc/api.d.ts +108 -105
- package/collection/immutable/Conc/definition.d.ts +4 -4
- package/collection/immutable/Conc.d.ts +0 -1
- package/collection/immutable/Dictionary/api.d.ts +12 -12
- package/collection/immutable/Dictionary.d.ts +2 -0
- package/collection/immutable/HashMap/api.d.ts +91 -85
- package/collection/immutable/HashMap/definition.d.ts +13 -4
- package/collection/immutable/HashSet/api.d.ts +66 -51
- package/collection/immutable/HashSet/definition.d.ts +15 -6
- package/collection/immutable/ImmutableArray/api/chunksOf.d.ts +2 -2
- package/collection/immutable/ImmutableArray/api/slice.d.ts +2 -2
- package/collection/immutable/ImmutableArray/api/splitAt.d.ts +2 -2
- package/collection/immutable/ImmutableArray/api/splitWhere.d.ts +3 -3
- package/collection/immutable/ImmutableArray/api.d.ts +206 -206
- package/collection/immutable/ImmutableArray/definition.d.ts +2 -2
- package/collection/immutable/ImmutableArray.d.ts +0 -1
- package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +64 -63
- package/collection/immutable/ImmutableNonEmptyArray.d.ts +0 -1
- package/collection/immutable/List/api/foldLeft.d.ts +2 -2
- package/collection/immutable/List/api.d.ts +28 -26
- package/collection/immutable/List/constructors.d.ts +1 -1
- package/collection/immutable/Queue/api.d.ts +23 -23
- package/collection/immutable/Queue/guards.d.ts +1 -1
- package/collection/immutable/RoseTree/api.d.ts +14 -14
- package/collection/immutable/RoseTree/definition.d.ts +2 -2
- package/collection/immutable/SortedMap/api.d.ts +47 -46
- package/collection/immutable/SortedMap/definition.d.ts +3 -0
- package/collection/immutable/Vector/api.d.ts +136 -132
- package/collection/immutable/Vector/definition.d.ts +4 -4
- package/collection/immutable/Vector/internal.d.ts +2 -2
- package/collection/immutable.d.ts +1 -0
- package/collection/mutable/HashMap.d.ts +2 -2
- package/collection/mutable/HashSet.d.ts +2 -2
- package/collection/mutable/ListBuffer.d.ts +1 -1
- package/control/Eval/api.d.ts +12 -12
- package/control/Z/api.d.ts +68 -68
- package/control/Z/runtime.d.ts +10 -10
- package/data/Branded.d.ts +0 -1
- package/data/CaseClass.d.ts +2 -2
- package/data/Cause/api/fold.d.ts +3 -3
- package/data/Cause/api.d.ts +20 -20
- package/data/Const/api.d.ts +3 -3
- package/data/Datum/api.d.ts +44 -43
- package/data/Datum/definition.d.ts +2 -2
- package/data/DatumEither/api.d.ts +48 -46
- package/data/DecodeError/definition.d.ts +2 -1
- package/data/Decoder/api.d.ts +154 -6
- package/data/Duration/api.d.ts +12 -7
- package/data/Duration/definition.d.ts +2 -2
- package/data/Either/api/align.d.ts +5 -1
- package/data/Either/api/alignWith.d.ts +2 -2
- package/data/Either/api.d.ts +40 -46
- package/data/Either/constructors.d.ts +6 -6
- package/data/Either/destructors.d.ts +2 -2
- package/data/Either/instances.d.ts +1 -1
- package/data/EitherT/api.d.ts +6 -6
- package/data/Encoder/api.d.ts +214 -0
- package/data/Encoder/definition.d.ts +16 -0
- package/data/Encoder.d.ts +2 -0
- package/data/Environment/api.d.ts +14 -14
- package/data/Environment/definition.d.ts +2 -2
- package/data/EnvironmentPatch.d.ts +4 -4
- package/{typeclass → data}/Eq/definition.d.ts +3 -3
- package/{typeclass → data}/Eq/derivations.d.ts +3 -3
- package/{typeclass → data}/Eq.d.ts +0 -0
- package/{typeclass → data}/Equatable/api.d.ts +2 -2
- package/{typeclass → data}/Equatable/definition.d.ts +1 -1
- package/{typeclass → data}/Equatable/fast-equals.d.ts +0 -0
- package/{typeclass → data}/Equatable.d.ts +0 -0
- package/data/ExecutionStrategy.d.ts +1 -6
- package/data/Exit/api.d.ts +34 -34
- package/data/Exit/constructors.d.ts +2 -2
- package/data/Exit/definition.d.ts +1 -1
- package/data/FiberId/api.d.ts +2 -2
- package/data/FiberId/constructors.d.ts +1 -2
- package/data/FiberId/definition.d.ts +7 -5
- package/data/Guard/api.d.ts +242 -0
- package/{typeclass → data}/Guard/definition.d.ts +4 -2
- package/{typeclass → data}/Guard.d.ts +0 -0
- package/{typeclass → data}/Hash.d.ts +1 -1
- package/{typeclass → data}/HashEq.d.ts +6 -7
- package/{typeclass → data}/Hashable/definition.d.ts +1 -1
- package/{typeclass → data}/Hashable/hash.d.ts +11 -11
- package/{typeclass → data}/Hashable.d.ts +0 -0
- package/data/Identity/api.d.ts +8 -8
- package/data/Interval.d.ts +13 -12
- package/data/Intervals.d.ts +11 -11
- package/data/Maybe/api.d.ts +36 -37
- package/data/Maybe/constructors.d.ts +2 -2
- package/data/Maybe/definition.d.ts +9 -5
- package/data/Maybe/destructors.d.ts +2 -2
- package/data/Maybe/instances.d.ts +7 -1
- package/data/Ord/api/contramap.d.ts +6 -0
- package/data/Ord/api/max.d.ts +7 -0
- package/data/Ord/api/min.d.ts +7 -0
- package/{typeclass → data}/Ord/api.d.ts +0 -0
- package/data/Ord/definition.d.ts +19 -0
- package/{typeclass → data}/Ord/instances.d.ts +3 -3
- package/{typeclass → data}/Ord.d.ts +0 -0
- package/{typeclass → data}/Ordering.d.ts +5 -5
- package/data/Predicate/api.d.ts +5 -5
- package/data/Refinement/api.d.ts +9 -9
- package/data/Showable/definition.d.ts +17 -0
- package/{typeclass → data}/Showable/show.d.ts +1 -1
- package/{typeclass → data}/Showable/styles.d.ts +0 -0
- package/{typeclass → data}/Showable/util.d.ts +0 -0
- package/{typeclass → data}/Showable.d.ts +0 -0
- package/data/Struct/api.d.ts +13 -23
- package/data/Tag/constructors.d.ts +1 -2
- package/data/Tag/definition.d.ts +2 -3
- package/data/These/api.d.ts +18 -22
- package/data/These/destructors.d.ts +4 -4
- package/data/These/instances.d.ts +1 -1
- package/data/Trace/api.d.ts +2 -2
- package/data/bigint/instances.d.ts +1 -0
- package/data/boolean/instances.d.ts +1 -0
- package/data/function/api.d.ts +3 -3
- package/data/function/pipe.d.ts +7 -1
- package/data/number/instances.d.ts +1 -1
- package/data/object/instances.d.ts +0 -6
- package/data/string/api.d.ts +9 -49
- package/data.d.ts +10 -0
- package/global/api.d.ts +3 -3
- package/global.d.ts +28 -12
- package/internal/Stack.d.ts +1 -1
- package/optics/At/definition.d.ts +1 -1
- package/optics/Fold/definition.d.ts +2 -6
- package/optics/Getter/definition.d.ts +1 -1
- package/optics/Index/definition.d.ts +1 -1
- package/optics/Iso/api.d.ts +2 -2
- package/optics/Iso/definition.d.ts +2 -2
- package/optics/Lens/api.d.ts +10 -10
- package/optics/Lens/definition.d.ts +4 -4
- package/optics/Optional/api/compose.d.ts +2 -2
- package/optics/Optional/definition.d.ts +4 -8
- package/optics/Prism/api/compose.d.ts +2 -2
- package/optics/Prism/definition.d.ts +2 -2
- package/optics/Setter/definition.d.ts +2 -14
- package/optics/Traversal/api/compose.d.ts +2 -2
- package/optics/Traversal/definition.d.ts +4 -4
- package/package.json +2 -2
- package/typeclass/Alt.d.ts +1 -1
- package/typeclass/ApplicativeExcept.d.ts +2 -6
- package/typeclass/Apply.d.ts +7 -7
- package/typeclass/Chain.d.ts +4 -4
- package/typeclass/Closure.d.ts +2 -2
- package/typeclass/Filterable.d.ts +6 -6
- package/typeclass/FilterableWithIndex.d.ts +6 -6
- package/typeclass/Foldable.d.ts +4 -4
- package/typeclass/FoldableWithIndex.d.ts +4 -4
- package/typeclass/Functor.d.ts +2 -2
- package/typeclass/FunctorWithIndex.d.ts +1 -1
- package/typeclass/Has.d.ts +3 -3
- package/typeclass/Semialign.d.ts +14 -14
- package/typeclass/Semigroup/api.d.ts +1 -1
- package/typeclass/Semigroup/definition.d.ts +2 -2
- package/typeclass/Semimonoidal.d.ts +1 -1
- package/typeclass/Traversable.d.ts +4 -6
- package/typeclass/TraversableWithIndex.d.ts +2 -2
- package/typeclass/Witherable.d.ts +3 -3
- package/typeclass/WitherableWithIndex.d.ts +5 -5
- package/typeclass.d.ts +8 -8
- package/types/extractions.d.ts +10 -6
- package/util/assert.d.ts +1 -1
- package/_cjs/collection/compat/Array/derivations.cjs +0 -96
- package/_cjs/collection/compat/Array/derivations.cjs.map +0 -1
- package/_cjs/collection/compat/Record/instances.cjs +0 -128
- package/_cjs/collection/compat/Record/instances.cjs.map +0 -1
- package/_cjs/collection/compat/Record.cjs +0 -19
- package/_cjs/collection/compat/Record.cjs.map +0 -1
- package/_cjs/collection/immutable/Conc/derivations.cjs +0 -45
- package/_cjs/collection/immutable/Conc/derivations.cjs.map +0 -1
- package/_cjs/collection/immutable/ImmutableArray/derivations.cjs +0 -41
- package/_cjs/collection/immutable/ImmutableArray/derivations.cjs.map +0 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs +0 -62
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs.map +0 -1
- package/_cjs/data/Branded/derivations.cjs +0 -58
- package/_cjs/data/Branded/derivations.cjs.map +0 -1
- package/_cjs/typeclass/Eq/definition.cjs.map +0 -1
- package/_cjs/typeclass/Eq/derivations.cjs.map +0 -1
- package/_cjs/typeclass/Eq.cjs.map +0 -1
- package/_cjs/typeclass/Equatable/api.cjs.map +0 -1
- package/_cjs/typeclass/Equatable/definition.cjs.map +0 -1
- package/_cjs/typeclass/Equatable/fast-equals.cjs.map +0 -1
- package/_cjs/typeclass/Equatable.cjs.map +0 -1
- package/_cjs/typeclass/Guard/api.cjs +0 -40
- package/_cjs/typeclass/Guard/api.cjs.map +0 -1
- package/_cjs/typeclass/Guard/definition.cjs.map +0 -1
- package/_cjs/typeclass/Guard/derivations.cjs +0 -85
- package/_cjs/typeclass/Guard/derivations.cjs.map +0 -1
- package/_cjs/typeclass/Guard.cjs.map +0 -1
- package/_cjs/typeclass/Hash.cjs.map +0 -1
- package/_cjs/typeclass/HashEq.cjs.map +0 -1
- package/_cjs/typeclass/Hashable/definition.cjs.map +0 -1
- package/_cjs/typeclass/Hashable/hash.cjs.map +0 -1
- package/_cjs/typeclass/Hashable.cjs.map +0 -1
- package/_cjs/typeclass/Ord/api/contramap.cjs +0 -17
- package/_cjs/typeclass/Ord/api/contramap.cjs.map +0 -1
- package/_cjs/typeclass/Ord/api/max.cjs.map +0 -1
- package/_cjs/typeclass/Ord/api/min.cjs.map +0 -1
- package/_cjs/typeclass/Ord/api.cjs.map +0 -1
- package/_cjs/typeclass/Ord/definition.cjs.map +0 -1
- package/_cjs/typeclass/Ord/instances.cjs.map +0 -1
- package/_cjs/typeclass/Ord.cjs.map +0 -1
- package/_cjs/typeclass/Ordering.cjs.map +0 -1
- package/_cjs/typeclass/Showable/definition.cjs.map +0 -1
- package/_cjs/typeclass/Showable/show.cjs.map +0 -1
- package/_cjs/typeclass/Showable/styles.cjs.map +0 -1
- package/_cjs/typeclass/Showable/util.cjs.map +0 -1
- package/_cjs/typeclass/Showable.cjs.map +0 -1
- package/_mjs/collection/compat/Array/derivations.mjs +0 -70
- package/_mjs/collection/compat/Array/derivations.mjs.map +0 -1
- package/_mjs/collection/compat/Record/instances.mjs +0 -105
- package/_mjs/collection/compat/Record/instances.mjs.map +0 -1
- package/_mjs/collection/compat/Record.mjs +0 -3
- package/_mjs/collection/compat/Record.mjs.map +0 -1
- package/_mjs/collection/immutable/Conc/derivations.mjs +0 -27
- package/_mjs/collection/immutable/Conc/derivations.mjs.map +0 -1
- package/_mjs/collection/immutable/ImmutableArray/derivations.mjs +0 -25
- package/_mjs/collection/immutable/ImmutableArray/derivations.mjs.map +0 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs +0 -39
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs.map +0 -1
- package/_mjs/data/Branded/derivations.mjs +0 -40
- package/_mjs/data/Branded/derivations.mjs.map +0 -1
- package/_mjs/typeclass/Eq/definition.mjs.map +0 -1
- package/_mjs/typeclass/Eq/derivations.mjs.map +0 -1
- package/_mjs/typeclass/Eq.mjs.map +0 -1
- package/_mjs/typeclass/Equatable/api.mjs.map +0 -1
- package/_mjs/typeclass/Equatable/definition.mjs.map +0 -1
- package/_mjs/typeclass/Equatable/fast-equals.mjs.map +0 -1
- package/_mjs/typeclass/Equatable.mjs.map +0 -1
- package/_mjs/typeclass/Guard/api.mjs +0 -24
- package/_mjs/typeclass/Guard/api.mjs.map +0 -1
- package/_mjs/typeclass/Guard/definition.mjs.map +0 -1
- package/_mjs/typeclass/Guard/derivations.mjs +0 -67
- package/_mjs/typeclass/Guard/derivations.mjs.map +0 -1
- package/_mjs/typeclass/Guard.mjs +0 -4
- package/_mjs/typeclass/Guard.mjs.map +0 -1
- package/_mjs/typeclass/Hash.mjs.map +0 -1
- package/_mjs/typeclass/HashEq.mjs +0 -33
- package/_mjs/typeclass/HashEq.mjs.map +0 -1
- package/_mjs/typeclass/Hashable/definition.mjs.map +0 -1
- package/_mjs/typeclass/Hashable/hash.mjs.map +0 -1
- package/_mjs/typeclass/Hashable.mjs.map +0 -1
- package/_mjs/typeclass/Ord/api/contramap.mjs +0 -10
- package/_mjs/typeclass/Ord/api/contramap.mjs.map +0 -1
- package/_mjs/typeclass/Ord/api/max.mjs +0 -8
- package/_mjs/typeclass/Ord/api/max.mjs.map +0 -1
- package/_mjs/typeclass/Ord/api/min.mjs +0 -8
- package/_mjs/typeclass/Ord/api/min.mjs.map +0 -1
- package/_mjs/typeclass/Ord/api.mjs.map +0 -1
- package/_mjs/typeclass/Ord/definition.mjs +0 -13
- package/_mjs/typeclass/Ord/definition.mjs.map +0 -1
- package/_mjs/typeclass/Ord/instances.mjs +0 -37
- package/_mjs/typeclass/Ord/instances.mjs.map +0 -1
- package/_mjs/typeclass/Ord.mjs.map +0 -1
- package/_mjs/typeclass/Ordering.mjs.map +0 -1
- package/_mjs/typeclass/Showable/definition.mjs.map +0 -1
- package/_mjs/typeclass/Showable/show.mjs.map +0 -1
- package/_mjs/typeclass/Showable/styles.mjs.map +0 -1
- package/_mjs/typeclass/Showable/util.mjs.map +0 -1
- package/_mjs/typeclass/Showable.mjs.map +0 -1
- package/_src/collection/compat/Array/derivations.ts +0 -85
- package/_src/collection/compat/Record/instances.ts +0 -102
- package/_src/collection/compat/Record.ts +0 -3
- package/_src/collection/immutable/Conc/derivations.ts +0 -28
- package/_src/collection/immutable/ImmutableArray/derivations.ts +0 -28
- package/_src/collection/immutable/ImmutableNonEmptyArray/derivations.ts +0 -44
- package/_src/data/Branded/derivations.ts +0 -58
- package/_src/typeclass/Guard/api.ts +0 -32
- package/_src/typeclass/Guard/derivations.ts +0 -81
- package/_src/typeclass/Guard.ts +0 -4
- package/_src/typeclass/Ord/api/contramap.ts +0 -11
- package/_src/typeclass/Ord/api/max.ts +0 -9
- package/_src/typeclass/Ord/api/min.ts +0 -9
- package/collection/compat/Array/derivations.d.ts +0 -24
- package/collection/compat/Record/instances.d.ts +0 -22
- package/collection/compat/Record.d.ts +0 -1
- package/collection/immutable/Conc/derivations.d.ts +0 -14
- package/collection/immutable/ImmutableArray/derivations.d.ts +0 -14
- package/collection/immutable/ImmutableNonEmptyArray/derivations.d.ts +0 -14
- package/data/Branded/derivations.d.ts +0 -24
- package/typeclass/Guard/api.d.ts +0 -20
- package/typeclass/Guard/derivations.d.ts +0 -36
- package/typeclass/Ord/api/contramap.d.ts +0 -6
- package/typeclass/Ord/api/max.d.ts +0 -7
- package/typeclass/Ord/api/min.d.ts +0 -7
- package/typeclass/Ord/definition.d.ts +0 -19
- package/typeclass/Showable/definition.d.ts +0 -17
|
@@ -48,13 +48,11 @@ exports.sliceRight = sliceRight;
|
|
|
48
48
|
exports.sliceTreeVector = sliceTreeVector;
|
|
49
49
|
exports.updateNode = updateNode;
|
|
50
50
|
exports.zeroOffset = zeroOffset;
|
|
51
|
-
|
|
52
51
|
/*
|
|
53
52
|
* -------------------------------------------------------------------------------------------------
|
|
54
53
|
* Internal
|
|
55
54
|
* -------------------------------------------------------------------------------------------------
|
|
56
55
|
*/
|
|
57
|
-
|
|
58
56
|
/**
|
|
59
57
|
* @internal
|
|
60
58
|
*/
|
|
@@ -68,51 +66,40 @@ class VectorIterator {
|
|
|
68
66
|
this.idx = direction === 1 ? -1 : l.length;
|
|
69
67
|
this.prefixSize = getPrefixSize(l);
|
|
70
68
|
this.middleSize = l.length - getSuffixSize(l);
|
|
71
|
-
|
|
72
69
|
if (l.root !== undefined) {
|
|
73
70
|
const depth = getDepth(l);
|
|
74
71
|
this.stack = new Array(depth + 1);
|
|
75
72
|
this.indices = new Array(depth + 1);
|
|
76
73
|
let currentNode = l.root.array;
|
|
77
|
-
|
|
78
74
|
for (let i = depth; 0 <= i; --i) {
|
|
79
75
|
this.stack[i] = currentNode;
|
|
80
76
|
const idx = direction === 1 ? 0 : currentNode.length - 1;
|
|
81
77
|
this.indices[i] = idx;
|
|
82
78
|
currentNode = currentNode[idx].array;
|
|
83
79
|
}
|
|
84
|
-
|
|
85
80
|
this.indices[0] -= direction;
|
|
86
81
|
}
|
|
87
82
|
}
|
|
88
|
-
|
|
89
83
|
}
|
|
90
84
|
/**
|
|
91
85
|
* @internal
|
|
92
86
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
87
|
exports.VectorIterator = VectorIterator;
|
|
96
|
-
|
|
97
88
|
class ForwardVectorIterator extends VectorIterator {
|
|
98
89
|
constructor(l) {
|
|
99
90
|
super(l, 1);
|
|
100
91
|
}
|
|
101
|
-
|
|
102
92
|
nextInTree() {
|
|
103
93
|
for (var i = 0; ++this.indices[i] === this.stack[i].length; ++i) {
|
|
104
94
|
this.indices[i] = 0;
|
|
105
95
|
}
|
|
106
|
-
|
|
107
96
|
for (; 0 < i; --i) {
|
|
108
97
|
this.stack[i - 1] = this.stack[i][this.indices[i]].array;
|
|
109
98
|
}
|
|
110
99
|
}
|
|
111
|
-
|
|
112
100
|
next() {
|
|
113
101
|
let newVal;
|
|
114
102
|
const idx = ++this.idx;
|
|
115
|
-
|
|
116
103
|
if (idx < this.prefixSize) {
|
|
117
104
|
newVal = this.l.prefix[this.prefixSize - idx - 1];
|
|
118
105
|
} else if (idx < this.middleSize) {
|
|
@@ -123,41 +110,32 @@ class ForwardVectorIterator extends VectorIterator {
|
|
|
123
110
|
} else {
|
|
124
111
|
this.result.done = true;
|
|
125
112
|
}
|
|
126
|
-
|
|
127
113
|
this.result.value = newVal;
|
|
128
114
|
return this.result;
|
|
129
115
|
}
|
|
130
|
-
|
|
131
116
|
}
|
|
132
117
|
/**
|
|
133
118
|
* @internal
|
|
134
119
|
*/
|
|
135
|
-
|
|
136
|
-
|
|
137
120
|
exports.ForwardVectorIterator = ForwardVectorIterator;
|
|
138
|
-
|
|
139
121
|
class BackwardVectorIterator extends VectorIterator {
|
|
140
122
|
constructor(l) {
|
|
141
123
|
super(l, -1);
|
|
142
124
|
}
|
|
143
|
-
|
|
144
125
|
prevInTree() {
|
|
145
|
-
for (var i = 0; this.indices[i] === 0; ++i) {
|
|
126
|
+
for (var i = 0; this.indices[i] === 0; ++i) {
|
|
127
|
+
//
|
|
146
128
|
}
|
|
147
|
-
|
|
148
129
|
--this.indices[i];
|
|
149
|
-
|
|
150
130
|
for (; 0 < i; --i) {
|
|
151
131
|
const n = this.stack[i][this.indices[i]].array;
|
|
152
132
|
this.stack[i - 1] = n;
|
|
153
133
|
this.indices[i - 1] = n.length - 1;
|
|
154
134
|
}
|
|
155
135
|
}
|
|
156
|
-
|
|
157
136
|
next() {
|
|
158
137
|
let newVal;
|
|
159
138
|
const idx = --this.idx;
|
|
160
|
-
|
|
161
139
|
if (this.middleSize <= idx) {
|
|
162
140
|
newVal = this.l.suffix[idx - this.middleSize];
|
|
163
141
|
} else if (this.prefixSize <= idx) {
|
|
@@ -168,85 +146,63 @@ class BackwardVectorIterator extends VectorIterator {
|
|
|
168
146
|
} else {
|
|
169
147
|
this.result.done = true;
|
|
170
148
|
}
|
|
171
|
-
|
|
172
149
|
this.result.value = newVal;
|
|
173
150
|
return this.result;
|
|
174
151
|
}
|
|
175
|
-
|
|
176
152
|
}
|
|
177
153
|
/**
|
|
178
154
|
* @internal
|
|
179
155
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
182
156
|
exports.BackwardVectorIterator = BackwardVectorIterator;
|
|
183
157
|
const branchingFactor = 32;
|
|
184
158
|
/**
|
|
185
159
|
* @internal
|
|
186
160
|
*/
|
|
187
|
-
|
|
188
161
|
const branchBits = 5;
|
|
189
162
|
/**
|
|
190
163
|
* @internal
|
|
191
164
|
*/
|
|
192
|
-
|
|
193
165
|
exports.branchBits = branchBits;
|
|
194
166
|
const mask = 31;
|
|
195
167
|
/** @internal */
|
|
196
|
-
|
|
197
168
|
exports.mask = mask;
|
|
198
|
-
|
|
199
169
|
class Node {
|
|
200
170
|
constructor(sizes, array) {
|
|
201
171
|
this.sizes = sizes;
|
|
202
172
|
this.array = array;
|
|
203
173
|
}
|
|
204
|
-
|
|
205
174
|
}
|
|
206
175
|
/**
|
|
207
176
|
* @internal
|
|
208
177
|
*/
|
|
209
|
-
|
|
210
|
-
|
|
211
178
|
exports.Node = Node;
|
|
212
|
-
|
|
213
179
|
function elementEquals(a, b) {
|
|
214
180
|
return a === b;
|
|
215
181
|
}
|
|
216
182
|
/**
|
|
217
183
|
* @internal
|
|
218
184
|
*/
|
|
219
|
-
|
|
220
|
-
|
|
221
185
|
function createPath(depth, value) {
|
|
222
186
|
let current = value;
|
|
223
|
-
|
|
224
187
|
for (let i = 0; i < depth; ++i) {
|
|
225
188
|
current = new Node(undefined, [current]);
|
|
226
189
|
}
|
|
227
|
-
|
|
228
190
|
return current;
|
|
229
|
-
}
|
|
230
|
-
|
|
191
|
+
}
|
|
192
|
+
// Array Helpers
|
|
231
193
|
/**
|
|
232
194
|
* @internal
|
|
233
195
|
*/
|
|
234
|
-
|
|
235
|
-
|
|
236
196
|
function copyArray(source) {
|
|
237
197
|
const array = [];
|
|
238
|
-
|
|
239
198
|
for (let i = 0; i < source.length; ++i) {
|
|
240
199
|
array[i] = source[i];
|
|
241
200
|
}
|
|
242
|
-
|
|
243
201
|
return array;
|
|
244
202
|
}
|
|
245
203
|
/**
|
|
246
204
|
* @internal
|
|
247
205
|
*/
|
|
248
|
-
|
|
249
|
-
|
|
250
206
|
function pushElements(source, target, offset, amount) {
|
|
251
207
|
for (let i = offset; i < offset + amount; ++i) {
|
|
252
208
|
target.push(source[i]);
|
|
@@ -255,8 +211,6 @@ function pushElements(source, target, offset, amount) {
|
|
|
255
211
|
/**
|
|
256
212
|
* @internal
|
|
257
213
|
*/
|
|
258
|
-
|
|
259
|
-
|
|
260
214
|
function copyIndices(source, sourceStart, target, targetStart, length) {
|
|
261
215
|
for (let i = 0; i < length; ++i) {
|
|
262
216
|
target[targetStart + i] = source[sourceStart + i];
|
|
@@ -265,45 +219,34 @@ function copyIndices(source, sourceStart, target, targetStart, length) {
|
|
|
265
219
|
/**
|
|
266
220
|
* @internal
|
|
267
221
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
222
|
function arrayPrepend(value, array) {
|
|
271
223
|
const newLength = array.length + 1;
|
|
272
224
|
const result = new Array(newLength);
|
|
273
225
|
result[0] = value;
|
|
274
|
-
|
|
275
226
|
for (let i = 1; i < newLength; ++i) {
|
|
276
227
|
result[i] = array[i - 1];
|
|
277
228
|
}
|
|
278
|
-
|
|
279
229
|
return result;
|
|
280
230
|
}
|
|
281
231
|
/**
|
|
282
232
|
* Create a reverse _copy_ of an array.
|
|
283
233
|
* @internal
|
|
284
234
|
*/
|
|
285
|
-
|
|
286
|
-
|
|
287
235
|
function reverseArray(array) {
|
|
288
236
|
return array.slice().reverse();
|
|
289
237
|
}
|
|
290
238
|
/**
|
|
291
239
|
* @internal
|
|
292
240
|
*/
|
|
293
|
-
|
|
294
|
-
|
|
295
241
|
function arrayFirst(array) {
|
|
296
242
|
return array[0];
|
|
297
243
|
}
|
|
298
244
|
/**
|
|
299
245
|
* @internal
|
|
300
246
|
*/
|
|
301
|
-
|
|
302
|
-
|
|
303
247
|
function arrayLast(array) {
|
|
304
248
|
return array[array.length - 1];
|
|
305
249
|
}
|
|
306
|
-
|
|
307
250
|
const pathResult = {
|
|
308
251
|
path: 0,
|
|
309
252
|
index: 0,
|
|
@@ -312,27 +255,21 @@ const pathResult = {
|
|
|
312
255
|
/**
|
|
313
256
|
* @internal
|
|
314
257
|
*/
|
|
315
|
-
|
|
316
258
|
function getPath(index, offset, depth, sizes) {
|
|
317
259
|
let i = index;
|
|
318
|
-
|
|
319
260
|
if (sizes === undefined && offset !== 0) {
|
|
320
261
|
pathResult.updatedOffset = 0;
|
|
321
262
|
i = handleOffset(depth, offset, i);
|
|
322
263
|
}
|
|
323
|
-
|
|
324
264
|
let path = i >> depth * branchBits & mask;
|
|
325
|
-
|
|
326
265
|
if (sizes !== undefined) {
|
|
327
266
|
while (sizes[path] <= i) {
|
|
328
267
|
path++;
|
|
329
268
|
}
|
|
330
|
-
|
|
331
269
|
const traversed = path === 0 ? 0 : sizes[path - 1];
|
|
332
270
|
i -= traversed;
|
|
333
271
|
pathResult.updatedOffset = offset;
|
|
334
272
|
}
|
|
335
|
-
|
|
336
273
|
pathResult.path = path;
|
|
337
274
|
pathResult.index = i;
|
|
338
275
|
return pathResult;
|
|
@@ -340,8 +277,6 @@ function getPath(index, offset, depth, sizes) {
|
|
|
340
277
|
/**
|
|
341
278
|
* @internal
|
|
342
279
|
*/
|
|
343
|
-
|
|
344
|
-
|
|
345
280
|
function updateNode(node, depth, index, offset, value) {
|
|
346
281
|
const {
|
|
347
282
|
path,
|
|
@@ -355,216 +290,175 @@ function updateNode(node, depth, index, offset, value) {
|
|
|
355
290
|
/**
|
|
356
291
|
* @internal
|
|
357
292
|
*/
|
|
358
|
-
|
|
359
|
-
|
|
360
293
|
function cloneNode({
|
|
361
294
|
sizes,
|
|
362
295
|
array
|
|
363
296
|
}) {
|
|
364
297
|
return new Node(sizes === undefined ? undefined : copyArray(sizes), copyArray(array));
|
|
365
|
-
}
|
|
298
|
+
}
|
|
299
|
+
// This array should not be mutated. Thus a dummy element is placed in
|
|
366
300
|
// it. Thus the affix will not be owned and thus not mutated.
|
|
367
|
-
|
|
368
301
|
/**
|
|
369
302
|
* @internal
|
|
370
303
|
*/
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
const emptyAffix = [0]; // We store a bit field in Vector. From right to left, the first five
|
|
304
|
+
const emptyAffix = [0];
|
|
305
|
+
// We store a bit field in Vector. From right to left, the first five
|
|
374
306
|
// bits are suffix length, the next five are prefix length and the
|
|
375
307
|
// rest is depth. The functions below are for working with the bits in
|
|
376
308
|
// a sane way.
|
|
377
|
-
|
|
378
309
|
/**
|
|
379
310
|
* @internal
|
|
380
311
|
*/
|
|
381
|
-
|
|
382
312
|
exports.emptyAffix = emptyAffix;
|
|
383
313
|
const affixBits = 6;
|
|
384
314
|
/**
|
|
385
315
|
* @internal
|
|
386
316
|
*/
|
|
387
|
-
|
|
388
317
|
const affixMask = 0b111111;
|
|
389
318
|
/**
|
|
390
319
|
* @internal
|
|
391
320
|
*/
|
|
392
|
-
|
|
393
321
|
function getSuffixSize(l) {
|
|
394
322
|
return l.bits & affixMask;
|
|
395
323
|
}
|
|
396
324
|
/**
|
|
397
325
|
* @internal
|
|
398
326
|
*/
|
|
399
|
-
|
|
400
|
-
|
|
401
327
|
function getPrefixSize(l) {
|
|
402
328
|
return l.bits >> affixBits & affixMask;
|
|
403
329
|
}
|
|
404
330
|
/**
|
|
405
331
|
* @internal
|
|
406
332
|
*/
|
|
407
|
-
|
|
408
|
-
|
|
409
333
|
function getDepth(l) {
|
|
410
334
|
return l.bits >> affixBits * 2;
|
|
411
335
|
}
|
|
412
336
|
/**
|
|
413
337
|
* @internal
|
|
414
338
|
*/
|
|
415
|
-
|
|
416
|
-
|
|
417
339
|
function setPrefix(size, bits) {
|
|
418
340
|
return size << affixBits | bits & ~(affixMask << affixBits);
|
|
419
341
|
}
|
|
420
342
|
/**
|
|
421
343
|
* @internal
|
|
422
344
|
*/
|
|
423
|
-
|
|
424
|
-
|
|
425
345
|
function setSuffix(size, bits) {
|
|
426
346
|
return size | bits & ~affixMask;
|
|
427
347
|
}
|
|
428
348
|
/**
|
|
429
349
|
* @internal
|
|
430
350
|
*/
|
|
431
|
-
|
|
432
|
-
|
|
433
351
|
function setDepth(depth, bits) {
|
|
434
352
|
return depth << affixBits * 2 | bits & (affixMask | affixMask << affixBits);
|
|
435
353
|
}
|
|
436
354
|
/**
|
|
437
355
|
* @internal
|
|
438
356
|
*/
|
|
439
|
-
|
|
440
|
-
|
|
441
357
|
function incrementPrefix(bits) {
|
|
442
358
|
return bits + (1 << affixBits);
|
|
443
359
|
}
|
|
444
360
|
/**
|
|
445
361
|
* @internal
|
|
446
362
|
*/
|
|
447
|
-
|
|
448
|
-
|
|
449
363
|
function incrementSuffix(bits) {
|
|
450
364
|
return bits + 1;
|
|
451
365
|
}
|
|
452
366
|
/**
|
|
453
367
|
* @internal
|
|
454
368
|
*/
|
|
455
|
-
|
|
456
|
-
|
|
457
369
|
function incrementDepth(bits) {
|
|
458
370
|
return bits + (1 << affixBits * 2);
|
|
459
371
|
}
|
|
460
372
|
/**
|
|
461
373
|
* @internal
|
|
462
374
|
*/
|
|
463
|
-
|
|
464
|
-
|
|
465
375
|
function decrementDepth(bits) {
|
|
466
376
|
return bits - (1 << affixBits * 2);
|
|
467
377
|
}
|
|
468
378
|
/**
|
|
469
379
|
* Appends the value to the Vector by _mutating_ the Vector and its content.
|
|
470
380
|
*
|
|
471
|
-
* @tsplus
|
|
381
|
+
* @tsplus pipeable fncts.MutableVector push
|
|
472
382
|
*/
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
} else {
|
|
503
|
-
current.array.push(createPath(depth - 1, newNode));
|
|
504
|
-
break;
|
|
383
|
+
function push(value) {
|
|
384
|
+
return l => {
|
|
385
|
+
const suffixSize = getSuffixSize(l);
|
|
386
|
+
if (l.length === 0) {
|
|
387
|
+
l.bits = setPrefix(1, l.bits);
|
|
388
|
+
l.prefix = [value];
|
|
389
|
+
} else if (suffixSize < 32) {
|
|
390
|
+
l.bits = incrementSuffix(l.bits);
|
|
391
|
+
l.suffix.push(value);
|
|
392
|
+
} else if (l.root === undefined) {
|
|
393
|
+
l.root = new Node(undefined, l.suffix);
|
|
394
|
+
l.suffix = [value];
|
|
395
|
+
l.bits = setSuffix(1, l.bits);
|
|
396
|
+
} else {
|
|
397
|
+
const newNode = new Node(undefined, l.suffix);
|
|
398
|
+
const index = l.length - 1 - 32 + 1;
|
|
399
|
+
let current = l.root;
|
|
400
|
+
let depth = getDepth(l);
|
|
401
|
+
l.suffix = [value];
|
|
402
|
+
l.bits = setSuffix(1, l.bits);
|
|
403
|
+
if (index - 1 < branchingFactor ** (depth + 1)) {
|
|
404
|
+
for (; depth >= 0; --depth) {
|
|
405
|
+
const path = index >> depth * branchBits & mask;
|
|
406
|
+
if (path < current.array.length) {
|
|
407
|
+
current = current.array[path];
|
|
408
|
+
} else {
|
|
409
|
+
current.array.push(createPath(depth - 1, newNode));
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
505
412
|
}
|
|
413
|
+
} else {
|
|
414
|
+
l.bits = incrementDepth(l.bits);
|
|
415
|
+
l.root = new Node(undefined, [l.root, createPath(depth, newNode)]);
|
|
506
416
|
}
|
|
507
|
-
} else {
|
|
508
|
-
l.bits = incrementDepth(l.bits);
|
|
509
|
-
l.root = new Node(undefined, [l.root, createPath(depth, newNode)]);
|
|
510
417
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
return l;
|
|
418
|
+
l.length++;
|
|
419
|
+
return l;
|
|
420
|
+
};
|
|
515
421
|
}
|
|
516
422
|
/**
|
|
517
423
|
* @internal
|
|
518
424
|
*/
|
|
519
|
-
|
|
520
|
-
|
|
521
425
|
function nodeNthDense(node, depth, index) {
|
|
522
|
-
let current = node;
|
|
523
|
-
|
|
426
|
+
let current = node;
|
|
427
|
+
// eslint-disable-next-line no-param-reassign
|
|
524
428
|
for (; depth >= 0; --depth) {
|
|
525
429
|
current = current.array[index >> depth * branchBits & mask];
|
|
526
430
|
}
|
|
527
|
-
|
|
528
431
|
return current;
|
|
529
432
|
}
|
|
530
433
|
/**
|
|
531
434
|
* @internal
|
|
532
435
|
*/
|
|
533
|
-
|
|
534
|
-
|
|
535
436
|
function handleOffset(depth, offset, index) {
|
|
536
437
|
let i = index;
|
|
537
|
-
i += offset;
|
|
538
|
-
|
|
438
|
+
i += offset;
|
|
439
|
+
// eslint-disable-next-line no-param-reassign
|
|
539
440
|
for (; depth >= 0; --depth) {
|
|
540
441
|
i = index - (offset & mask << depth * branchBits);
|
|
541
|
-
|
|
542
442
|
if ((index >> depth * branchBits & mask) !== 0) {
|
|
543
443
|
break;
|
|
544
444
|
}
|
|
545
445
|
}
|
|
546
|
-
|
|
547
446
|
return i;
|
|
548
447
|
}
|
|
549
448
|
/**
|
|
550
449
|
* @internal
|
|
551
450
|
*/
|
|
552
|
-
|
|
553
|
-
|
|
554
451
|
function nodeNth(node, depth, offset, index) {
|
|
555
452
|
let path;
|
|
556
453
|
let current = node;
|
|
557
454
|
let i = index;
|
|
558
455
|
let ofs = offset;
|
|
559
456
|
let dep = depth;
|
|
560
|
-
|
|
561
457
|
while (current.sizes !== undefined) {
|
|
562
458
|
path = i >> dep * branchBits & mask;
|
|
563
|
-
|
|
564
459
|
while (current.sizes[path] <= i) {
|
|
565
460
|
path++;
|
|
566
461
|
}
|
|
567
|
-
|
|
568
462
|
if (path !== 0) {
|
|
569
463
|
i -= current.sizes[path - 1];
|
|
570
464
|
ofs = 0; // Offset is discarded if the left spine isn't traversed
|
|
@@ -573,23 +467,18 @@ function nodeNth(node, depth, offset, index) {
|
|
|
573
467
|
dep--;
|
|
574
468
|
current = current.array[path];
|
|
575
469
|
}
|
|
576
|
-
|
|
577
470
|
return nodeNthDense(current, dep, ofs === 0 ? i : handleOffset(dep, ofs, i));
|
|
578
471
|
}
|
|
579
472
|
/**
|
|
580
473
|
* @internal
|
|
581
474
|
*/
|
|
582
|
-
|
|
583
|
-
|
|
584
475
|
function setSizes(node, height) {
|
|
585
476
|
let sum = 0;
|
|
586
477
|
const sizeTable = [];
|
|
587
|
-
|
|
588
478
|
for (let i = 0; i < node.array.length; ++i) {
|
|
589
479
|
sum += sizeOfSubtree(node.array[i], height - 1);
|
|
590
480
|
sizeTable[i] = sum;
|
|
591
481
|
}
|
|
592
|
-
|
|
593
482
|
node.sizes = sizeTable;
|
|
594
483
|
return node;
|
|
595
484
|
}
|
|
@@ -598,8 +487,6 @@ function setSizes(node, height) {
|
|
|
598
487
|
*
|
|
599
488
|
* @internal
|
|
600
489
|
*/
|
|
601
|
-
|
|
602
|
-
|
|
603
490
|
function sizeOfSubtree(node, height) {
|
|
604
491
|
if (height !== 0) {
|
|
605
492
|
if (node.sizes !== undefined) {
|
|
@@ -612,13 +499,11 @@ function sizeOfSubtree(node, height) {
|
|
|
612
499
|
} else {
|
|
613
500
|
return node.array.length;
|
|
614
501
|
}
|
|
615
|
-
}
|
|
616
|
-
|
|
502
|
+
}
|
|
503
|
+
// prepend & append
|
|
617
504
|
/**
|
|
618
505
|
* @internal
|
|
619
506
|
*/
|
|
620
|
-
|
|
621
|
-
|
|
622
507
|
function affixPush(a, array, length) {
|
|
623
508
|
if (array.length === length) {
|
|
624
509
|
array.push(a);
|
|
@@ -636,28 +521,21 @@ function affixPush(a, array, length) {
|
|
|
636
521
|
*
|
|
637
522
|
* @internal
|
|
638
523
|
*/
|
|
639
|
-
|
|
640
|
-
|
|
641
524
|
function copyLeft(l, k) {
|
|
642
525
|
let currentNode = cloneNode(l.root); // copy root
|
|
643
|
-
|
|
644
526
|
l.root = currentNode; // install copy of root
|
|
645
|
-
|
|
646
527
|
for (let i = 1; i < k; ++i) {
|
|
647
528
|
const index = 0; // go left
|
|
648
|
-
|
|
649
529
|
if (currentNode.sizes !== undefined) {
|
|
650
530
|
for (let i = 0; i < currentNode.sizes.length; ++i) {
|
|
651
531
|
currentNode.sizes[i] += 32;
|
|
652
532
|
}
|
|
653
533
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
534
|
+
const newNode = cloneNode(currentNode.array[index]);
|
|
535
|
+
// Install the copied node
|
|
657
536
|
currentNode.array[index] = newNode;
|
|
658
537
|
currentNode = newNode;
|
|
659
538
|
}
|
|
660
|
-
|
|
661
539
|
return currentNode;
|
|
662
540
|
}
|
|
663
541
|
/**
|
|
@@ -665,21 +543,16 @@ function copyLeft(l, k) {
|
|
|
665
543
|
*
|
|
666
544
|
* @internal
|
|
667
545
|
*/
|
|
668
|
-
|
|
669
|
-
|
|
670
546
|
function nodePrepend(value, size, node) {
|
|
671
547
|
const array = arrayPrepend(value, node.array);
|
|
672
548
|
let sizes = undefined;
|
|
673
|
-
|
|
674
549
|
if (node.sizes !== undefined) {
|
|
675
550
|
sizes = new Array(node.sizes.length + 1);
|
|
676
551
|
sizes[0] = size;
|
|
677
|
-
|
|
678
552
|
for (let i = 0; i < node.sizes.length; ++i) {
|
|
679
553
|
sizes[i + 1] = node.sizes[i] + size;
|
|
680
554
|
}
|
|
681
555
|
}
|
|
682
|
-
|
|
683
556
|
return new Node(sizes, array);
|
|
684
557
|
}
|
|
685
558
|
/**
|
|
@@ -688,11 +561,8 @@ function nodePrepend(value, size, node) {
|
|
|
688
561
|
*
|
|
689
562
|
* @internal
|
|
690
563
|
*/
|
|
691
|
-
|
|
692
|
-
|
|
693
564
|
function prependTopTree(l, depth, node) {
|
|
694
565
|
let newOffset;
|
|
695
|
-
|
|
696
566
|
if (l.root.array.length < branchingFactor) {
|
|
697
567
|
// There is space in the root, there is never a size table in this
|
|
698
568
|
// case
|
|
@@ -705,7 +575,6 @@ function prependTopTree(l, depth, node) {
|
|
|
705
575
|
newOffset = depth === 0 ? 0 : 32 ** (depth + 1) - 32;
|
|
706
576
|
l.root = new Node(sizes, [createPath(depth, node), l.root]);
|
|
707
577
|
}
|
|
708
|
-
|
|
709
578
|
return newOffset;
|
|
710
579
|
}
|
|
711
580
|
/**
|
|
@@ -714,8 +583,6 @@ function prependTopTree(l, depth, node) {
|
|
|
714
583
|
*
|
|
715
584
|
* @internal
|
|
716
585
|
*/
|
|
717
|
-
|
|
718
|
-
|
|
719
586
|
function prependNodeToTree(l, array) {
|
|
720
587
|
if (l.root === undefined) {
|
|
721
588
|
if (getSuffixSize(l) === 0) {
|
|
@@ -725,13 +592,11 @@ function prependNodeToTree(l, array) {
|
|
|
725
592
|
} else {
|
|
726
593
|
l.root = new Node(undefined, array);
|
|
727
594
|
}
|
|
728
|
-
|
|
729
595
|
return l;
|
|
730
596
|
} else {
|
|
731
597
|
const node = new Node(undefined, array);
|
|
732
598
|
const depth = getDepth(l);
|
|
733
599
|
let newOffset = 0;
|
|
734
|
-
|
|
735
600
|
if (l.root.sizes === undefined) {
|
|
736
601
|
if (l.offset !== 0) {
|
|
737
602
|
newOffset = l.offset - branchingFactor;
|
|
@@ -743,30 +608,24 @@ function prependNodeToTree(l, array) {
|
|
|
743
608
|
}
|
|
744
609
|
} else {
|
|
745
610
|
// represents how many nodes _with size-tables_ that we should copy.
|
|
746
|
-
let copyableCount = 0;
|
|
747
|
-
|
|
611
|
+
let copyableCount = 0;
|
|
612
|
+
// go down while there is size tables
|
|
748
613
|
let nodesTraversed = 0;
|
|
749
614
|
let currentNode = l.root;
|
|
750
|
-
|
|
751
615
|
while (currentNode.sizes !== undefined && nodesTraversed < depth) {
|
|
752
616
|
++nodesTraversed;
|
|
753
|
-
|
|
754
617
|
if (currentNode.array.length < 32) {
|
|
755
618
|
// there is room if offset is > 0 or if the first node does not
|
|
756
619
|
// contain as many nodes as it possibly can
|
|
757
620
|
copyableCount = nodesTraversed;
|
|
758
621
|
}
|
|
759
|
-
|
|
760
622
|
currentNode = currentNode.array[0];
|
|
761
623
|
}
|
|
762
|
-
|
|
763
624
|
if (l.offset !== 0) {
|
|
764
625
|
const copiedNode = copyLeft(l, nodesTraversed);
|
|
765
|
-
|
|
766
626
|
for (let i = 0; i < copiedNode.sizes.length; ++i) {
|
|
767
627
|
copiedNode.sizes[i] += branchingFactor;
|
|
768
628
|
}
|
|
769
|
-
|
|
770
629
|
copiedNode.array[0] = prependDense(copiedNode.array[0], depth - nodesTraversed, l.offset, node);
|
|
771
630
|
l.offset = l.offset - branchingFactor;
|
|
772
631
|
return l;
|
|
@@ -775,8 +634,8 @@ function prependNodeToTree(l, array) {
|
|
|
775
634
|
l.offset = prependTopTree(l, depth, node);
|
|
776
635
|
} else {
|
|
777
636
|
let parent;
|
|
778
|
-
let prependableNode;
|
|
779
|
-
|
|
637
|
+
let prependableNode;
|
|
638
|
+
// Copy the part of the path with size tables
|
|
780
639
|
if (copyableCount > 1) {
|
|
781
640
|
parent = copyLeft(l, copyableCount - 1);
|
|
782
641
|
prependableNode = parent.array[0];
|
|
@@ -784,23 +643,19 @@ function prependNodeToTree(l, array) {
|
|
|
784
643
|
parent = undefined;
|
|
785
644
|
prependableNode = l.root;
|
|
786
645
|
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
646
|
+
const path = createPath(depth - copyableCount, node);
|
|
647
|
+
// add offset
|
|
790
648
|
l.offset = 32 ** (depth - copyableCount + 1) - 32;
|
|
791
649
|
const prepended = nodePrepend(path, 32, prependableNode);
|
|
792
|
-
|
|
793
650
|
if (parent === undefined) {
|
|
794
651
|
l.root = prepended;
|
|
795
652
|
} else {
|
|
796
653
|
parent.array[0] = prepended;
|
|
797
654
|
}
|
|
798
655
|
}
|
|
799
|
-
|
|
800
656
|
return l;
|
|
801
657
|
}
|
|
802
658
|
}
|
|
803
|
-
|
|
804
659
|
l.offset = newOffset;
|
|
805
660
|
return l;
|
|
806
661
|
}
|
|
@@ -810,13 +665,10 @@ function prependNodeToTree(l, array) {
|
|
|
810
665
|
*
|
|
811
666
|
* @internal
|
|
812
667
|
*/
|
|
813
|
-
|
|
814
|
-
|
|
815
668
|
function prependDense(node, depth, offset, value) {
|
|
816
669
|
// We're indexing down `offset - 1`. At each step `path` is either 0 or -1.
|
|
817
670
|
const curOffset = offset >> depth * branchBits & mask;
|
|
818
671
|
const path = (offset - 1 >> depth * branchBits & mask) - curOffset;
|
|
819
|
-
|
|
820
672
|
if (path < 0) {
|
|
821
673
|
return new Node(undefined, arrayPrepend(createPath(depth - 1, value), node.array));
|
|
822
674
|
} else {
|
|
@@ -831,8 +683,6 @@ function prependDense(node, depth, offset, value) {
|
|
|
831
683
|
*
|
|
832
684
|
* @internal
|
|
833
685
|
*/
|
|
834
|
-
|
|
835
|
-
|
|
836
686
|
function appendNodeToTree(l, array) {
|
|
837
687
|
if (l.root === undefined) {
|
|
838
688
|
// The old Vector has no content in tree, all content is in affixes
|
|
@@ -842,26 +692,20 @@ function appendNodeToTree(l, array) {
|
|
|
842
692
|
} else {
|
|
843
693
|
l.root = new Node(undefined, array);
|
|
844
694
|
}
|
|
845
|
-
|
|
846
695
|
return l;
|
|
847
696
|
}
|
|
848
|
-
|
|
849
697
|
const depth = getDepth(l);
|
|
850
698
|
let index = handleOffset(depth, l.offset, l.length - 1 - getPrefixSize(l));
|
|
851
699
|
let nodesToCopy = 0;
|
|
852
700
|
let nodesVisited = 0;
|
|
853
701
|
let shift = depth * 5;
|
|
854
702
|
let currentNode = l.root;
|
|
855
|
-
|
|
856
703
|
if (32 ** (depth + 1) < index) {
|
|
857
704
|
shift = 0; // there is no room
|
|
858
|
-
|
|
859
705
|
nodesVisited = depth;
|
|
860
706
|
}
|
|
861
|
-
|
|
862
707
|
while (shift > 5) {
|
|
863
708
|
let childIndex;
|
|
864
|
-
|
|
865
709
|
if (currentNode.sizes === undefined) {
|
|
866
710
|
// does not have size table
|
|
867
711
|
childIndex = index >> shift & mask;
|
|
@@ -870,17 +714,13 @@ function appendNodeToTree(l, array) {
|
|
|
870
714
|
childIndex = currentNode.array.length - 1;
|
|
871
715
|
index -= currentNode.sizes[childIndex - 1];
|
|
872
716
|
}
|
|
873
|
-
|
|
874
717
|
nodesVisited++;
|
|
875
|
-
|
|
876
718
|
if (childIndex < mask) {
|
|
877
719
|
// we are not going down the far right path, this implies that
|
|
878
720
|
// there is still room in the current node
|
|
879
721
|
nodesToCopy = nodesVisited;
|
|
880
722
|
}
|
|
881
|
-
|
|
882
723
|
currentNode = currentNode.array[childIndex];
|
|
883
|
-
|
|
884
724
|
if (currentNode === undefined) {
|
|
885
725
|
// This will only happened in a pvec subtree. The index does not
|
|
886
726
|
// exist so we'll have to create a new path from here on.
|
|
@@ -890,18 +730,14 @@ function appendNodeToTree(l, array) {
|
|
|
890
730
|
|
|
891
731
|
shift -= 5;
|
|
892
732
|
}
|
|
893
|
-
|
|
894
733
|
if (shift !== 0) {
|
|
895
734
|
nodesVisited++;
|
|
896
|
-
|
|
897
735
|
if (currentNode.array.length < branchingFactor) {
|
|
898
736
|
// there is room in the found node
|
|
899
737
|
nodesToCopy = nodesVisited;
|
|
900
738
|
}
|
|
901
739
|
}
|
|
902
|
-
|
|
903
740
|
const node = new Node(undefined, array);
|
|
904
|
-
|
|
905
741
|
if (nodesToCopy === 0) {
|
|
906
742
|
// there was no room in the found node
|
|
907
743
|
const newPath = nodesVisited === 0 ? node : createPath(nodesVisited, node);
|
|
@@ -912,7 +748,6 @@ function appendNodeToTree(l, array) {
|
|
|
912
748
|
const copiedNode = copyFirstK(l, nodesToCopy, array.length);
|
|
913
749
|
copiedNode.array.push(createPath(depth - nodesToCopy, node));
|
|
914
750
|
}
|
|
915
|
-
|
|
916
751
|
return l;
|
|
917
752
|
}
|
|
918
753
|
/**
|
|
@@ -920,52 +755,38 @@ function appendNodeToTree(l, array) {
|
|
|
920
755
|
*
|
|
921
756
|
* @internal
|
|
922
757
|
*/
|
|
923
|
-
|
|
924
|
-
|
|
925
758
|
function copyFirstK(newVector, k, leafSize) {
|
|
926
759
|
let currentNode = cloneNode(newVector.root); // copy root
|
|
927
|
-
|
|
928
760
|
newVector.root = currentNode; // install root
|
|
929
|
-
|
|
930
761
|
for (let i = 1; i < k; ++i) {
|
|
931
762
|
const index = currentNode.array.length - 1;
|
|
932
|
-
|
|
933
763
|
if (currentNode.sizes !== undefined) {
|
|
934
764
|
currentNode.sizes[index] += leafSize;
|
|
935
765
|
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
766
|
+
const newNode = cloneNode(currentNode.array[index]);
|
|
767
|
+
// Install the copied node
|
|
939
768
|
currentNode.array[index] = newNode;
|
|
940
769
|
currentNode = newNode;
|
|
941
770
|
}
|
|
942
|
-
|
|
943
771
|
if (currentNode.sizes !== undefined) {
|
|
944
772
|
currentNode.sizes.push(arrayLast(currentNode.sizes) + leafSize);
|
|
945
773
|
}
|
|
946
|
-
|
|
947
774
|
return currentNode;
|
|
948
775
|
}
|
|
949
|
-
|
|
950
776
|
const eMax = 2;
|
|
951
777
|
/**
|
|
952
778
|
* @internal
|
|
953
779
|
*/
|
|
954
|
-
|
|
955
780
|
function createConcatPlan(array) {
|
|
956
781
|
const sizes = [];
|
|
957
782
|
let sum = 0;
|
|
958
|
-
|
|
959
783
|
for (let i = 0; i < array.length; ++i) {
|
|
960
784
|
sum += array[i].array.length; // FIXME: maybe only access array once
|
|
961
|
-
|
|
962
785
|
sizes[i] = array[i].array.length;
|
|
963
786
|
}
|
|
964
|
-
|
|
965
787
|
const optimalLength = Math.ceil(sum / branchingFactor);
|
|
966
788
|
let n = array.length;
|
|
967
789
|
let i = 0;
|
|
968
|
-
|
|
969
790
|
if (optimalLength + eMax >= n) {
|
|
970
791
|
return undefined; // no rebalancing needed
|
|
971
792
|
}
|
|
@@ -974,27 +795,22 @@ function createConcatPlan(array) {
|
|
|
974
795
|
while (sizes[i] > branchingFactor - eMax / 2) {
|
|
975
796
|
// Skip nodes that are already sufficiently balanced
|
|
976
797
|
++i;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
|
|
798
|
+
}
|
|
799
|
+
// the node at this index is too short
|
|
980
800
|
let remaining = sizes[i]; // number of elements to re-distribute
|
|
981
|
-
|
|
982
801
|
do {
|
|
983
802
|
const size = Math.min(remaining + sizes[i + 1], branchingFactor);
|
|
984
803
|
sizes[i] = size;
|
|
985
804
|
remaining = remaining - (size - sizes[i + 1]);
|
|
986
805
|
++i;
|
|
987
|
-
} while (remaining > 0);
|
|
988
|
-
|
|
989
|
-
|
|
806
|
+
} while (remaining > 0);
|
|
807
|
+
// Shift nodes after
|
|
990
808
|
for (let j = i; j <= n - 1; ++j) {
|
|
991
809
|
sizes[j] = sizes[j + 1];
|
|
992
810
|
}
|
|
993
|
-
|
|
994
811
|
--i;
|
|
995
812
|
--n;
|
|
996
813
|
}
|
|
997
|
-
|
|
998
814
|
sizes.length = n;
|
|
999
815
|
return sizes;
|
|
1000
816
|
}
|
|
@@ -1005,55 +821,42 @@ function createConcatPlan(array) {
|
|
|
1005
821
|
*
|
|
1006
822
|
* @internal
|
|
1007
823
|
*/
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
824
|
function concatNodeMerge(left, center, right) {
|
|
1011
825
|
const array = [];
|
|
1012
|
-
|
|
1013
826
|
if (left !== undefined) {
|
|
1014
827
|
for (let i = 0; i < left.array.length - 1; ++i) {
|
|
1015
828
|
array.push(left.array[i]);
|
|
1016
829
|
}
|
|
1017
830
|
}
|
|
1018
|
-
|
|
1019
831
|
for (let i = 0; i < center.array.length; ++i) {
|
|
1020
832
|
array.push(center.array[i]);
|
|
1021
833
|
}
|
|
1022
|
-
|
|
1023
834
|
if (right !== undefined) {
|
|
1024
835
|
for (let i = 1; i < right.array.length; ++i) {
|
|
1025
836
|
array.push(right.array[i]);
|
|
1026
837
|
}
|
|
1027
838
|
}
|
|
1028
|
-
|
|
1029
839
|
return array;
|
|
1030
840
|
}
|
|
1031
841
|
/**
|
|
1032
842
|
* @internal
|
|
1033
843
|
*/
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
844
|
function executeConcatPlan(merged, plan, height) {
|
|
1037
845
|
const result = [];
|
|
1038
846
|
let sourceIdx = 0; // the current node we're copying from
|
|
1039
|
-
|
|
1040
847
|
let offset = 0; // elements in source already used
|
|
1041
|
-
|
|
1042
848
|
for (let toMove of plan) {
|
|
1043
849
|
let source = merged[sourceIdx].array;
|
|
1044
|
-
|
|
1045
850
|
if (toMove === source.length && offset === 0) {
|
|
1046
851
|
// source matches target exactly, reuse source
|
|
1047
852
|
result.push(merged[sourceIdx]);
|
|
1048
853
|
++sourceIdx;
|
|
1049
854
|
} else {
|
|
1050
855
|
const node = new Node(undefined, []);
|
|
1051
|
-
|
|
1052
856
|
while (toMove > 0) {
|
|
1053
857
|
const available = source.length - offset;
|
|
1054
858
|
const itemsToCopy = Math.min(toMove, available);
|
|
1055
859
|
pushElements(source, node.array, offset, itemsToCopy);
|
|
1056
|
-
|
|
1057
860
|
if (toMove >= available) {
|
|
1058
861
|
++sourceIdx;
|
|
1059
862
|
source = merged[sourceIdx].array;
|
|
@@ -1061,19 +864,15 @@ function executeConcatPlan(merged, plan, height) {
|
|
|
1061
864
|
} else {
|
|
1062
865
|
offset += itemsToCopy;
|
|
1063
866
|
}
|
|
1064
|
-
|
|
1065
867
|
toMove -= itemsToCopy;
|
|
1066
868
|
}
|
|
1067
|
-
|
|
1068
869
|
if (height > 1) {
|
|
1069
870
|
// Set sizes on children unless they are leaf nodes
|
|
1070
871
|
setSizes(node, height - 1);
|
|
1071
872
|
}
|
|
1072
|
-
|
|
1073
873
|
result.push(node);
|
|
1074
874
|
}
|
|
1075
875
|
}
|
|
1076
|
-
|
|
1077
876
|
return result;
|
|
1078
877
|
}
|
|
1079
878
|
/**
|
|
@@ -1083,13 +882,10 @@ function executeConcatPlan(merged, plan, height) {
|
|
|
1083
882
|
*
|
|
1084
883
|
* @internal
|
|
1085
884
|
*/
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
885
|
function rebalance(left, center, right, height, top) {
|
|
1089
886
|
const merged = concatNodeMerge(left, center, right);
|
|
1090
887
|
const plan = createConcatPlan(merged);
|
|
1091
888
|
const balanced = plan !== undefined ? executeConcatPlan(merged, plan, height) : merged;
|
|
1092
|
-
|
|
1093
889
|
if (balanced.length <= branchingFactor) {
|
|
1094
890
|
if (top === true) {
|
|
1095
891
|
return new Node(undefined, balanced);
|
|
@@ -1105,8 +901,6 @@ function rebalance(left, center, right, height, top) {
|
|
|
1105
901
|
/**
|
|
1106
902
|
* @internal
|
|
1107
903
|
*/
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
904
|
function concatSubTree(left, lDepth, right, rDepth, isTop) {
|
|
1111
905
|
if (lDepth > rDepth) {
|
|
1112
906
|
const c = concatSubTree(arrayLast(left.array), lDepth - 1, right, rDepth, false);
|
|
@@ -1124,15 +918,11 @@ function concatSubTree(left, lDepth, right, rDepth, isTop) {
|
|
|
1124
918
|
/**
|
|
1125
919
|
* @internal
|
|
1126
920
|
*/
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
921
|
const concatBuffer = /*#__PURE__*/new Array(3);
|
|
1130
922
|
/**
|
|
1131
923
|
* @internal
|
|
1132
924
|
*/
|
|
1133
|
-
|
|
1134
925
|
exports.concatBuffer = concatBuffer;
|
|
1135
|
-
|
|
1136
926
|
function concatAffixes(left, right) {
|
|
1137
927
|
// TODO: Try and find a neat way to reduce the LOC here
|
|
1138
928
|
let nr = 0;
|
|
@@ -1140,42 +930,32 @@ function concatAffixes(left, right) {
|
|
|
1140
930
|
let i = 0;
|
|
1141
931
|
let length = getSuffixSize(left);
|
|
1142
932
|
concatBuffer[nr] = [];
|
|
1143
|
-
|
|
1144
933
|
for (i = 0; i < length; ++i) {
|
|
1145
934
|
concatBuffer[nr][arrIdx++] = left.suffix[i];
|
|
1146
935
|
}
|
|
1147
|
-
|
|
1148
936
|
length = getPrefixSize(right);
|
|
1149
|
-
|
|
1150
937
|
for (i = 0; i < length; ++i) {
|
|
1151
938
|
if (arrIdx === 32) {
|
|
1152
939
|
arrIdx = 0;
|
|
1153
940
|
++nr;
|
|
1154
941
|
concatBuffer[nr] = [];
|
|
1155
942
|
}
|
|
1156
|
-
|
|
1157
943
|
concatBuffer[nr][arrIdx++] = right.prefix[length - 1 - i];
|
|
1158
944
|
}
|
|
1159
|
-
|
|
1160
945
|
length = getSuffixSize(right);
|
|
1161
|
-
|
|
1162
946
|
for (i = 0; i < length; ++i) {
|
|
1163
947
|
if (arrIdx === 32) {
|
|
1164
948
|
arrIdx = 0;
|
|
1165
949
|
++nr;
|
|
1166
950
|
concatBuffer[nr] = [];
|
|
1167
951
|
}
|
|
1168
|
-
|
|
1169
952
|
concatBuffer[nr][arrIdx++] = right.suffix[i];
|
|
1170
953
|
}
|
|
1171
|
-
|
|
1172
954
|
return nr;
|
|
1173
955
|
}
|
|
1174
956
|
/**
|
|
1175
957
|
* @internal
|
|
1176
958
|
*/
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
959
|
function getHeight(node) {
|
|
1180
960
|
if (node.array[0] instanceof Node) {
|
|
1181
961
|
return 1 + getHeight(node.array[0]);
|
|
@@ -1186,31 +966,23 @@ function getHeight(node) {
|
|
|
1186
966
|
/**
|
|
1187
967
|
* @internal
|
|
1188
968
|
*/
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
let newAffix; // function getBitsForDepth(n: number, depth: number): number {
|
|
969
|
+
let newAffix;
|
|
970
|
+
// function getBitsForDepth(n: number, depth: number): number {
|
|
1192
971
|
// return n & ~(~0 << ((depth + 1) * branchBits));
|
|
1193
972
|
// }
|
|
1194
|
-
|
|
1195
973
|
exports.newAffix = newAffix;
|
|
1196
|
-
|
|
1197
974
|
function sliceNode(node, index, depth, pathLeft, pathRight, childLeft, childRight) {
|
|
1198
975
|
const array = node.array.slice(pathLeft, pathRight + 1);
|
|
1199
|
-
|
|
1200
976
|
if (childLeft !== undefined) {
|
|
1201
977
|
array[0] = childLeft;
|
|
1202
978
|
}
|
|
1203
|
-
|
|
1204
979
|
if (childRight !== undefined) {
|
|
1205
980
|
array[array.length - 1] = childRight;
|
|
1206
981
|
}
|
|
1207
|
-
|
|
1208
982
|
let sizes = node.sizes;
|
|
1209
|
-
|
|
1210
983
|
if (sizes !== undefined) {
|
|
1211
984
|
sizes = sizes.slice(pathLeft, pathRight + 1);
|
|
1212
985
|
let slicedOffLeft = pathLeft !== 0 ? node.sizes[pathLeft - 1] : 0;
|
|
1213
|
-
|
|
1214
986
|
if (childLeft !== undefined) {
|
|
1215
987
|
// If the left child has been sliced into a new child we need to know
|
|
1216
988
|
// how many elements have been removed from the child.
|
|
@@ -1229,112 +1001,89 @@ function sliceNode(node, index, depth, pathLeft, pathRight, childLeft, childRigh
|
|
|
1229
1001
|
slicedOffLeft += (index - slicedOffLeft & ~0b011111) + 32;
|
|
1230
1002
|
}
|
|
1231
1003
|
}
|
|
1232
|
-
|
|
1233
1004
|
for (let i = 0; i < sizes.length; ++i) {
|
|
1234
1005
|
sizes[i] -= slicedOffLeft;
|
|
1235
1006
|
}
|
|
1236
|
-
|
|
1237
1007
|
if (childRight !== undefined) {
|
|
1238
1008
|
const slicedOffRight = sizeOfSubtree(node.array[pathRight], depth - 1) - sizeOfSubtree(childRight, depth - 1);
|
|
1239
1009
|
sizes[sizes.length - 1] -= slicedOffRight;
|
|
1240
1010
|
}
|
|
1241
1011
|
}
|
|
1242
|
-
|
|
1243
1012
|
return new Node(sizes, array);
|
|
1244
1013
|
}
|
|
1245
1014
|
/**
|
|
1246
1015
|
* @internal
|
|
1247
1016
|
*/
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
1017
|
let newOffset = 0;
|
|
1251
1018
|
exports.newOffset = newOffset;
|
|
1252
|
-
|
|
1253
1019
|
function sliceLeft(tree, depth, index, offset, top) {
|
|
1254
1020
|
let {
|
|
1255
1021
|
index: newIndex,
|
|
1256
1022
|
path,
|
|
1257
1023
|
updatedOffset
|
|
1258
1024
|
} = getPath(index, offset, depth, tree.sizes);
|
|
1259
|
-
|
|
1260
1025
|
if (depth === 0) {
|
|
1261
|
-
exports.newAffix = newAffix = tree.array.slice(path).reverse();
|
|
1026
|
+
exports.newAffix = newAffix = tree.array.slice(path).reverse();
|
|
1027
|
+
// This leaf node is moved up as a suffix so there is nothing here
|
|
1262
1028
|
// after slicing
|
|
1263
|
-
|
|
1264
1029
|
return undefined;
|
|
1265
1030
|
} else {
|
|
1266
1031
|
const child = sliceLeft(tree.array[path], depth - 1, newIndex, updatedOffset, false);
|
|
1267
|
-
|
|
1268
1032
|
if (child === undefined) {
|
|
1269
1033
|
// There is nothing in the child after slicing so we don't include it
|
|
1270
1034
|
++path;
|
|
1271
|
-
|
|
1272
1035
|
if (path === tree.array.length) {
|
|
1273
1036
|
return undefined;
|
|
1274
1037
|
}
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1038
|
+
}
|
|
1039
|
+
// If we've sliced something away and it's not a the root, update offset
|
|
1278
1040
|
if (tree.sizes === undefined && top === false) {
|
|
1279
1041
|
exports.newOffset = newOffset = newOffset | 32 - (tree.array.length - path) << depth * branchBits;
|
|
1280
1042
|
}
|
|
1281
|
-
|
|
1282
1043
|
return sliceNode(tree, index, depth, path, tree.array.length - 1, child, undefined);
|
|
1283
1044
|
}
|
|
1284
1045
|
}
|
|
1285
1046
|
/** Slice elements off of a tree from the right */
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
1047
|
function sliceRight(node, depth, index, offset) {
|
|
1289
1048
|
let {
|
|
1290
1049
|
index: newIndex,
|
|
1291
1050
|
path
|
|
1292
1051
|
} = getPath(index, offset, depth, node.sizes);
|
|
1293
|
-
|
|
1294
1052
|
if (depth === 0) {
|
|
1295
|
-
exports.newAffix = newAffix = node.array.slice(0, path + 1);
|
|
1053
|
+
exports.newAffix = newAffix = node.array.slice(0, path + 1);
|
|
1054
|
+
// this leaf node is moved up as a suffix so there is nothing here
|
|
1296
1055
|
// after slicing
|
|
1297
|
-
|
|
1298
1056
|
return undefined;
|
|
1299
1057
|
} else {
|
|
1300
1058
|
// slice the child, note that we subtract 1 then the radix lookup
|
|
1301
1059
|
// algorithm can find the last element that we want to include
|
|
1302
1060
|
// and sliceRight will do a slice that is inclusive on the index.
|
|
1303
1061
|
const child = sliceRight(node.array[path], depth - 1, newIndex, path === 0 ? offset : 0);
|
|
1304
|
-
|
|
1305
1062
|
if (child === undefined) {
|
|
1306
1063
|
// there is nothing in the child after slicing so we don't include it
|
|
1307
1064
|
--path;
|
|
1308
|
-
|
|
1309
1065
|
if (path === -1) {
|
|
1310
1066
|
return undefined;
|
|
1311
1067
|
}
|
|
1312
|
-
}
|
|
1068
|
+
}
|
|
1069
|
+
// note that we add 1 to the path since we want the slice to be
|
|
1313
1070
|
// inclusive on the end index. Only at the leaf level do we want
|
|
1314
1071
|
// to do an exclusive slice.
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
1072
|
const array = node.array.slice(0, path + 1);
|
|
1318
|
-
|
|
1319
1073
|
if (child !== undefined) {
|
|
1320
1074
|
array[array.length - 1] = child;
|
|
1321
1075
|
}
|
|
1322
|
-
|
|
1323
1076
|
let sizes = node.sizes;
|
|
1324
|
-
|
|
1325
1077
|
if (sizes !== undefined) {
|
|
1326
1078
|
sizes = sizes.slice(0, path + 1);
|
|
1327
|
-
|
|
1328
1079
|
if (child !== undefined) {
|
|
1329
1080
|
const slicedOff = sizeOfSubtree(node.array[path], depth - 1) - sizeOfSubtree(child, depth - 1);
|
|
1330
1081
|
sizes[sizes.length - 1] -= slicedOff;
|
|
1331
1082
|
}
|
|
1332
1083
|
}
|
|
1333
|
-
|
|
1334
1084
|
return new Node(sizes, array);
|
|
1335
1085
|
}
|
|
1336
1086
|
}
|
|
1337
|
-
|
|
1338
1087
|
function sliceTreeVector(from, to, tree, depth, offset, l) {
|
|
1339
1088
|
const sizes = tree.sizes;
|
|
1340
1089
|
let {
|
|
@@ -1345,7 +1094,6 @@ function sliceTreeVector(from, to, tree, depth, offset, l) {
|
|
|
1345
1094
|
index: newTo,
|
|
1346
1095
|
path: pathRight
|
|
1347
1096
|
} = getPath(to, offset, depth, sizes);
|
|
1348
|
-
|
|
1349
1097
|
if (depth === 0) {
|
|
1350
1098
|
// we are slicing a piece off a leaf node
|
|
1351
1099
|
l.prefix = emptyAffix;
|
|
@@ -1362,21 +1110,17 @@ function sliceTreeVector(from, to, tree, depth, offset, l) {
|
|
|
1362
1110
|
const childRight = sliceRight(tree.array[pathRight], depth - 1, newTo, 0);
|
|
1363
1111
|
l.bits = setSuffix(newAffix.length, l.bits);
|
|
1364
1112
|
l.suffix = newAffix;
|
|
1365
|
-
|
|
1366
1113
|
if (childRight === undefined) {
|
|
1367
1114
|
--pathRight;
|
|
1368
1115
|
}
|
|
1369
|
-
|
|
1370
1116
|
exports.newOffset = newOffset = 0;
|
|
1371
1117
|
const childLeft = sliceLeft(tree.array[pathLeft], depth - 1, newFrom, pathLeft === 0 ? offset : 0, pathLeft === pathRight);
|
|
1372
1118
|
l.offset = newOffset;
|
|
1373
1119
|
l.bits = setPrefix(newAffix.length, l.bits);
|
|
1374
1120
|
l.prefix = newAffix;
|
|
1375
|
-
|
|
1376
1121
|
if (childLeft === undefined) {
|
|
1377
1122
|
++pathLeft;
|
|
1378
1123
|
}
|
|
1379
|
-
|
|
1380
1124
|
if (pathLeft >= pathRight) {
|
|
1381
1125
|
if (pathLeft > pathRight) {
|
|
1382
1126
|
// This only happens when `pathLeft` originally was equal to
|
|
@@ -1393,55 +1137,44 @@ function sliceTreeVector(from, to, tree, depth, offset, l) {
|
|
|
1393
1137
|
} else {
|
|
1394
1138
|
l.root = sliceNode(tree, from, depth, pathLeft, pathRight, childLeft, childRight);
|
|
1395
1139
|
}
|
|
1396
|
-
|
|
1397
1140
|
return l;
|
|
1398
1141
|
}
|
|
1399
1142
|
}
|
|
1400
1143
|
/**
|
|
1401
1144
|
* @internal
|
|
1402
1145
|
*/
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
1146
|
function zeroOffset() {
|
|
1406
1147
|
exports.newOffset = newOffset = 0;
|
|
1407
1148
|
}
|
|
1408
|
-
|
|
1409
1149
|
function foldLeftArrayCb(cb, state, array, from, to, offset) {
|
|
1410
|
-
for (var i = from; i < to && cb(array[i], state, i + offset); ++i) {
|
|
1150
|
+
for (var i = from; i < to && cb(array[i], state, i + offset); ++i) {
|
|
1151
|
+
//
|
|
1411
1152
|
}
|
|
1412
|
-
|
|
1413
1153
|
return [i === to, i + offset + 1];
|
|
1414
1154
|
}
|
|
1415
|
-
|
|
1416
1155
|
function foldRightArrayCb(cb, state, array, from, to, offset) {
|
|
1417
1156
|
// eslint-disable-next-line no-param-reassign
|
|
1418
|
-
for (var i = from - 1; to <= i && cb(array[i], state, offset); --i, offset--) {
|
|
1157
|
+
for (var i = from - 1; to <= i && cb(array[i], state, offset); --i, offset--) {
|
|
1158
|
+
//
|
|
1419
1159
|
}
|
|
1420
|
-
|
|
1421
1160
|
return [i === to - 1, offset];
|
|
1422
1161
|
}
|
|
1423
|
-
|
|
1424
1162
|
function foldLeftNodeCb(cb, state, node, depth, offset) {
|
|
1425
1163
|
const {
|
|
1426
1164
|
array
|
|
1427
1165
|
} = node;
|
|
1428
|
-
|
|
1429
1166
|
if (depth === 0) {
|
|
1430
1167
|
return foldLeftArrayCb(cb, state, array, 0, array.length, offset);
|
|
1431
1168
|
}
|
|
1432
|
-
|
|
1433
1169
|
const to = array.length;
|
|
1434
1170
|
let j = offset;
|
|
1435
1171
|
let cont;
|
|
1436
|
-
|
|
1437
1172
|
for (let i = 0; i < to; ++i) {
|
|
1438
1173
|
[cont, j] = foldLeftNodeCb(cb, state, array[i], depth - 1, j);
|
|
1439
|
-
|
|
1440
1174
|
if (!cont) {
|
|
1441
1175
|
return [false, j];
|
|
1442
1176
|
}
|
|
1443
1177
|
}
|
|
1444
|
-
|
|
1445
1178
|
return [true, j];
|
|
1446
1179
|
}
|
|
1447
1180
|
/**
|
|
@@ -1451,170 +1184,128 @@ function foldLeftNodeCb(cb, state, node, depth, offset) {
|
|
|
1451
1184
|
* to continue the fold. `true` indicates that the folding should
|
|
1452
1185
|
* continue.
|
|
1453
1186
|
*/
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
1187
|
function foldLeftCb(cb, state, l) {
|
|
1457
1188
|
const prefixSize = getPrefixSize(l);
|
|
1458
1189
|
let i = prefixSize - 1;
|
|
1459
1190
|
let cont = true;
|
|
1460
1191
|
[cont, i] = foldRightArrayCb(cb, state, l.prefix, prefixSize, 0, i);
|
|
1461
|
-
|
|
1462
1192
|
if (!cont) {
|
|
1463
1193
|
return state;
|
|
1464
1194
|
}
|
|
1465
|
-
|
|
1466
1195
|
i = prefixSize;
|
|
1467
|
-
|
|
1468
1196
|
if (l.root !== undefined) {
|
|
1469
1197
|
[cont, i] = foldLeftNodeCb(cb, state, l.root, getDepth(l), i);
|
|
1470
|
-
|
|
1471
1198
|
if (!cont) {
|
|
1472
1199
|
return state;
|
|
1473
1200
|
}
|
|
1474
1201
|
}
|
|
1475
|
-
|
|
1476
1202
|
const suffixSize = getSuffixSize(l);
|
|
1477
1203
|
foldLeftArrayCb(cb, state, l.suffix, 0, suffixSize, i);
|
|
1478
1204
|
return state;
|
|
1479
1205
|
}
|
|
1480
|
-
|
|
1481
1206
|
function foldRightNodeCb(cb, state, node, depth, offset) {
|
|
1482
1207
|
const {
|
|
1483
1208
|
array
|
|
1484
1209
|
} = node;
|
|
1485
|
-
|
|
1486
1210
|
if (depth === 0) {
|
|
1487
1211
|
return foldRightArrayCb(cb, state, array, array.length, 0, offset);
|
|
1488
1212
|
}
|
|
1489
|
-
|
|
1490
1213
|
let j = offset;
|
|
1491
1214
|
let cont;
|
|
1492
|
-
|
|
1493
1215
|
for (let i = array.length - 1; 0 <= i; --i) {
|
|
1494
1216
|
[cont, j] = foldRightNodeCb(cb, state, array[i], depth - 1, j);
|
|
1495
|
-
|
|
1496
1217
|
if (!cont) {
|
|
1497
1218
|
return [false, j];
|
|
1498
1219
|
}
|
|
1499
1220
|
}
|
|
1500
|
-
|
|
1501
1221
|
return [true, j];
|
|
1502
1222
|
}
|
|
1503
|
-
|
|
1504
1223
|
function foldRightCb(cb, state, l) {
|
|
1505
1224
|
const suffixSize = getSuffixSize(l);
|
|
1506
1225
|
const prefixSize = getPrefixSize(l);
|
|
1507
1226
|
let i = l.length - 1;
|
|
1508
1227
|
let cont = true;
|
|
1509
1228
|
[cont, i] = foldRightArrayCb(cb, state, l.suffix, suffixSize, 0, i);
|
|
1510
|
-
|
|
1511
1229
|
if (!cont) {
|
|
1512
1230
|
return state;
|
|
1513
1231
|
}
|
|
1514
|
-
|
|
1515
1232
|
if (l.root !== undefined) {
|
|
1516
1233
|
[cont, i] = foldRightNodeCb(cb, state, l.root, getDepth(l), i);
|
|
1517
|
-
|
|
1518
1234
|
if (!cont) {
|
|
1519
1235
|
return state;
|
|
1520
1236
|
}
|
|
1521
1237
|
}
|
|
1522
|
-
|
|
1523
1238
|
const prefix = l.prefix;
|
|
1524
1239
|
foldLeftArrayCb(cb, state, l.prefix, prefix.length - prefixSize, prefix.length, prefix.length - 1);
|
|
1525
1240
|
return state;
|
|
1526
1241
|
}
|
|
1527
|
-
|
|
1528
1242
|
function foldLeftPrefix(f, b, array, length) {
|
|
1529
1243
|
let acc = b;
|
|
1530
1244
|
let j = 0;
|
|
1531
|
-
|
|
1532
1245
|
for (let i = length - 1; 0 <= i; --i, j++) {
|
|
1533
1246
|
acc = f(j, acc, array[i]);
|
|
1534
1247
|
}
|
|
1535
|
-
|
|
1536
1248
|
return [acc, j];
|
|
1537
1249
|
}
|
|
1538
|
-
|
|
1539
1250
|
function foldLeftNode(f, b, node, depth, offset) {
|
|
1540
1251
|
const {
|
|
1541
1252
|
array
|
|
1542
1253
|
} = node;
|
|
1543
1254
|
let acc = b;
|
|
1544
1255
|
let j = offset;
|
|
1545
|
-
|
|
1546
1256
|
if (depth === 0) {
|
|
1547
1257
|
return foldLeftSuffix(f, b, array, array.length, offset);
|
|
1548
1258
|
}
|
|
1549
|
-
|
|
1550
1259
|
for (let i = 0; i < array.length; ++i) {
|
|
1551
1260
|
[acc, j] = foldLeftNode(f, acc, array[i], depth - 1, j);
|
|
1552
1261
|
}
|
|
1553
|
-
|
|
1554
1262
|
return [acc, j];
|
|
1555
1263
|
}
|
|
1556
|
-
|
|
1557
1264
|
function foldLeftSuffix(f, b, array, length, offset) {
|
|
1558
1265
|
let acc = b;
|
|
1559
1266
|
let j = offset;
|
|
1560
|
-
|
|
1561
1267
|
for (let i = 0; i < length; ++i, j++) {
|
|
1562
1268
|
acc = f(j, acc, array[i]);
|
|
1563
1269
|
}
|
|
1564
|
-
|
|
1565
1270
|
return [acc, j];
|
|
1566
1271
|
}
|
|
1567
|
-
|
|
1568
1272
|
function foldRightPrefix(f, b, array, length, offset) {
|
|
1569
1273
|
let acc = b;
|
|
1570
1274
|
let j = offset;
|
|
1571
|
-
|
|
1572
1275
|
for (let i = 0; i < length; ++i, j--) {
|
|
1573
1276
|
acc = f(j, array[i], acc);
|
|
1574
1277
|
}
|
|
1575
|
-
|
|
1576
1278
|
return [acc, j];
|
|
1577
1279
|
}
|
|
1578
|
-
|
|
1579
1280
|
function foldRightNode(f, b, node, depth, offset) {
|
|
1580
1281
|
const {
|
|
1581
1282
|
array
|
|
1582
1283
|
} = node;
|
|
1583
1284
|
let acc = b;
|
|
1584
1285
|
let j = offset;
|
|
1585
|
-
|
|
1586
1286
|
if (depth === 0) {
|
|
1587
1287
|
return foldRightSuffix(f, b, array, array.length, offset);
|
|
1588
1288
|
}
|
|
1589
|
-
|
|
1590
1289
|
for (let i = array.length - 1; 0 <= i; --i) {
|
|
1591
1290
|
[acc, j] = foldRightNode(f, acc, array[i], depth - 1, j);
|
|
1592
1291
|
}
|
|
1593
|
-
|
|
1594
1292
|
return [acc, j];
|
|
1595
1293
|
}
|
|
1596
|
-
|
|
1597
1294
|
function foldRightSuffix(f, b, array, length, offset) {
|
|
1598
1295
|
let acc = b;
|
|
1599
1296
|
let j = offset;
|
|
1600
|
-
|
|
1601
1297
|
for (let i = length - 1; 0 <= i; --i, j--) {
|
|
1602
1298
|
acc = f(j, array[i], acc);
|
|
1603
1299
|
}
|
|
1604
|
-
|
|
1605
1300
|
return [acc, j];
|
|
1606
1301
|
}
|
|
1607
|
-
|
|
1608
1302
|
function mapArray(f, array, offset) {
|
|
1609
1303
|
const result = new Array(array.length);
|
|
1610
|
-
|
|
1611
1304
|
for (let i = 0; i < array.length; ++i) {
|
|
1612
1305
|
result[i] = f(offset + i, array[i]);
|
|
1613
1306
|
}
|
|
1614
|
-
|
|
1615
1307
|
return [result, offset + array.length];
|
|
1616
1308
|
}
|
|
1617
|
-
|
|
1618
1309
|
function mapNode(f, node, depth, offset, adjust) {
|
|
1619
1310
|
if (depth !== 0) {
|
|
1620
1311
|
const {
|
|
@@ -1622,42 +1313,32 @@ function mapNode(f, node, depth, offset, adjust) {
|
|
|
1622
1313
|
} = node;
|
|
1623
1314
|
let innerOffset = offset;
|
|
1624
1315
|
const result = new Array(array.length);
|
|
1625
|
-
|
|
1626
1316
|
for (let i = 0; i < array.length; ++i) {
|
|
1627
1317
|
const [res, newOffset] = mapNode(f, array[i], depth - 1, innerOffset, adjust * 32);
|
|
1628
1318
|
innerOffset = newOffset;
|
|
1629
1319
|
result[i] = res;
|
|
1630
1320
|
}
|
|
1631
|
-
|
|
1632
1321
|
return [new Node(node.sizes, result), innerOffset];
|
|
1633
1322
|
} else {
|
|
1634
1323
|
const [res, newOffset] = mapArray(f, node.array, offset);
|
|
1635
1324
|
return [new Node(undefined, res), newOffset];
|
|
1636
1325
|
}
|
|
1637
1326
|
}
|
|
1638
|
-
|
|
1639
1327
|
function mapPrefix(f, prefix, length) {
|
|
1640
1328
|
const newPrefix = new Array(length);
|
|
1641
|
-
|
|
1642
1329
|
for (let i = length - 1; 0 <= i; --i) {
|
|
1643
1330
|
newPrefix[i] = f(length - 1 - i, prefix[i]);
|
|
1644
1331
|
}
|
|
1645
|
-
|
|
1646
1332
|
return newPrefix;
|
|
1647
1333
|
}
|
|
1648
|
-
|
|
1649
1334
|
function mapAffix(f, suffix, length, totalLength) {
|
|
1650
1335
|
const priorLength = totalLength - length;
|
|
1651
1336
|
const newSuffix = new Array(length);
|
|
1652
|
-
|
|
1653
1337
|
for (let i = 0; i < length; ++i) {
|
|
1654
1338
|
newSuffix[i] = f(priorLength + i, suffix[i]);
|
|
1655
1339
|
}
|
|
1656
|
-
|
|
1657
1340
|
return newSuffix;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
|
|
1341
|
+
}
|
|
1661
1342
|
function arrayPush(array, a) {
|
|
1662
1343
|
array.push(a);
|
|
1663
1344
|
return array;
|