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