@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable prefer-const */
|
|
2
2
|
import type { MutableVector, VectorF } from "@fncts/base/collection/immutable/Vector/definition";
|
|
3
3
|
import type { Eq, Monoid, Ord, Ordering, Traversable } from "@fncts/base/typeclass";
|
|
4
|
+
import type * as P from "@fncts/base/typeclass";
|
|
4
5
|
|
|
5
6
|
import {
|
|
6
7
|
affixPush,
|
|
@@ -48,115 +49,122 @@ import {
|
|
|
48
49
|
updateNode,
|
|
49
50
|
zeroOffset,
|
|
50
51
|
} from "@fncts/base/collection/immutable/Vector/internal";
|
|
51
|
-
import { TraversableWithIndex } from "@fncts/base/typeclass";
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Appends an element to the end of a Vector and returns the new Vector.
|
|
55
55
|
*
|
|
56
56
|
* @complexity O(n)
|
|
57
57
|
*
|
|
58
|
-
* @tsplus
|
|
59
|
-
* @tsplus operator fncts.Vector +
|
|
60
|
-
*/
|
|
61
|
-
export function
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
* @tsplus pipeable fncts.Vector append
|
|
59
|
+
* @tsplus pipeable-operator fncts.Vector +
|
|
60
|
+
*/
|
|
61
|
+
export function append<A>(a: A) {
|
|
62
|
+
return (self: Vector<A>): Vector<A> => {
|
|
63
|
+
const suffixSize = getSuffixSize(self);
|
|
64
|
+
if (suffixSize < 32) {
|
|
65
|
+
return new Vector(
|
|
66
|
+
incrementSuffix(self.bits),
|
|
67
|
+
self.offset,
|
|
68
|
+
self.length + 1,
|
|
69
|
+
self.prefix,
|
|
70
|
+
self.root,
|
|
71
|
+
affixPush(a, self.suffix, suffixSize),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
const newSuffix = [a];
|
|
75
|
+
const newVector = mutableClone(self);
|
|
76
|
+
appendNodeToTree(newVector, self.suffix);
|
|
77
|
+
newVector.suffix = newSuffix;
|
|
78
|
+
newVector.length++;
|
|
79
|
+
newVector.bits = setSuffix(1, newVector.bits);
|
|
80
|
+
return newVector;
|
|
81
|
+
};
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
/**
|
|
83
85
|
* Maps a function over a Vector and concatenates all the resulting
|
|
84
86
|
* Vectors together.
|
|
85
87
|
*
|
|
86
|
-
* @tsplus
|
|
88
|
+
* @tsplus pipeable fncts.Vector flatMap
|
|
87
89
|
*/
|
|
88
|
-
export function
|
|
89
|
-
return
|
|
90
|
+
export function flatMap<A, B>(f: (a: A) => Vector<B>) {
|
|
91
|
+
return (self: Vector<A>): Vector<B> => {
|
|
92
|
+
return self.map(f).flatten;
|
|
93
|
+
};
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
/**
|
|
93
97
|
* Splits the Vector into chunks of the given size.
|
|
94
98
|
*
|
|
95
|
-
* @tsplus
|
|
96
|
-
*/
|
|
97
|
-
export function
|
|
98
|
-
|
|
99
|
-
{ l2
|
|
100
|
-
|
|
101
|
-
buffer
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
* @tsplus pipeable fncts.Vector chunksOf
|
|
100
|
+
*/
|
|
101
|
+
export function chunksOf(size: number) {
|
|
102
|
+
return <A>(self: Vector<A>): Vector<Vector<A>> => {
|
|
103
|
+
const { buffer, l2 } = self.foldLeft(
|
|
104
|
+
{ l2: Vector.emptyPushable<Vector<A>>(), buffer: Vector.emptyPushable<A>() },
|
|
105
|
+
({ buffer, l2 }, elem) => {
|
|
106
|
+
buffer.push(elem);
|
|
107
|
+
if (buffer.length === size) {
|
|
108
|
+
return { l2: l2.push(buffer), buffer: Vector.emptyPushable<A>() };
|
|
109
|
+
} else {
|
|
110
|
+
return { l2, buffer };
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
);
|
|
114
|
+
return buffer.length === 0 ? l2 : l2.push(buffer);
|
|
115
|
+
};
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
/**
|
|
113
119
|
* Concatenates two Vectors.
|
|
114
120
|
*
|
|
115
121
|
* @complexity O(log(n))
|
|
116
|
-
* @tsplus
|
|
117
|
-
* @tsplus operator fncts.Vector + 1
|
|
118
|
-
*/
|
|
119
|
-
export function
|
|
120
|
-
export function
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const newSize = self.length + that.length;
|
|
127
|
-
const rightSuffixSize = getSuffixSize(that);
|
|
128
|
-
let newVector = self.mutableClone;
|
|
129
|
-
if (that.root === undefined) {
|
|
130
|
-
// right is nothing but a prefix and a suffix
|
|
131
|
-
const nrOfAffixes = concatAffixes(self, that);
|
|
132
|
-
for (let i = 0; i < nrOfAffixes; ++i) {
|
|
133
|
-
newVector = appendNodeToTree(newVector, concatBuffer[i]);
|
|
134
|
-
newVector.length += concatBuffer[i].length;
|
|
135
|
-
// wipe pointer, otherwise it might end up keeping the array alive
|
|
136
|
-
concatBuffer[i] = undefined;
|
|
122
|
+
* @tsplus pipeable fncts.Vector concat
|
|
123
|
+
* @tsplus pipeable-operator fncts.Vector + 1
|
|
124
|
+
*/
|
|
125
|
+
export function concat<B>(that: Vector<B>): <A>(self: Vector<A>) => Vector<A | B>;
|
|
126
|
+
export function concat<A>(that: Vector<A>) {
|
|
127
|
+
return (self: Vector<A>): Vector<A> => {
|
|
128
|
+
if (self.length === 0) {
|
|
129
|
+
return that;
|
|
130
|
+
} else if (that.length === 0) {
|
|
131
|
+
return self;
|
|
137
132
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
newVector
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
133
|
+
const newSize = self.length + that.length;
|
|
134
|
+
const rightSuffixSize = getSuffixSize(that);
|
|
135
|
+
let newVector = self.mutableClone;
|
|
136
|
+
if (that.root === undefined) {
|
|
137
|
+
// right is nothing but a prefix and a suffix
|
|
138
|
+
const nrOfAffixes = concatAffixes(self, that);
|
|
139
|
+
for (let i = 0; i < nrOfAffixes; ++i) {
|
|
140
|
+
newVector = appendNodeToTree(newVector, concatBuffer[i]);
|
|
141
|
+
newVector.length += concatBuffer[i].length;
|
|
142
|
+
// wipe pointer, otherwise it might end up keeping the array alive
|
|
143
|
+
concatBuffer[i] = undefined;
|
|
144
|
+
}
|
|
145
|
+
newVector.length = newSize;
|
|
146
|
+
newVector.suffix = concatBuffer[nrOfAffixes];
|
|
147
|
+
newVector.bits = setSuffix(concatBuffer[nrOfAffixes].length, newVector.bits);
|
|
148
|
+
concatBuffer[nrOfAffixes] = undefined;
|
|
149
|
+
return newVector;
|
|
150
|
+
} else {
|
|
151
|
+
const leftSuffixSize = getSuffixSize(self);
|
|
152
|
+
if (leftSuffixSize > 0) {
|
|
153
|
+
newVector = appendNodeToTree(newVector, self.suffix.slice(0, leftSuffixSize));
|
|
154
|
+
newVector.length += leftSuffixSize;
|
|
155
|
+
}
|
|
156
|
+
newVector = appendNodeToTree(newVector, that.prefix.slice(0, getPrefixSize(that)).reverse());
|
|
157
|
+
const newNode = concatSubTree(newVector.root!, getDepth(newVector), that.root, getDepth(that), true);
|
|
158
|
+
const newDepth = getHeight(newNode);
|
|
159
|
+
setSizes(newNode, newDepth);
|
|
160
|
+
newVector.root = newNode;
|
|
161
|
+
newVector.offset &= ~(mask << (getDepth(self) * branchBits));
|
|
162
|
+
newVector.length = newSize;
|
|
163
|
+
newVector.bits = setSuffix(rightSuffixSize, setDepth(newDepth, newVector.bits));
|
|
164
|
+
newVector.suffix = that.suffix;
|
|
165
|
+
return newVector;
|
|
148
166
|
}
|
|
149
|
-
|
|
150
|
-
const newNode = concatSubTree(newVector.root!, getDepth(newVector), that.root, getDepth(that), true);
|
|
151
|
-
const newDepth = getHeight(newNode);
|
|
152
|
-
setSizes(newNode, newDepth);
|
|
153
|
-
newVector.root = newNode;
|
|
154
|
-
newVector.offset &= ~(mask << (getDepth(self) * branchBits));
|
|
155
|
-
newVector.length = newSize;
|
|
156
|
-
newVector.bits = setSuffix(rightSuffixSize, setDepth(newDepth, newVector.bits));
|
|
157
|
-
newVector.suffix = that.suffix;
|
|
158
|
-
return newVector;
|
|
159
|
-
}
|
|
167
|
+
};
|
|
160
168
|
}
|
|
161
169
|
|
|
162
170
|
type ContainsState = {
|
|
@@ -178,32 +186,38 @@ function containsCb(value: any, state: ContainsState): boolean {
|
|
|
178
186
|
* Otherwise it returns `false`.
|
|
179
187
|
*
|
|
180
188
|
* @complexity O(n)
|
|
181
|
-
* @tsplus
|
|
189
|
+
* @tsplus pipeable fncts.Vector contains
|
|
182
190
|
*/
|
|
183
|
-
export function
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
191
|
+
export function contains<A>(element: A) {
|
|
192
|
+
return (self: Vector<A>): boolean => {
|
|
193
|
+
containsState.element = element;
|
|
194
|
+
containsState.result = false;
|
|
195
|
+
return foldLeftCb(containsCb, containsState, self).result;
|
|
196
|
+
};
|
|
187
197
|
}
|
|
188
198
|
|
|
189
199
|
/**
|
|
190
200
|
* Returns a new Vector without the first `n` elements.
|
|
191
201
|
*
|
|
192
202
|
* @complexity `O(log(n))`
|
|
193
|
-
* @tsplus
|
|
203
|
+
* @tsplus pipeable fncts.Vector drop
|
|
194
204
|
*/
|
|
195
|
-
export function
|
|
196
|
-
return
|
|
205
|
+
export function drop(n: number) {
|
|
206
|
+
return <A>(self: Vector<A>): Vector<A> => {
|
|
207
|
+
return self.slice(n, self.length);
|
|
208
|
+
};
|
|
197
209
|
}
|
|
198
210
|
|
|
199
211
|
/**
|
|
200
212
|
* Returns a new Vector without the last `n` elements.
|
|
201
213
|
*
|
|
202
214
|
* @complexity `O(log(n))`
|
|
203
|
-
* @tsplus
|
|
215
|
+
* @tsplus pipeable fncts.Vector dropLast
|
|
204
216
|
*/
|
|
205
|
-
export function
|
|
206
|
-
return
|
|
217
|
+
export function dropLast(n: number) {
|
|
218
|
+
return <A>(self: Vector<A>): Vector<A> => {
|
|
219
|
+
return self.slice(0, self.length - n);
|
|
220
|
+
};
|
|
207
221
|
}
|
|
208
222
|
|
|
209
223
|
/**
|
|
@@ -212,8 +226,8 @@ export function dropLast_<A>(as: Vector<A>, n: number): Vector<A> {
|
|
|
212
226
|
* @complexity `O(n)`
|
|
213
227
|
* @tsplus getter fncts.Vector dropRepeats
|
|
214
228
|
*/
|
|
215
|
-
export function dropRepeats<A>(
|
|
216
|
-
return
|
|
229
|
+
export function dropRepeats<A>(self: Vector<A>): Vector<A> {
|
|
230
|
+
return self.dropRepeatsWith(Equatable.strictEquals);
|
|
217
231
|
}
|
|
218
232
|
|
|
219
233
|
/**
|
|
@@ -221,12 +235,14 @@ export function dropRepeats<A>(as: Vector<A>): Vector<A> {
|
|
|
221
235
|
* function to determine when elements are equal.
|
|
222
236
|
*
|
|
223
237
|
* @complexity `O(n)`
|
|
224
|
-
* @tsplus
|
|
238
|
+
* @tsplus pipeable fncts.Vector dropRepeatsWith
|
|
225
239
|
*/
|
|
226
|
-
export function
|
|
227
|
-
return
|
|
228
|
-
|
|
229
|
-
|
|
240
|
+
export function dropRepeatsWith<A>(predicate: (a: A, b: A) => boolean) {
|
|
241
|
+
return (self: Vector<A>): Vector<A> => {
|
|
242
|
+
return self.foldLeft(Vector.emptyPushable(), (acc, a) =>
|
|
243
|
+
acc.length !== 0 && predicate((acc as Vector<A>).unsafeLast!, a) ? acc : acc.push(a),
|
|
244
|
+
);
|
|
245
|
+
};
|
|
230
246
|
}
|
|
231
247
|
|
|
232
248
|
type FindNotIndexState = {
|
|
@@ -249,44 +265,45 @@ function findNotIndexCb(value: any, state: FindNotIndexState): boolean {
|
|
|
249
265
|
*
|
|
250
266
|
* @complexity `O(k + log(n))` where `k` is the number of elements
|
|
251
267
|
* satisfying the predicate.
|
|
252
|
-
* @tsplus
|
|
268
|
+
* @tsplus pipeable fncts.Vector dropWhile
|
|
253
269
|
*/
|
|
254
|
-
export function
|
|
255
|
-
|
|
256
|
-
|
|
270
|
+
export function dropWhile<A>(predicate: Predicate<A>) {
|
|
271
|
+
return (self: Vector<A>): Vector<A> => {
|
|
272
|
+
const { index } = foldLeftCb(findNotIndexCb, { predicate, index: 0 }, self);
|
|
273
|
+
return self.slice(index, self.length);
|
|
274
|
+
};
|
|
257
275
|
}
|
|
258
276
|
|
|
259
277
|
type ElemState = {
|
|
260
278
|
element: any;
|
|
261
|
-
equals: (
|
|
279
|
+
equals: (y: any) => (x: any) => boolean;
|
|
262
280
|
result: boolean;
|
|
263
281
|
};
|
|
264
282
|
|
|
265
283
|
function elemCb(value: any, state: ElemState): boolean {
|
|
266
|
-
return !(state.result = state.equals(
|
|
284
|
+
return !(state.result = state.equals(state.element)(value));
|
|
267
285
|
}
|
|
268
286
|
|
|
269
287
|
/**
|
|
270
|
-
* @tsplus
|
|
288
|
+
* @tsplus pipeable fncts.Vector elem
|
|
271
289
|
*/
|
|
272
|
-
export function
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
return foldLeftCb(elemCb, elemState, self).result;
|
|
278
|
-
};
|
|
290
|
+
export function elem<A>(a: A, /** @tsplus auto */ E: Eq<A>) {
|
|
291
|
+
const elemState: ElemState = { equals: E.equals, element: undefined, result: false };
|
|
292
|
+
return (self: Vector<A>): boolean => {
|
|
293
|
+
elemState.element = a;
|
|
294
|
+
return foldLeftCb(elemCb, elemState, self).result;
|
|
279
295
|
};
|
|
280
296
|
}
|
|
281
|
-
|
|
282
297
|
/**
|
|
283
298
|
* Returns true if the two Vectors are equivalent.
|
|
284
299
|
*
|
|
285
300
|
* @complexity O(n)
|
|
286
|
-
* @tsplus
|
|
301
|
+
* @tsplus pipeable fncts.Vector equals
|
|
287
302
|
*/
|
|
288
|
-
export function
|
|
289
|
-
return self
|
|
303
|
+
export function equals<A>(that: Vector<A>) {
|
|
304
|
+
return (self: Vector<A>): boolean => {
|
|
305
|
+
return self.corresponds(that, Equatable.strictEquals);
|
|
306
|
+
};
|
|
290
307
|
}
|
|
291
308
|
|
|
292
309
|
type PredState = {
|
|
@@ -303,12 +320,14 @@ function everyCb<A>(value: A, state: any): boolean {
|
|
|
303
320
|
* for all elements in the given Vector.
|
|
304
321
|
*
|
|
305
322
|
* @complexity O(n)
|
|
306
|
-
* @tsplus
|
|
323
|
+
* @tsplus pipeable fncts.Vector every
|
|
307
324
|
*/
|
|
308
|
-
export function
|
|
309
|
-
export function
|
|
310
|
-
export function
|
|
311
|
-
return
|
|
325
|
+
export function every<A, B extends A>(refinement: Refinement<A, B>): (self: Vector<A>) => self is Vector<B>;
|
|
326
|
+
export function every<A>(predicate: Predicate<A>): (self: Vector<A>) => boolean;
|
|
327
|
+
export function every<A>(predicate: Predicate<A>) {
|
|
328
|
+
return (self: Vector<A>): boolean => {
|
|
329
|
+
return foldLeftCb<A, PredState>(everyCb, { predicate, result: true }, self).result;
|
|
330
|
+
};
|
|
312
331
|
}
|
|
313
332
|
|
|
314
333
|
/**
|
|
@@ -317,18 +336,18 @@ export function every_<A>(as: Vector<A>, predicate: Predicate<A>): boolean {
|
|
|
317
336
|
* @complexity O(1)
|
|
318
337
|
* @tsplus static fncts.VectorOps empty
|
|
319
338
|
*/
|
|
320
|
-
export function empty<A =
|
|
339
|
+
export function empty<A = never>(): Vector<A> {
|
|
321
340
|
return new Vector(0, 0, 0, emptyAffix, undefined, emptyAffix);
|
|
322
341
|
}
|
|
323
342
|
|
|
324
343
|
/**
|
|
325
344
|
* @tsplus static fncts.VectorOps emptyPushable
|
|
326
345
|
*/
|
|
327
|
-
export function emptyPushable<A>(): MutableVector<A> {
|
|
346
|
+
export function emptyPushable<A = never>(): MutableVector<A> {
|
|
328
347
|
return new Vector(0, 0, 0, [], undefined, []) as any;
|
|
329
348
|
}
|
|
330
349
|
|
|
331
|
-
function
|
|
350
|
+
function someCb<A>(value: A, state: PredState): boolean {
|
|
332
351
|
return !(state.result = state.predicate(value));
|
|
333
352
|
}
|
|
334
353
|
|
|
@@ -338,10 +357,12 @@ function existsCb<A>(value: A, state: PredState): boolean {
|
|
|
338
357
|
*
|
|
339
358
|
* @complexity O(n)
|
|
340
359
|
*
|
|
341
|
-
* @tsplus
|
|
360
|
+
* @tsplus pipeable fncts.Vector some
|
|
342
361
|
*/
|
|
343
|
-
export function
|
|
344
|
-
return
|
|
362
|
+
export function some<A>(predicate: Predicate<A>) {
|
|
363
|
+
return (self: Vector<A>): boolean => {
|
|
364
|
+
return foldLeftCb<A, PredState>(someCb, { predicate, result: false }, self).result;
|
|
365
|
+
};
|
|
345
366
|
}
|
|
346
367
|
|
|
347
368
|
/**
|
|
@@ -349,10 +370,12 @@ export function exists_<A>(as: Vector<A>, predicate: Predicate<A>): boolean {
|
|
|
349
370
|
* If no such element is found the function returns `undefined`.
|
|
350
371
|
*
|
|
351
372
|
* @complexity O(n)
|
|
352
|
-
* @tsplus
|
|
373
|
+
* @tsplus pipeable fncts.Vector find
|
|
353
374
|
*/
|
|
354
|
-
export function
|
|
355
|
-
return
|
|
375
|
+
export function find<A>(predicate: Predicate<A>) {
|
|
376
|
+
return (self: Vector<A>): Maybe<A> => {
|
|
377
|
+
return Maybe.fromNullable(self.unsafeFind(predicate));
|
|
378
|
+
};
|
|
356
379
|
}
|
|
357
380
|
|
|
358
381
|
type FindIndexState = {
|
|
@@ -372,11 +395,13 @@ function findIndexCb<A>(value: A, state: FindIndexState): boolean {
|
|
|
372
395
|
* `-1`.
|
|
373
396
|
*
|
|
374
397
|
* @complexity O(n)
|
|
375
|
-
* @tsplus
|
|
398
|
+
* @tsplus pipeable fncts.Vector findIndex
|
|
376
399
|
*/
|
|
377
|
-
export function
|
|
378
|
-
|
|
379
|
-
|
|
400
|
+
export function findIndex<A>(predicate: Predicate<A>) {
|
|
401
|
+
return (self: Vector<A>): number => {
|
|
402
|
+
const { found, index } = foldLeftCb<A, FindIndexState>(findIndexCb, { predicate, found: false, index: -1 }, self);
|
|
403
|
+
return found ? index : -1;
|
|
404
|
+
};
|
|
380
405
|
}
|
|
381
406
|
|
|
382
407
|
/**
|
|
@@ -384,10 +409,12 @@ export function findIndex_<A>(as: Vector<A>, predicate: Predicate<A>): number {
|
|
|
384
409
|
* If no such element is found the function returns `undefined`.
|
|
385
410
|
*
|
|
386
411
|
* @complexity O(n)
|
|
387
|
-
* @tsplus
|
|
412
|
+
* @tsplus pipeable fncts.Vector findLast
|
|
388
413
|
*/
|
|
389
|
-
export function
|
|
390
|
-
return
|
|
414
|
+
export function findLast<A>(predicate: Predicate<A>) {
|
|
415
|
+
return (self: Vector<A>): Maybe<A> => {
|
|
416
|
+
return Maybe.fromNullable(self.unsafeFindLast(predicate));
|
|
417
|
+
};
|
|
391
418
|
}
|
|
392
419
|
|
|
393
420
|
/**
|
|
@@ -396,11 +423,13 @@ export function findLast_<A>(as: Vector<A>, predicate: Predicate<A>): Maybe<A> {
|
|
|
396
423
|
* `-1`.
|
|
397
424
|
*
|
|
398
425
|
* @complexity O(n)
|
|
399
|
-
* @tsplus
|
|
426
|
+
* @tsplus pipeable fncts.Vector findLastIndex
|
|
400
427
|
*/
|
|
401
|
-
export function
|
|
402
|
-
|
|
403
|
-
|
|
428
|
+
export function findLastIndex<A>(predicate: Predicate<A>) {
|
|
429
|
+
return (self: Vector<A>): number => {
|
|
430
|
+
const { found, index } = foldRightCb<A, FindIndexState>(findIndexCb, { predicate, found: false, index: -0 }, self);
|
|
431
|
+
return found ? index : -1;
|
|
432
|
+
};
|
|
404
433
|
}
|
|
405
434
|
|
|
406
435
|
/**
|
|
@@ -411,8 +440,8 @@ export function findLastIndex_<A>(as: Vector<A>, predicate: Predicate<A>): numbe
|
|
|
411
440
|
*
|
|
412
441
|
* @tsplus getter fncts.Vector flatten
|
|
413
442
|
*/
|
|
414
|
-
export function flatten<A>(
|
|
415
|
-
return
|
|
443
|
+
export function flatten<A>(self: Vector<Vector<A>>): Vector<A> {
|
|
444
|
+
return self.foldLeft<Vector<A>, Vector<A>>(Vector.empty(), (acc, a) => acc.concat(a));
|
|
416
445
|
}
|
|
417
446
|
|
|
418
447
|
/**
|
|
@@ -441,23 +470,27 @@ export function from<A>(sequence: any): Vector<A> {
|
|
|
441
470
|
/**
|
|
442
471
|
* Folds a function over a Vector. Left-associative.
|
|
443
472
|
*
|
|
444
|
-
* @tsplus
|
|
473
|
+
* @tsplus pipeable fncts.Vector foldLeft
|
|
445
474
|
*/
|
|
446
|
-
export function
|
|
447
|
-
return
|
|
475
|
+
export function foldLeft<A, B>(initial: B, f: (acc: B, a: A) => B) {
|
|
476
|
+
return (self: Vector<A>): B => {
|
|
477
|
+
return self.foldLeftWithIndex(initial, (_, b, a) => f(b, a));
|
|
478
|
+
};
|
|
448
479
|
}
|
|
449
480
|
|
|
450
481
|
/**
|
|
451
|
-
* @tsplus
|
|
482
|
+
* @tsplus pipeable fncts.Vector foldLeftWithIndex
|
|
452
483
|
*/
|
|
453
|
-
export function
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
484
|
+
export function foldLeftWithIndex<A, B>(b: B, f: (i: number, b: B, a: A) => B) {
|
|
485
|
+
return (self: Vector<A>): B => {
|
|
486
|
+
const suffixSize = getSuffixSize(self);
|
|
487
|
+
const prefixSize = getPrefixSize(self);
|
|
488
|
+
let [acc, index] = foldLeftPrefix(f, b, self.prefix, prefixSize);
|
|
489
|
+
if (self.root !== undefined) {
|
|
490
|
+
[acc, index] = foldLeftNode(f, acc, self.root, getDepth(self), index);
|
|
491
|
+
}
|
|
492
|
+
return foldLeftSuffix(f, acc, self.suffix, suffixSize, index)[0];
|
|
493
|
+
};
|
|
461
494
|
}
|
|
462
495
|
|
|
463
496
|
type FoldWhileState<A, B> = {
|
|
@@ -489,68 +522,76 @@ function foldWhileCb<A, B>(a: A, state: FoldWhileState<A, B>, i: number): boolea
|
|
|
489
522
|
}
|
|
490
523
|
|
|
491
524
|
/**
|
|
492
|
-
* @tsplus
|
|
525
|
+
* @tsplus pipeable fncts.Vector foldLeftWhile
|
|
493
526
|
*/
|
|
494
|
-
export function
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
527
|
+
export function foldLeftWhile<A, B>(b: B, cont: Predicate<B>, f: (i: number, b: B, a: A) => B) {
|
|
528
|
+
return (self: Vector<A>): B => {
|
|
529
|
+
if (!cont(b)) {
|
|
530
|
+
return b;
|
|
531
|
+
}
|
|
532
|
+
return foldLeftCb<A, FoldWhileState<A, B>>(foldWhileCb, { predicate: cont, f, result: b }, self).result;
|
|
533
|
+
};
|
|
499
534
|
}
|
|
500
535
|
|
|
501
536
|
/**
|
|
502
|
-
* @tsplus
|
|
537
|
+
* @tsplus pipeable fncts.Vector foldRightWhile
|
|
503
538
|
*/
|
|
504
|
-
export function
|
|
505
|
-
return
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
539
|
+
export function foldRightWhile<A, B>(b: B, cont: Predicate<B>, f: (i: number, a: A, b: B) => B) {
|
|
540
|
+
return (self: Vector<A>): B => {
|
|
541
|
+
return foldRightCb<A, FoldWhileState<A, B>>(
|
|
542
|
+
foldWhileCb,
|
|
543
|
+
{ predicate: cont, result: b, f: (i, b, a) => f(i, a, b) },
|
|
544
|
+
self,
|
|
545
|
+
).result;
|
|
546
|
+
};
|
|
510
547
|
}
|
|
511
548
|
|
|
512
549
|
/**
|
|
513
|
-
* @tsplus
|
|
550
|
+
* @tsplus pipeable fncts.Vector foldMap
|
|
514
551
|
*/
|
|
515
|
-
export function
|
|
516
|
-
return self
|
|
552
|
+
export function foldMap<A, M>(f: (a: A) => M, /** @tsplus auto */ M: Monoid<M>) {
|
|
553
|
+
return (self: Vector<A>): M => {
|
|
554
|
+
return self.foldMapWithIndex((_, a) => f(a), M);
|
|
555
|
+
};
|
|
517
556
|
}
|
|
518
557
|
|
|
519
558
|
/**
|
|
520
|
-
* @tsplus
|
|
559
|
+
* @tsplus pipeable fncts.Vector foldMapWithIndex
|
|
521
560
|
*/
|
|
522
|
-
export function
|
|
523
|
-
self: Vector<A
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
): M {
|
|
527
|
-
return self.foldLeftWithIndex(M.nat, (i, b, a) => M.combine(b, f(i, a)));
|
|
561
|
+
export function foldMapWithIndex<A, M>(f: (i: number, a: A) => M, /** @tsplus auto */ M: Monoid<M>) {
|
|
562
|
+
return (self: Vector<A>): M => {
|
|
563
|
+
return self.foldLeftWithIndex(M.nat, (i, b, a) => M.combine(f(i, a))(b));
|
|
564
|
+
};
|
|
528
565
|
}
|
|
529
566
|
|
|
530
567
|
/**
|
|
531
568
|
* Folds a function over a Vector. Right-associative.
|
|
532
569
|
*
|
|
533
570
|
* @complexity O(n)
|
|
534
|
-
* @tsplus
|
|
571
|
+
* @tsplus pipeable fncts.Vector foldRight
|
|
535
572
|
*/
|
|
536
|
-
export function
|
|
537
|
-
return
|
|
573
|
+
export function foldRight<A, B>(initial: B, f: (value: A, acc: B) => B) {
|
|
574
|
+
return (self: Vector<A>): B => {
|
|
575
|
+
return self.foldRightWithIndex(initial, (_, a, b) => f(a, b));
|
|
576
|
+
};
|
|
538
577
|
}
|
|
539
578
|
|
|
540
579
|
/**
|
|
541
580
|
* Folds a function over a Vector. Right-associative.
|
|
542
581
|
*
|
|
543
582
|
* @complexity O(n)
|
|
544
|
-
* @tsplus
|
|
545
|
-
*/
|
|
546
|
-
export function
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
583
|
+
* @tsplus pipeable fncts.Vector foldRightWithIndex
|
|
584
|
+
*/
|
|
585
|
+
export function foldRightWithIndex<A, B>(b: B, f: (i: number, a: A, b: B) => B) {
|
|
586
|
+
return (self: Vector<A>): B => {
|
|
587
|
+
const suffixSize = getSuffixSize(self);
|
|
588
|
+
const prefixSize = getPrefixSize(self);
|
|
589
|
+
let [acc, j] = foldRightSuffix(f, b, self.suffix, suffixSize, self.length - 1);
|
|
590
|
+
if (self.root !== undefined) {
|
|
591
|
+
[acc, j] = foldRightNode(f, acc, self.root, getDepth(self), j);
|
|
592
|
+
}
|
|
593
|
+
return foldRightPrefix(f, acc, self.prefix, prefixSize, j)[0];
|
|
594
|
+
};
|
|
554
595
|
}
|
|
555
596
|
|
|
556
597
|
/**
|
|
@@ -563,17 +604,21 @@ export function foldRightWithIndex_<A, B>(fa: Vector<A>, b: B, f: (i: number, a:
|
|
|
563
604
|
* makes `forEach` faster when the new Vector is unneeded.
|
|
564
605
|
*
|
|
565
606
|
* @complexity O(n)
|
|
566
|
-
* @tsplus
|
|
607
|
+
* @tsplus pipeable fncts.Vector forEach
|
|
567
608
|
*/
|
|
568
|
-
export function
|
|
569
|
-
|
|
609
|
+
export function forEach<A>(f: (a: A) => void) {
|
|
610
|
+
return (self: Vector<A>): void => {
|
|
611
|
+
self.foldLeft(undefined as void, (_, element) => f(element));
|
|
612
|
+
};
|
|
570
613
|
}
|
|
571
614
|
|
|
572
615
|
/**
|
|
573
|
-
* @tsplus
|
|
616
|
+
* @tsplus pipeable fncts.Vector forEachWithIndex
|
|
574
617
|
*/
|
|
575
|
-
export function
|
|
576
|
-
|
|
618
|
+
export function forEachWithIndex<A>(f: (i: number, a: A) => void) {
|
|
619
|
+
return (self: Vector<A>): void => {
|
|
620
|
+
self.foldLeftWithIndex(undefined as void, (index, _, element) => f(index, element));
|
|
621
|
+
};
|
|
577
622
|
}
|
|
578
623
|
|
|
579
624
|
/**
|
|
@@ -581,10 +626,12 @@ export function forEachWithIndex_<A>(as: Vector<A>, f: (i: number, a: A) => void
|
|
|
581
626
|
* `undefined` is returned.
|
|
582
627
|
*
|
|
583
628
|
* @complexity O(log(n))
|
|
584
|
-
* @tsplus
|
|
629
|
+
* @tsplus pipeable fncts.Vector get
|
|
585
630
|
*/
|
|
586
|
-
export function
|
|
587
|
-
return
|
|
631
|
+
export function get(index: number) {
|
|
632
|
+
return <A>(self: Vector<A>): Maybe<A> => {
|
|
633
|
+
return Maybe.fromNullable(self.unsafeGet(index));
|
|
634
|
+
};
|
|
588
635
|
}
|
|
589
636
|
|
|
590
637
|
/**
|
|
@@ -595,19 +642,21 @@ export function get_<A>(self: Vector<A>, index: number): Maybe<A> {
|
|
|
595
642
|
* equal elements should be grouped together the Vector should be sorted
|
|
596
643
|
* before grouping.
|
|
597
644
|
*
|
|
598
|
-
* @tsplus
|
|
645
|
+
* @tsplus pipeable fncts.Vector groupWith
|
|
599
646
|
*/
|
|
600
|
-
export function
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
647
|
+
export function groupWith<A>(f: (a: A, b: A) => boolean) {
|
|
648
|
+
return (self: Vector<A>): Vector<Vector<A>> => {
|
|
649
|
+
const result = Vector.emptyPushable<MutableVector<A>>();
|
|
650
|
+
let buffer = Vector.emptyPushable<A>();
|
|
651
|
+
self.forEach((a) => {
|
|
652
|
+
if (buffer.length !== 0 && !f(unsafeLast(buffer)!, a)) {
|
|
653
|
+
result.push(buffer);
|
|
654
|
+
buffer = emptyPushable();
|
|
655
|
+
}
|
|
656
|
+
buffer.push(a);
|
|
657
|
+
});
|
|
658
|
+
return buffer.length === 0 ? result : result.push(buffer);
|
|
659
|
+
};
|
|
611
660
|
}
|
|
612
661
|
|
|
613
662
|
/**
|
|
@@ -636,64 +685,74 @@ function indexOfCb(value: any, state: IndexOfState): boolean {
|
|
|
636
685
|
* to the given element. If no such element is found `-1` is returned.
|
|
637
686
|
*
|
|
638
687
|
* @complexity O(n)
|
|
639
|
-
* @tsplus
|
|
688
|
+
* @tsplus pipeable fncts.Vector indexOf
|
|
640
689
|
*/
|
|
641
|
-
export function
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
690
|
+
export function indexOf<A>(element: A) {
|
|
691
|
+
return (self: Vector<A>): number => {
|
|
692
|
+
const state = { element, found: false, index: -1 };
|
|
693
|
+
foldLeftCb(indexOfCb, state, self);
|
|
694
|
+
return state.found ? state.index : -1;
|
|
695
|
+
};
|
|
645
696
|
}
|
|
646
697
|
|
|
647
698
|
/**
|
|
648
699
|
* Inserts the given element at the given index in the Vector.
|
|
649
700
|
*
|
|
650
701
|
* @complexity O(log(n))
|
|
651
|
-
* @tsplus
|
|
702
|
+
* @tsplus pipeable fncts.Vector insertAt
|
|
652
703
|
*/
|
|
653
|
-
export function
|
|
654
|
-
return
|
|
704
|
+
export function insertAt<A>(index: number, element: A) {
|
|
705
|
+
return (self: Vector<A>): Vector<A> => {
|
|
706
|
+
return self.slice(0, index).append(element).concat(self.slice(index, self.length));
|
|
707
|
+
};
|
|
655
708
|
}
|
|
656
709
|
|
|
657
710
|
/**
|
|
658
711
|
* Inserts the given Vector of elements at the given index in the Vector.
|
|
659
712
|
*
|
|
660
713
|
* @complexity `O(log(n))`
|
|
661
|
-
* @tsplus
|
|
714
|
+
* @tsplus pipeable fncts.Vector insertAllAt
|
|
662
715
|
*/
|
|
663
|
-
export function
|
|
664
|
-
return
|
|
716
|
+
export function insertAllAt<A>(index: number, elements: Vector<A>) {
|
|
717
|
+
return (self: Vector<A>): Vector<A> => {
|
|
718
|
+
return self.slice(0, index).concat(elements).concat(self.slice(index, self.length));
|
|
719
|
+
};
|
|
665
720
|
}
|
|
666
721
|
|
|
667
722
|
/**
|
|
668
723
|
* Inserts a separator between each element in a Vector.
|
|
669
724
|
*
|
|
670
|
-
* @tsplus
|
|
725
|
+
* @tsplus pipeable fncts.Vector intersperse
|
|
671
726
|
*/
|
|
672
|
-
export function
|
|
673
|
-
return (
|
|
727
|
+
export function intersperse<A>(separator: A) {
|
|
728
|
+
return (self: Vector<A>): Vector<A> => {
|
|
729
|
+
return (self.foldLeft(Vector.emptyPushable(), (l2, a) => l2.push(a).push(separator)) as Vector<A>).pop;
|
|
730
|
+
};
|
|
674
731
|
}
|
|
675
732
|
|
|
676
733
|
/**
|
|
677
734
|
* @tsplus fluent fncts.Vector isEmpty
|
|
678
735
|
*/
|
|
679
|
-
export function isEmpty<A>(
|
|
680
|
-
return
|
|
736
|
+
export function isEmpty<A>(self: Vector<A>): boolean {
|
|
737
|
+
return self.length === 0;
|
|
681
738
|
}
|
|
682
739
|
|
|
683
740
|
/**
|
|
684
741
|
* @tsplus fluent fncts.Vector isNonEmpty
|
|
685
742
|
*/
|
|
686
|
-
export function isNonEmpty<A>(
|
|
687
|
-
return
|
|
743
|
+
export function isNonEmpty<A>(self: Vector<A>): boolean {
|
|
744
|
+
return self.length > 0;
|
|
688
745
|
}
|
|
689
746
|
|
|
690
747
|
/**
|
|
691
748
|
* Concatenates the strings in the Vector separated by a specified separator.
|
|
692
749
|
*
|
|
693
|
-
* @tsplus
|
|
750
|
+
* @tsplus pipeable fncts.Vector join
|
|
694
751
|
*/
|
|
695
|
-
export function
|
|
696
|
-
return
|
|
752
|
+
export function join(separator: string) {
|
|
753
|
+
return (self: Vector<string>): string => {
|
|
754
|
+
return self.foldLeft("", (a, b) => (a.length === 0 ? b : a + separator + b));
|
|
755
|
+
};
|
|
697
756
|
}
|
|
698
757
|
|
|
699
758
|
/**
|
|
@@ -702,8 +761,8 @@ export function join_(as: Vector<string>, separator: string): string {
|
|
|
702
761
|
* @complexity O(1)
|
|
703
762
|
* @tsplus getter fncts.Vector last
|
|
704
763
|
*/
|
|
705
|
-
export function last<A>(
|
|
706
|
-
return Maybe.fromNullable(
|
|
764
|
+
export function last<A>(self: Vector<A>): Maybe<NonNullable<A>> {
|
|
765
|
+
return Maybe.fromNullable(self.unsafeLast);
|
|
707
766
|
}
|
|
708
767
|
|
|
709
768
|
/**
|
|
@@ -711,12 +770,14 @@ export function last<A>(l: Vector<A>): Maybe<NonNullable<A>> {
|
|
|
711
770
|
* to the given element. If no such element is found `-1` is returned.
|
|
712
771
|
*
|
|
713
772
|
* @complexity O(n)
|
|
714
|
-
* @tsplus
|
|
773
|
+
* @tsplus pipeable fncts.Vector lastIndexOf
|
|
715
774
|
*/
|
|
716
|
-
export function
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
775
|
+
export function lastIndexOf<A>(element: A) {
|
|
776
|
+
return (self: Vector<A>): number => {
|
|
777
|
+
const state = { element, found: false, index: 0 };
|
|
778
|
+
foldRightCb(indexOfCb, state, self);
|
|
779
|
+
return state.found ? self.length - state.index : -1;
|
|
780
|
+
};
|
|
720
781
|
}
|
|
721
782
|
|
|
722
783
|
/**
|
|
@@ -735,14 +796,16 @@ export function makeBy<A>(n: number, f: (index: number) => A): Vector<A> {
|
|
|
735
796
|
}
|
|
736
797
|
|
|
737
798
|
/**
|
|
738
|
-
* @tsplus
|
|
799
|
+
* @tsplus pipeable fncts.Vector mapAccum
|
|
739
800
|
*/
|
|
740
|
-
export function
|
|
741
|
-
return
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
801
|
+
export function mapAccum<A, S, B>(s: S, f: (s: S, a: A) => readonly [B, S]) {
|
|
802
|
+
return (self: Vector<A>): readonly [Vector<B>, S] => {
|
|
803
|
+
return self.foldLeft([Vector.emptyPushable(), s], ([acc, s], a) => {
|
|
804
|
+
const r = f(s, a);
|
|
805
|
+
acc.push(r[0]);
|
|
806
|
+
return [acc, r[1]];
|
|
807
|
+
});
|
|
808
|
+
};
|
|
746
809
|
}
|
|
747
810
|
|
|
748
811
|
/**
|
|
@@ -750,10 +813,12 @@ export function mapAccum_<A, S, B>(fa: Vector<A>, s: S, f: (s: S, a: A) => reado
|
|
|
750
813
|
* new Vector of the values that the function return.
|
|
751
814
|
*
|
|
752
815
|
* @complexity O(n)
|
|
753
|
-
* @tsplus
|
|
816
|
+
* @tsplus pipeable fncts.Vector map
|
|
754
817
|
*/
|
|
755
|
-
export function
|
|
756
|
-
return
|
|
818
|
+
export function map<A, B>(f: (a: A) => B) {
|
|
819
|
+
return (self: Vector<A>): Vector<B> => {
|
|
820
|
+
return self.mapWithIndex((_, a) => f(a));
|
|
821
|
+
};
|
|
757
822
|
}
|
|
758
823
|
|
|
759
824
|
/**
|
|
@@ -761,24 +826,26 @@ export function map_<A, B>(fa: Vector<A>, f: (a: A) => B): Vector<B> {
|
|
|
761
826
|
* new Vector of the values that the function return.
|
|
762
827
|
*
|
|
763
828
|
* @complexity O(n)
|
|
764
|
-
* @tsplus
|
|
829
|
+
* @tsplus pipeable fncts.Vector mapWithIndex
|
|
765
830
|
*/
|
|
766
|
-
export function
|
|
767
|
-
return
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
831
|
+
export function mapWithIndex<A, B>(f: (i: number, a: A) => B) {
|
|
832
|
+
return (self: Vector<A>): Vector<B> => {
|
|
833
|
+
return new Vector(
|
|
834
|
+
self.bits,
|
|
835
|
+
self.offset,
|
|
836
|
+
self.length,
|
|
837
|
+
mapPrefix(f, self.prefix, getPrefixSize(self)),
|
|
838
|
+
self.root === undefined ? undefined : mapNode(f, self.root, getDepth(self), getPrefixSize(self), 1)[0],
|
|
839
|
+
mapAffix(f, self.suffix, getSuffixSize(self), self.length),
|
|
840
|
+
);
|
|
841
|
+
};
|
|
775
842
|
}
|
|
776
843
|
|
|
777
844
|
/**
|
|
778
845
|
* @tsplus getter fncts.Vector mutableClone
|
|
779
846
|
*/
|
|
780
|
-
export function mutableClone<A>(
|
|
781
|
-
return new Vector(
|
|
847
|
+
export function mutableClone<A>(self: Vector<A>): MutableVector<A> {
|
|
848
|
+
return new Vector(self.bits, self.offset, self.length, self.prefix, self.root, self.suffix) as any;
|
|
782
849
|
}
|
|
783
850
|
|
|
784
851
|
/**
|
|
@@ -790,13 +857,15 @@ export function mutableClone<A>(as: Vector<A>): MutableVector<A> {
|
|
|
790
857
|
*
|
|
791
858
|
* @complexity `O(log(n))`
|
|
792
859
|
*
|
|
793
|
-
* @tsplus
|
|
860
|
+
* @tsplus pipeable fncts.Vector modifyAt
|
|
794
861
|
*/
|
|
795
|
-
export function
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
862
|
+
export function modifyAt<A>(i: number, f: (a: A) => A) {
|
|
863
|
+
return (self: Vector<A>): Vector<A> => {
|
|
864
|
+
if (i < 0 || self.length <= i) {
|
|
865
|
+
return self;
|
|
866
|
+
}
|
|
867
|
+
return self.updateAt(i, f(self.unsafeGet(i)!));
|
|
868
|
+
};
|
|
800
869
|
}
|
|
801
870
|
|
|
802
871
|
/**
|
|
@@ -805,10 +874,12 @@ export function modifyAt_<A>(as: Vector<A>, i: number, f: (a: A) => A): Vector<A
|
|
|
805
874
|
*
|
|
806
875
|
* @complexity O(n)
|
|
807
876
|
*
|
|
808
|
-
* @tsplus
|
|
877
|
+
* @tsplus pipeable fncts.Vector none
|
|
809
878
|
*/
|
|
810
|
-
export function
|
|
811
|
-
return
|
|
879
|
+
export function none<A>(predicate: Predicate<A>) {
|
|
880
|
+
return (self: Vector<A>): boolean => {
|
|
881
|
+
return !self.some(predicate);
|
|
882
|
+
};
|
|
812
883
|
}
|
|
813
884
|
|
|
814
885
|
/**
|
|
@@ -828,8 +899,8 @@ export function pair<A>(first: A, second: A): Vector<A> {
|
|
|
828
899
|
* @complexity `O(1)`
|
|
829
900
|
* @tsplus getter fncts.Vector pop
|
|
830
901
|
*/
|
|
831
|
-
export function pop<A>(
|
|
832
|
-
return
|
|
902
|
+
export function pop<A>(self: Vector<A>): Vector<A> {
|
|
903
|
+
return self.slice(0, -1);
|
|
833
904
|
}
|
|
834
905
|
|
|
835
906
|
/**
|
|
@@ -837,35 +908,37 @@ export function pop<A>(as: Vector<A>): Vector<A> {
|
|
|
837
908
|
*
|
|
838
909
|
* @complexity O(1)
|
|
839
910
|
*
|
|
840
|
-
* @tsplus
|
|
841
|
-
*/
|
|
842
|
-
export function
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
911
|
+
* @tsplus pipeable fncts.Vector prepend
|
|
912
|
+
*/
|
|
913
|
+
export function prepend<A>(a: A) {
|
|
914
|
+
return (self: Vector<A>): Vector<A> => {
|
|
915
|
+
const prefixSize = getPrefixSize(self);
|
|
916
|
+
if (prefixSize < 32) {
|
|
917
|
+
return new Vector<A>(
|
|
918
|
+
incrementPrefix(self.bits),
|
|
919
|
+
self.offset,
|
|
920
|
+
self.length + 1,
|
|
921
|
+
affixPush(a, self.prefix, prefixSize),
|
|
922
|
+
self.root,
|
|
923
|
+
self.suffix,
|
|
924
|
+
);
|
|
925
|
+
} else {
|
|
926
|
+
const newVector = mutableClone(self);
|
|
927
|
+
prependNodeToTree(newVector, reverseArray(self.prefix));
|
|
928
|
+
const newPrefix = [a];
|
|
929
|
+
newVector.prefix = newPrefix;
|
|
930
|
+
newVector.length++;
|
|
931
|
+
newVector.bits = setPrefix(1, newVector.bits);
|
|
932
|
+
return newVector;
|
|
933
|
+
}
|
|
934
|
+
};
|
|
862
935
|
}
|
|
863
936
|
|
|
864
937
|
/**
|
|
865
938
|
* @tsplus operator fncts.Vector +
|
|
866
939
|
*/
|
|
867
|
-
export function prependOperator<A>(a: A,
|
|
868
|
-
return
|
|
940
|
+
export function prependOperator<A>(a: A, self: Vector<A>): Vector<A> {
|
|
941
|
+
return self.prepend(a);
|
|
869
942
|
}
|
|
870
943
|
|
|
871
944
|
/**
|
|
@@ -889,10 +962,12 @@ export function range(start: number, end: number): Vector<number> {
|
|
|
889
962
|
*
|
|
890
963
|
* @complexity `O(log(n))`
|
|
891
964
|
*
|
|
892
|
-
* @tsplus
|
|
965
|
+
* @tsplus pipeable fncts.Vector remove
|
|
893
966
|
*/
|
|
894
|
-
export function
|
|
895
|
-
return
|
|
967
|
+
export function remove(from: number, amount: number) {
|
|
968
|
+
return <A>(self: Vector<A>): Vector<A> => {
|
|
969
|
+
return self.slice(0, from).concat(self.slice(from + amount, self.length));
|
|
970
|
+
};
|
|
896
971
|
}
|
|
897
972
|
|
|
898
973
|
/**
|
|
@@ -922,10 +997,12 @@ export function reverse<A>(self: Vector<A>): Vector<A> {
|
|
|
922
997
|
* Folds a function over a Vector from left to right while collecting
|
|
923
998
|
* all the intermediate steps in a resulting Vector.
|
|
924
999
|
*
|
|
925
|
-
* @tsplus
|
|
1000
|
+
* @tsplus pipeable fncts.Vector scanLeft
|
|
926
1001
|
*/
|
|
927
|
-
export function
|
|
928
|
-
return
|
|
1002
|
+
export function scanLeft<A, B>(initial: B, f: (acc: B, value: A) => B) {
|
|
1003
|
+
return (self: Vector<A>): Vector<B> => {
|
|
1004
|
+
return self.foldLeft(emptyPushable<B>().push(initial), (l2, a) => l2.push(f((l2 as Vector<B>).unsafeLast!, a)));
|
|
1005
|
+
};
|
|
929
1006
|
}
|
|
930
1007
|
|
|
931
1008
|
/**
|
|
@@ -944,123 +1021,119 @@ export function single<A>(a: A): Vector<A> {
|
|
|
944
1021
|
* from the right end of the Vector.
|
|
945
1022
|
*
|
|
946
1023
|
* @complexity `O(log(n))`
|
|
947
|
-
* @tsplus
|
|
948
|
-
*/
|
|
949
|
-
export function
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
_from
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
_to
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
newVector.offset = newOffset;
|
|
1030
|
-
if (newVector.root === undefined) {
|
|
1031
|
-
bits = setDepth(0, bits);
|
|
1024
|
+
* @tsplus pipeable fncts.Vector slice
|
|
1025
|
+
*/
|
|
1026
|
+
export function slice(from: number, to: number) {
|
|
1027
|
+
return <A>(self: Vector<A>): Vector<A> => {
|
|
1028
|
+
let { bits, length } = self;
|
|
1029
|
+
let _to = to;
|
|
1030
|
+
let _from = from;
|
|
1031
|
+
_to = Math.min(length, to);
|
|
1032
|
+
// Handle negative indices
|
|
1033
|
+
if (_from < 0) {
|
|
1034
|
+
_from = length + from;
|
|
1035
|
+
}
|
|
1036
|
+
if (_to < 0) {
|
|
1037
|
+
_to = length + to;
|
|
1038
|
+
}
|
|
1039
|
+
// Should we just return the empty Vector?
|
|
1040
|
+
if (_to <= _from || _to <= 0 || length <= _from) {
|
|
1041
|
+
return empty();
|
|
1042
|
+
}
|
|
1043
|
+
// Return Vector unchanged if we are slicing nothing off
|
|
1044
|
+
if (_from <= 0 && length <= _to) {
|
|
1045
|
+
return self;
|
|
1046
|
+
}
|
|
1047
|
+
const newLength = _to - _from;
|
|
1048
|
+
let prefixSize = getPrefixSize(self);
|
|
1049
|
+
const suffixSize = getSuffixSize(self);
|
|
1050
|
+
// Both indices lie in the prefix
|
|
1051
|
+
if (_to <= prefixSize) {
|
|
1052
|
+
return new Vector(
|
|
1053
|
+
setPrefix(newLength, 0),
|
|
1054
|
+
0,
|
|
1055
|
+
newLength,
|
|
1056
|
+
self.prefix.slice(prefixSize - _to, prefixSize - _from),
|
|
1057
|
+
undefined,
|
|
1058
|
+
emptyAffix,
|
|
1059
|
+
);
|
|
1060
|
+
}
|
|
1061
|
+
const suffixStart = length - suffixSize;
|
|
1062
|
+
// Both indices lie in the suffix
|
|
1063
|
+
if (suffixStart <= _from) {
|
|
1064
|
+
return new Vector(
|
|
1065
|
+
setSuffix(newLength, 0),
|
|
1066
|
+
0,
|
|
1067
|
+
newLength,
|
|
1068
|
+
emptyAffix,
|
|
1069
|
+
undefined,
|
|
1070
|
+
self.suffix.slice(_from - suffixStart, _to - suffixStart),
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
const newVector = mutableClone(self);
|
|
1074
|
+
newVector.length = newLength;
|
|
1075
|
+
// Both indices lie in the tree
|
|
1076
|
+
if (prefixSize <= _from && _to <= suffixStart) {
|
|
1077
|
+
sliceTreeVector(
|
|
1078
|
+
_from - prefixSize + self.offset,
|
|
1079
|
+
_to - prefixSize + self.offset - 1,
|
|
1080
|
+
self.root!,
|
|
1081
|
+
getDepth(self),
|
|
1082
|
+
self.offset,
|
|
1083
|
+
newVector,
|
|
1084
|
+
);
|
|
1085
|
+
return newVector;
|
|
1086
|
+
}
|
|
1087
|
+
if (0 < _from) {
|
|
1088
|
+
// we need _to slice something off of the left
|
|
1089
|
+
if (_from < prefixSize) {
|
|
1090
|
+
// shorten the prefix even though it's not strictly needed,
|
|
1091
|
+
// so that referenced items can be GC'd
|
|
1092
|
+
newVector.prefix = self.prefix.slice(0, prefixSize - _from);
|
|
1093
|
+
bits = setPrefix(prefixSize - _from, bits);
|
|
1094
|
+
} else {
|
|
1095
|
+
// if we're here `_to` can't lie in the tree, so we can set the
|
|
1096
|
+
// root
|
|
1097
|
+
zeroOffset();
|
|
1098
|
+
newVector.root = sliceLeft(newVector.root!, getDepth(self), _from - prefixSize, self.offset, true);
|
|
1099
|
+
newVector.offset = newOffset;
|
|
1100
|
+
if (newVector.root === undefined) {
|
|
1101
|
+
bits = setDepth(0, bits);
|
|
1102
|
+
}
|
|
1103
|
+
bits = setPrefix(newAffix.length, bits);
|
|
1104
|
+
prefixSize = newAffix.length;
|
|
1105
|
+
newVector.prefix = newAffix;
|
|
1032
1106
|
}
|
|
1033
|
-
bits = setPrefix(newAffix.length, bits);
|
|
1034
|
-
prefixSize = newAffix.length;
|
|
1035
|
-
newVector.prefix = newAffix;
|
|
1036
1107
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1108
|
+
if (_to < length) {
|
|
1109
|
+
// we need _to slice something off of the right
|
|
1110
|
+
if (length - _to < suffixSize) {
|
|
1111
|
+
bits = setSuffix(suffixSize - (length - _to), bits);
|
|
1112
|
+
// slice the suffix even though it's not strictly needed,
|
|
1113
|
+
// _to allow the removed items _to be GC'd
|
|
1114
|
+
newVector.suffix = self.suffix.slice(0, suffixSize - (length - _to));
|
|
1115
|
+
} else {
|
|
1116
|
+
newVector.root = sliceRight(newVector.root!, getDepth(self), _to - prefixSize - 1, newVector.offset);
|
|
1117
|
+
if (newVector.root === undefined) {
|
|
1118
|
+
bits = setDepth(0, bits);
|
|
1119
|
+
newVector.offset = 0;
|
|
1120
|
+
}
|
|
1121
|
+
bits = setSuffix(newAffix.length, bits);
|
|
1122
|
+
newVector.suffix = newAffix;
|
|
1050
1123
|
}
|
|
1051
|
-
bits = setSuffix(newAffix.length, bits);
|
|
1052
|
-
newVector.suffix = newAffix;
|
|
1053
1124
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1125
|
+
newVector.bits = bits;
|
|
1126
|
+
return newVector;
|
|
1127
|
+
};
|
|
1057
1128
|
}
|
|
1058
1129
|
|
|
1059
1130
|
/**
|
|
1060
|
-
* @tsplus
|
|
1131
|
+
* @tsplus pipeable fncts.Vector sort
|
|
1061
1132
|
*/
|
|
1062
|
-
export function
|
|
1063
|
-
return self
|
|
1133
|
+
export function sort<A>(/** @tsplus auto */ O: Ord<A>) {
|
|
1134
|
+
return (self: Vector<A>): Vector<A> => {
|
|
1135
|
+
return self.sortWith((a, b) => O.compare(b)(a));
|
|
1136
|
+
};
|
|
1064
1137
|
}
|
|
1065
1138
|
|
|
1066
1139
|
/**
|
|
@@ -1072,21 +1145,26 @@ export function sort_<A>(self: Vector<A>, /** @tsplus auto */ O: Ord<A>): Vector
|
|
|
1072
1145
|
*
|
|
1073
1146
|
* @complexity O(n * log(n))
|
|
1074
1147
|
*
|
|
1075
|
-
* @tsplus
|
|
1076
|
-
*/
|
|
1077
|
-
export function
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1148
|
+
* @tsplus pipeable fncts.Vector sortWith
|
|
1149
|
+
*/
|
|
1150
|
+
export function sortWith<A>(compare: (a: A, b: A) => Ordering) {
|
|
1151
|
+
return (self: Vector<A>): Vector<A> => {
|
|
1152
|
+
const arr: {
|
|
1153
|
+
idx: number;
|
|
1154
|
+
elm: A;
|
|
1155
|
+
}[] = [];
|
|
1156
|
+
let i = 0;
|
|
1157
|
+
self.forEach((elm) => arr.push({ idx: i++, elm }));
|
|
1158
|
+
arr.sort(({ elm: a, idx: i }, { elm: b, idx: j }) => {
|
|
1159
|
+
const c = compare(a, b);
|
|
1160
|
+
return c !== 0 ? c : i < j ? -1 : 1;
|
|
1161
|
+
});
|
|
1162
|
+
const newL = emptyPushable<A>();
|
|
1163
|
+
for (let i = 0; i < arr.length; ++i) {
|
|
1164
|
+
newL.push(arr[i]!.elm);
|
|
1165
|
+
}
|
|
1166
|
+
return newL;
|
|
1167
|
+
};
|
|
1090
1168
|
}
|
|
1091
1169
|
|
|
1092
1170
|
/**
|
|
@@ -1097,10 +1175,12 @@ export function sortWith_<A>(as: Vector<A>, compare: (a: A, b: A) => Ordering):
|
|
|
1097
1175
|
*
|
|
1098
1176
|
* @complexity `O(log(n))`
|
|
1099
1177
|
*
|
|
1100
|
-
* @tsplus
|
|
1178
|
+
* @tsplus pipeable fncts.Vector splitAt
|
|
1101
1179
|
*/
|
|
1102
|
-
export function
|
|
1103
|
-
return
|
|
1180
|
+
export function splitAt(index: number) {
|
|
1181
|
+
return <A>(self: Vector<A>): [Vector<A>, Vector<A>] => {
|
|
1182
|
+
return [self.slice(0, index), self.slice(index, self.length)];
|
|
1183
|
+
};
|
|
1104
1184
|
}
|
|
1105
1185
|
|
|
1106
1186
|
/**
|
|
@@ -1109,11 +1189,13 @@ export function splitAt_<A>(as: Vector<A>, index: number): [Vector<A>, Vector<A>
|
|
|
1109
1189
|
*
|
|
1110
1190
|
* @complexity `O(n)`
|
|
1111
1191
|
*
|
|
1112
|
-
* @tsplus
|
|
1192
|
+
* @tsplus pipeable fncts.Vector splitWhen
|
|
1113
1193
|
*/
|
|
1114
|
-
export function
|
|
1115
|
-
|
|
1116
|
-
|
|
1194
|
+
export function splitWhen<A>(predicate: Predicate<A>) {
|
|
1195
|
+
return (self: Vector<A>): [Vector<A>, Vector<A>] => {
|
|
1196
|
+
const idx = self.findIndex(predicate);
|
|
1197
|
+
return idx === -1 ? [self, Vector.empty()] : self.splitAt(idx);
|
|
1198
|
+
};
|
|
1117
1199
|
}
|
|
1118
1200
|
|
|
1119
1201
|
/**
|
|
@@ -1124,18 +1206,20 @@ export function splitWhen_<A>(as: Vector<A>, predicate: Predicate<A>): [Vector<A
|
|
|
1124
1206
|
*
|
|
1125
1207
|
* @tsplus getter fncts.Vector tail
|
|
1126
1208
|
*/
|
|
1127
|
-
export function tail<A>(
|
|
1128
|
-
return
|
|
1209
|
+
export function tail<A>(self: Vector<A>): Vector<A> {
|
|
1210
|
+
return self.slice(1, self.length);
|
|
1129
1211
|
}
|
|
1130
1212
|
|
|
1131
1213
|
/**
|
|
1132
1214
|
* Takes the first `n` elements from a Vector and returns them in a new Vector.
|
|
1133
1215
|
*
|
|
1134
1216
|
* @complexity `O(log(n))`
|
|
1135
|
-
* @tsplus
|
|
1217
|
+
* @tsplus pipeable fncts.Vector take
|
|
1136
1218
|
*/
|
|
1137
|
-
export function
|
|
1138
|
-
return
|
|
1219
|
+
export function take(n: number) {
|
|
1220
|
+
return <A>(self: Vector<A>): Vector<A> => {
|
|
1221
|
+
return self.slice(0, n);
|
|
1222
|
+
};
|
|
1139
1223
|
}
|
|
1140
1224
|
|
|
1141
1225
|
/**
|
|
@@ -1145,11 +1229,13 @@ export function take_<A>(as: Vector<A>, n: number): Vector<A> {
|
|
|
1145
1229
|
* @complexity `O(k + log(n))` where `k` is the number of elements satisfying
|
|
1146
1230
|
* the predicate.
|
|
1147
1231
|
*
|
|
1148
|
-
* @tsplus
|
|
1232
|
+
* @tsplus pipeable fncts.Vector takeWhile
|
|
1149
1233
|
*/
|
|
1150
|
-
export function
|
|
1151
|
-
|
|
1152
|
-
|
|
1234
|
+
export function takeWhile<A>(predicate: Predicate<A>) {
|
|
1235
|
+
return (self: Vector<A>): Vector<A> => {
|
|
1236
|
+
const { index } = foldLeftCb(findNotIndexCb, { predicate, index: 0 }, self);
|
|
1237
|
+
return self.slice(0, index);
|
|
1238
|
+
};
|
|
1153
1239
|
}
|
|
1154
1240
|
|
|
1155
1241
|
/**
|
|
@@ -1157,10 +1243,12 @@ export function takeWhile_<A>(as: Vector<A>, predicate: Predicate<A>): Vector<A>
|
|
|
1157
1243
|
* Vector.
|
|
1158
1244
|
*
|
|
1159
1245
|
* @complexity `O(log(n))`
|
|
1160
|
-
* @tsplus
|
|
1246
|
+
* @tsplus pipeable fncts.Vector takeLast
|
|
1161
1247
|
*/
|
|
1162
|
-
export function
|
|
1163
|
-
return
|
|
1248
|
+
export function takeLast(n: number) {
|
|
1249
|
+
return <A>(self: Vector<A>): Vector<A> => {
|
|
1250
|
+
return self.slice(self.length - n, self.length);
|
|
1251
|
+
};
|
|
1164
1252
|
}
|
|
1165
1253
|
|
|
1166
1254
|
/**
|
|
@@ -1170,11 +1258,13 @@ export function takeLast_<A>(as: Vector<A>, n: number): Vector<A> {
|
|
|
1170
1258
|
* @complexity `O(k + log(n))` where `k` is the number of elements
|
|
1171
1259
|
* satisfying the predicate.
|
|
1172
1260
|
*
|
|
1173
|
-
* @tsplus
|
|
1261
|
+
* @tsplus pipeable fncts.Vector takeLastWhile
|
|
1174
1262
|
*/
|
|
1175
|
-
export function
|
|
1176
|
-
|
|
1177
|
-
|
|
1263
|
+
export function takeLastWhile<A>(predicate: Predicate<A>) {
|
|
1264
|
+
return (self: Vector<A>): Vector<A> => {
|
|
1265
|
+
const { index } = foldRightCb(findNotIndexCb, { predicate, index: 0 }, self);
|
|
1266
|
+
return self.slice(self.length - index, self.length);
|
|
1267
|
+
};
|
|
1178
1268
|
}
|
|
1179
1269
|
|
|
1180
1270
|
/**
|
|
@@ -1204,19 +1294,42 @@ export function toList<A>(self: Vector<A>): List<A> {
|
|
|
1204
1294
|
/**
|
|
1205
1295
|
* @tsplus getter fncts.Vector traverseWithIndex
|
|
1206
1296
|
*/
|
|
1207
|
-
export
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1297
|
+
export function _traverseWithIndex<A>(
|
|
1298
|
+
self: Vector<A>,
|
|
1299
|
+
): <G extends HKT, GC = HKT.None>(
|
|
1300
|
+
G: P.Applicative<G, GC>,
|
|
1301
|
+
) => <K, Q, W, X, I, S, R, E, B>(
|
|
1302
|
+
f: (i: number, a: A) => HKT.Kind<G, GC, K, Q, W, X, I, S, R, E, B>,
|
|
1303
|
+
) => HKT.Kind<G, GC, K, Q, W, X, I, S, R, E, Vector<B>>;
|
|
1304
|
+
export function _traverseWithIndex<A>(
|
|
1305
|
+
self: Vector<A>,
|
|
1306
|
+
): <G>(G: P.Applicative<HKT.F<G>>) => <B>(f: (i: number, a: A) => HKT.FK1<G, B>) => HKT.FK1<G, Vector<B>> {
|
|
1307
|
+
return (G) => (f) =>
|
|
1308
|
+
self.foldLeftWithIndex(G.pure(Vector.emptyPushable()), (i, b, a) =>
|
|
1309
|
+
b.pipe(
|
|
1310
|
+
G.zipWith(f(i, a), (v, b) => {
|
|
1311
|
+
v.push(b);
|
|
1312
|
+
return v;
|
|
1313
|
+
}),
|
|
1314
|
+
),
|
|
1315
|
+
);
|
|
1316
|
+
}
|
|
1215
1317
|
|
|
1216
1318
|
/**
|
|
1217
1319
|
* @tsplus getter fncts.Vector traverse
|
|
1218
1320
|
*/
|
|
1219
|
-
export
|
|
1321
|
+
export function _traverse<A>(self: Vector<A>) {
|
|
1322
|
+
return <G extends HKT, GC = HKT.None>(G: P.Applicative<G, GC>) =>
|
|
1323
|
+
<K, Q, W, X, I, S, R, E, B>(
|
|
1324
|
+
f: (a: A) => HKT.Kind<G, GC, K, Q, W, X, I, S, R, E, B>,
|
|
1325
|
+
): HKT.Kind<G, GC, K, Q, W, X, I, S, R, E, Vector<B>> =>
|
|
1326
|
+
self.traverseWithIndex(G)((_, a) => f(a));
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
export const traverseWithIndex: P.TraversableWithIndex<VectorF>["traverseWithIndex"] = (G) => (f) => (self) =>
|
|
1330
|
+
self.traverseWithIndex(G)(f);
|
|
1331
|
+
|
|
1332
|
+
export const traverse: Traversable<VectorF>["traverse"] = (G) => (f) => (self) =>
|
|
1220
1333
|
self.traverseWithIndex(G)((_, a) => f(a));
|
|
1221
1334
|
|
|
1222
1335
|
/**
|
|
@@ -1224,10 +1337,10 @@ export const traverse: Traversable<VectorF>["traverse"] = (self) => (G) => (f) =
|
|
|
1224
1337
|
* Eq instance to determine when elements are equal
|
|
1225
1338
|
*
|
|
1226
1339
|
* @complexity `O(n)`
|
|
1227
|
-
* @tsplus
|
|
1340
|
+
* @tsplus pipeable fncts.Vector uniq
|
|
1228
1341
|
*/
|
|
1229
|
-
export function uniq<A>(
|
|
1230
|
-
return (
|
|
1342
|
+
export function uniq<A>(E: Eq<A>) {
|
|
1343
|
+
return (self: Vector<A>) => self.dropRepeatsWith((a, b) => E.equals(b)(a));
|
|
1231
1344
|
}
|
|
1232
1345
|
|
|
1233
1346
|
/**
|
|
@@ -1264,10 +1377,12 @@ function findCb<A>(value: A, state: PredState): boolean {
|
|
|
1264
1377
|
* If no such element is found the function returns `undefined`.
|
|
1265
1378
|
*
|
|
1266
1379
|
* @complexity O(n)
|
|
1267
|
-
* @tsplus
|
|
1380
|
+
* @tsplus pipeable fncts.Vector unsafeFind
|
|
1268
1381
|
*/
|
|
1269
|
-
export function
|
|
1270
|
-
return
|
|
1382
|
+
export function unsafeFind<A>(predicate: Predicate<A>) {
|
|
1383
|
+
return (self: Vector<A>): A | undefined => {
|
|
1384
|
+
return foldLeftCb<A, PredState>(findCb, { predicate, result: undefined }, self).result;
|
|
1385
|
+
};
|
|
1271
1386
|
}
|
|
1272
1387
|
|
|
1273
1388
|
/**
|
|
@@ -1275,10 +1390,12 @@ export function unsafeFind_<A>(as: Vector<A>, predicate: Predicate<A>): A | unde
|
|
|
1275
1390
|
* If no such element is found the function returns `undefined`.
|
|
1276
1391
|
*
|
|
1277
1392
|
* @complexity O(n)
|
|
1278
|
-
* @tsplus
|
|
1393
|
+
* @tsplus pipeable fncts.Vector unsafeFindLast
|
|
1279
1394
|
*/
|
|
1280
|
-
export function
|
|
1281
|
-
return
|
|
1395
|
+
export function unsafeFindLast<A>(predicate: Predicate<A>) {
|
|
1396
|
+
return (self: Vector<A>): A | undefined => {
|
|
1397
|
+
return foldRightCb<A, PredState>(findCb, { predicate, result: undefined }, self).result;
|
|
1398
|
+
};
|
|
1282
1399
|
}
|
|
1283
1400
|
|
|
1284
1401
|
/**
|
|
@@ -1286,24 +1403,31 @@ export function unsafeFindLast_<A>(as: Vector<A>, predicate: Predicate<A>): A |
|
|
|
1286
1403
|
* `undefined` is returned.
|
|
1287
1404
|
*
|
|
1288
1405
|
* @complexity O(log(n))
|
|
1289
|
-
* @tsplus
|
|
1406
|
+
* @tsplus pipeable fncts.Vector unsafeGet
|
|
1407
|
+
* @tsplus pipeable-index fncts.Vector
|
|
1290
1408
|
*/
|
|
1291
|
-
export function
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1409
|
+
export function unsafeGet(index: number) {
|
|
1410
|
+
return <A>(self: Vector<A>): A | undefined => {
|
|
1411
|
+
if (index < 0 || self.length <= index) {
|
|
1412
|
+
return undefined;
|
|
1413
|
+
}
|
|
1414
|
+
const prefixSize = getPrefixSize(self);
|
|
1415
|
+
const suffixSize = getSuffixSize(self);
|
|
1416
|
+
if (index < prefixSize) {
|
|
1417
|
+
return self.prefix[prefixSize - index - 1];
|
|
1418
|
+
} else if (index >= self.length - suffixSize) {
|
|
1419
|
+
return self.suffix[index - (self.length - suffixSize)];
|
|
1420
|
+
}
|
|
1421
|
+
const { offset } = self;
|
|
1422
|
+
const depth = getDepth(self);
|
|
1423
|
+
return self.root!.sizes === undefined
|
|
1424
|
+
? nodeNthDense(
|
|
1425
|
+
self.root!,
|
|
1426
|
+
depth,
|
|
1427
|
+
offset === 0 ? index - prefixSize : handleOffset(depth, offset, index - prefixSize),
|
|
1428
|
+
)
|
|
1429
|
+
: nodeNth(self.root!, depth, offset, index - prefixSize);
|
|
1430
|
+
};
|
|
1307
1431
|
}
|
|
1308
1432
|
|
|
1309
1433
|
/**
|
|
@@ -1313,9 +1437,9 @@ export function unsafeGet_<A>(l: Vector<A>, index: number): A | undefined {
|
|
|
1313
1437
|
* @complexity O(1)
|
|
1314
1438
|
* @tsplus getter fncts.Vector unsafeHead
|
|
1315
1439
|
*/
|
|
1316
|
-
export function unsafeHead<A>(
|
|
1317
|
-
const prefixSize = getPrefixSize(
|
|
1318
|
-
return prefixSize !== 0 ?
|
|
1440
|
+
export function unsafeHead<A>(self: Vector<A>): A | undefined {
|
|
1441
|
+
const prefixSize = getPrefixSize(self);
|
|
1442
|
+
return prefixSize !== 0 ? self.prefix[prefixSize - 1] : self.length !== 0 ? self.suffix[0] : undefined;
|
|
1319
1443
|
}
|
|
1320
1444
|
|
|
1321
1445
|
/**
|
|
@@ -1325,9 +1449,9 @@ export function unsafeHead<A>(l: Vector<A>): A | undefined {
|
|
|
1325
1449
|
* @complexity O(1)
|
|
1326
1450
|
* @tsplus getter fncts.Vector unsafeLast
|
|
1327
1451
|
*/
|
|
1328
|
-
export function unsafeLast<A>(
|
|
1329
|
-
const suffixSize = getSuffixSize(
|
|
1330
|
-
return suffixSize !== 0 ?
|
|
1452
|
+
export function unsafeLast<A>(self: Vector<A>): A | undefined {
|
|
1453
|
+
const suffixSize = getSuffixSize(self);
|
|
1454
|
+
return suffixSize !== 0 ? self.suffix[suffixSize - 1] : self.length !== 0 ? self.prefix[0] : undefined;
|
|
1331
1455
|
}
|
|
1332
1456
|
|
|
1333
1457
|
/**
|
|
@@ -1336,27 +1460,29 @@ export function unsafeLast<A>(l: Vector<A>): A | undefined {
|
|
|
1336
1460
|
* If the index is out of bounds the given Vector is returned unchanged.
|
|
1337
1461
|
*
|
|
1338
1462
|
* @complexity O(log(n))
|
|
1339
|
-
* @tsplus
|
|
1463
|
+
* @tsplus pipeable fncts.Vector updateAt
|
|
1340
1464
|
*/
|
|
1341
|
-
export function
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1465
|
+
export function updateAt<A>(i: number, a: A) {
|
|
1466
|
+
return (self: Vector<A>): Vector<A> => {
|
|
1467
|
+
if (i < 0 || self.length <= i) {
|
|
1468
|
+
return self;
|
|
1469
|
+
}
|
|
1470
|
+
const prefixSize = getPrefixSize(self);
|
|
1471
|
+
const suffixSize = getSuffixSize(self);
|
|
1472
|
+
const newVector = mutableClone(self);
|
|
1473
|
+
if (i < prefixSize) {
|
|
1474
|
+
const newPrefix = copyArray(newVector.prefix);
|
|
1475
|
+
newPrefix[newPrefix.length - i - 1] = a;
|
|
1476
|
+
newVector.prefix = newPrefix;
|
|
1477
|
+
} else if (i >= self.length - suffixSize) {
|
|
1478
|
+
const newSuffix = copyArray(newVector.suffix);
|
|
1479
|
+
newSuffix[i - (self.length - suffixSize)] = a;
|
|
1480
|
+
newVector.suffix = newSuffix;
|
|
1481
|
+
} else {
|
|
1482
|
+
newVector.root = updateNode(self.root!, getDepth(self), i - prefixSize, self.offset, a);
|
|
1483
|
+
}
|
|
1484
|
+
return newVector;
|
|
1485
|
+
};
|
|
1360
1486
|
}
|
|
1361
1487
|
|
|
1362
1488
|
/**
|